extend xmodule.ConditionalModule docstrings

This commit is contained in:
Vasyl Nakvasiuk
2013-03-19 17:29:28 +02:00
parent 07b3db97a2
commit 3c645de43f

View File

@@ -39,6 +39,22 @@ class ConditionalModule(ConditionalFields, XModule):
attempted - map to `is_attempted` module method
poll_answer - map to `poll_answer` module attribute
voted - map to `voted` module attribute
<show> tag attributes:
sources - location id of required modules, separated by ';'
You can add you own rules for <conditional> tag, like
"completed", "attempted" etc. To do that yo must extend
`ConditionalModule.conditions_map` variable and add pair:
my_attr: my_property/my_method
After that you can use it:
<conditional my_attr="some value" ...>
...
</conditional>
And my_property/my_method will be called for required modules.
"""
js = {'coffee': [resource_string(__name__, 'js/src/javascript_loader.coffee'),