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
cda7f1dc
Commit
cda7f1dc
authored
Sep 15, 2016
by
Oksana Slusarenro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the Help and Field Label text.
parent
24406122
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
common/lib/xmodule/xmodule/conditional_module.py
+10
-8
common/lib/xmodule/xmodule/tests/test_conditional.py
+1
-1
No files found.
common/lib/xmodule/xmodule/conditional_module.py
View file @
cda7f1dc
...
...
@@ -39,15 +39,16 @@ class ConditionalFields(object):
sources_list
=
ReferenceList
(
display_name
=
_
(
"Source Components"
),
help
=
_
(
"The location IDs of the components whose attributes are used to determine whether a learner is shown "
"the content of this conditional module."
),
help
=
_
(
"The component location IDs of all source components that are used to determine whether a learner is "
"shown the content of this conditional module. Copy the component location ID of a component from its "
"Settings dialog in Studio."
),
scope
=
Scope
.
content
)
conditional_attr
=
String
(
display_name
=
_
(
"Conditional Attribute"
),
help
=
_
(
"The attribute
from the course component used to determine whether a learner is shown
"
"
the content of this
conditional module."
),
help
=
_
(
"The attribute
of the source components that determines whether a learner is shown the content of this
"
"conditional module."
),
scope
=
Scope
.
content
,
default
=
'correct'
,
values
=
lambda
:
[{
'display_name'
:
xml_attr
,
'value'
:
xml_attr
}
...
...
@@ -56,7 +57,7 @@ class ConditionalFields(object):
conditional_value
=
String
(
display_name
=
_
(
"Conditional Value"
),
help
=
_
(
"The value
of the conditional attribute that must be true for a learner to be
shown "
help
=
_
(
"The value
that the conditional attribute of the source components must match before a learner is
shown "
"the content of this conditional module."
),
scope
=
Scope
.
content
,
default
=
'True'
...
...
@@ -64,10 +65,11 @@ class ConditionalFields(object):
conditional_message
=
String
(
display_name
=
_
(
"Blocked Content Message"
),
help
=
_
(
"The message learners see when not all conditions are met for this block. "
"You can use the {link} variable to give learners a direct link to the required module."
),
help
=
_
(
"The message that is shown to learners when not all conditions are met to show the content of this "
"conditional module. Include {link} in the text of your message to give learners a direct link to "
"required units. For example, 'You must complete {link} before you can access this unit'."
),
scope
=
Scope
.
content
,
default
=
_
(
'
{link} must be attempted before this will become visible
.'
)
default
=
_
(
'
You must complete {link} before you can access this unit
.'
)
)
...
...
common/lib/xmodule/xmodule/tests/test_conditional.py
View file @
cda7f1dc
...
...
@@ -335,7 +335,7 @@ class ConditionalModuleXmlTest(unittest.TestCase):
modules
[
'cond_module'
]
.
definition_to_xml
(
Mock
())
expected_xml_attributes
=
{
'attempted'
:
'true'
,
'message'
:
'
{link} must be attempted before this will become visible
.'
,
'message'
:
'
You must complete {link} before you can access this unit
.'
,
'sources'
:
''
}
self
.
assertDictEqual
(
modules
[
'cond_module'
]
.
xml_attributes
,
expected_xml_attributes
)
...
...
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