Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
06fadcdc
Commit
06fadcdc
authored
Dec 18, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make conditional module and poll modules a little easier to understand
parent
268c4fa0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
common/lib/xmodule/xmodule/conditional_module.py
+5
-1
common/lib/xmodule/xmodule/poll_module.py
+2
-0
No files found.
common/lib/xmodule/xmodule/conditional_module.py
View file @
06fadcdc
...
...
@@ -96,7 +96,11 @@ class ConditionalModule(ConditionalFields, XModule):
xml_value
=
self
.
descriptor
.
xml_attributes
.
get
(
xml_attr
)
if
xml_value
:
return
xml_value
,
attr_name
raise
Exception
(
'Error in conditional module: unknown condition "
%
s"'
%
xml_attr
)
raise
Exception
(
'Error in conditional module: no known conditional found in {!r}'
.
format
(
self
.
descriptor
.
xml_attributes
.
keys
()
)
)
@lazy
def
required_modules
(
self
):
...
...
common/lib/xmodule/xmodule/poll_module.py
View file @
06fadcdc
...
...
@@ -32,7 +32,9 @@ class PollFields(object):
poll_answer
=
String
(
help
=
"Student answer"
,
scope
=
Scope
.
user_state
,
default
=
''
)
poll_answers
=
Dict
(
help
=
"All possible answers for the poll fro other students"
,
scope
=
Scope
.
user_state_summary
)
# List of answers, in the form {'id': 'some id', 'text': 'the answer text'}
answers
=
List
(
help
=
"Poll answers from xml"
,
scope
=
Scope
.
content
,
default
=
[])
question
=
String
(
help
=
"Poll question"
,
scope
=
Scope
.
content
,
default
=
''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment