Adds a split_test_module XModule, that can choose one of its children
to display, based on a get_condition_for_user API added to the runtime.
To test, add something like this to an xml course, or make equivalent
tweaks in mongo.
<vertical url_name="split_test_vert">
<split_test url_name="split1" experiment_id="0" condition_id_to_child='{"0": "i4x://MITx/6.00x/html/split_test_cond0", "1": "i4x://MITx/6.00x/html/split_test_cond1"}'>
<html url_name="split_test_cond0">condition 0</html>
<html url_name="split_test_cond1">condition 1</html>
</split_test>
</vertical>
Also needs an experiment configured in the course policy json: e.g.
"user_partitions": [{"id": 0,
"name": "Experiment 0",
"description": "Unicorns?",
"version": 1,
"groups": [{"id": 0,
"name": "group 0",
"version": 1},
{"id": 1,
"name": "group 1",
"version": 1}]}]
(This particular snippet will work inside a course with org MITx
and course name 6.00x)
Co-Author: Sarina Canelake <sarina@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Diana Huang <diana@edx.org>
Co-Author: Calen Pennington <cale@edx.org>
[LMS-2095]
| Name |
Last commit
|
Last update |
|---|---|---|
| .tx | Loading commit data... | |
| cms | Loading commit data... | |
| common | Loading commit data... | |
| conf/locale | Loading commit data... | |
| docs | Loading commit data... | |
| i18n | Loading commit data... | |
| jenkins | Loading commit data... | |
| lms | Loading commit data... | |
| proxy | Loading commit data... | |
| rakelib | Loading commit data... | |
| requirements | Loading commit data... | |
| scripts | Loading commit data... | |
| test_root | Loading commit data... | |
| ws_migrations | Loading commit data... | |
| .gitattributes | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .pep8 | Loading commit data... | |
| .reviewboardrc | Loading commit data... | |
| .ruby-gemset | Loading commit data... | |
| .ruby-version | Loading commit data... | |
| AUTHORS | Loading commit data... | |
| Brewfile | Loading commit data... | |
| CHANGELOG.rst | Loading commit data... | |
| CONTRIBUTING.rst | Loading commit data... | |
| Gemfile | Loading commit data... | |
| Gemfile.lock | Loading commit data... | |
| LICENSE | Loading commit data... | |
| README.md | Loading commit data... | |
| manage.py | Loading commit data... | |
| mongo_indexes.md | Loading commit data... | |
| package.json | Loading commit data... | |
| pylintrc | Loading commit data... | |
| rakefile | Loading commit data... | |
| setup.cfg | Loading commit data... | |
| setup.py | Loading commit data... |