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
63ecc64d
Commit
63ecc64d
authored
Mar 18, 2013
by
Vasyl Nakvasiuk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conditional_module.rst done
parent
911c3845
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
14 deletions
+38
-14
doc/public/course_data_formats/conditional_module/conditional_module.rst
+38
-14
No files found.
doc/public/course_data_formats/conditional_module/conditional_module.rst
View file @
63ecc64d
...
...
@@ -7,7 +7,9 @@ Xml format of conditional module [xmodule]
Format description
==================
The main tag of Conditional module input is::
The main tag of Conditional module input is:
.. code-block:: xml
<conditional>
...
</conditional>
...
...
@@ -20,7 +22,7 @@ The main container for a single instance of Conditional module. The following at
be specified for this tag::
sources - location id of required modules, separated by ';'
message - message for case, where one o
f conditions not passed
.
message - message for case, where one o
r more are not passed. Here you can use variable {link}, which generate link to required module
.
completed - map to `is_completed` module method
attempted - map to `is_attempted` module method
...
...
@@ -30,25 +32,46 @@ be specified for this tag::
show tag
--------
Like unix s
ymlink to some set of xmodules. The following attributes can
S
ymlink to some set of xmodules. The following attributes can
be specified for this tag::
sources - location id of
required
modules, separated by ';'
sources - location id of modules, separated by ';'
Example
=======
Examples of draggables that can't be reused
Examples of conditional depends on poll
-------------------------------------------
.. code-block:: xml
<conditional
sources=
"i4x://MITx/0.000x/poll_question/first_real_poll_seq_with_reset"
poll_answer=
"man"
message=
"{link} must be answered for this to become visible."
>
<html>
<h2>
You see this, cause your vote value for "First question" was "man"
</h2>
</html>
</conditional>
Examples of conditional depends on poll (use
<show>
tag)
-------------------------------------------
.. code-block:: xml
<conditional
sources=
"i4x://MITx/0.000x/poll_question/first_real_poll_seq_with_reset"
poll_answer=
"man"
message=
"{link} must be answered for this to become visible."
>
<html>
<show
sources=
"i4x://MITx/0.000x/problem/test_1; i4x://MITx/0.000x/Video/Avi_resources; i4x://MITx/0.000x/problem/test_1"
/>
</html>
</conditional>
Examples of conditional depends on problem
-------------------------------------------
.. code-block:: xml
<conditional
sources=
"i4x://MITx/0.000x/poll_question/first_real_poll_seq_with_reset"
poll_answer=
"man"
message=
"{link} must be answered for this to become visible."
>
<html>
<h2>
You see this, cause your vote value for "First question" was "man"
</h2>
<h2>
Code example:
</h2>
<pre
style=
"border: 1px solid; padding: 10px;"
>
</pre>
</html>
</conditional>
<conditional
sources=
"i4x://MITx/0.000x/problem/Conditional:lec27_Q1"
attempted=
"True"
>
<html
display_name=
"HTML for attempted problem"
>
You see this, cause "lec27_Q1" is attempted.
</html>
</conditional>
<conditional
sources=
"i4x://MITx/0.000x/problem/Conditional:lec27_Q1"
attempted=
"False"
>
<html
display_name=
"HTML for not attempted problem"
>
You see this, cause "lec27_Q1" is not attempted.
</html>
</conditional>
\ No newline at end of file
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