From 3c645de43fb711178865e23604095fc9aa2295fc Mon Sep 17 00:00:00 2001 From: Vasyl Nakvasiuk Date: Tue, 19 Mar 2013 17:29:28 +0200 Subject: [PATCH] extend `xmodule.ConditionalModule` docstrings --- common/lib/xmodule/xmodule/conditional_module.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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'),