diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index f011568b69..b3e0e0e06b 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -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 + + tag attributes: + sources - location id of required modules, separated by ';' + + You can add you own rules for 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: + + ... + + + And my_property/my_method will be called for required modules. + """ js = {'coffee': [resource_string(__name__, 'js/src/javascript_loader.coffee'),