Enrol Sync: Course reinitialisation command file: Difference between revisions
Line 43: | Line 43: | ||
|- | |- | ||
|modules* | |modules* | ||
| all/ | | all/<nowiki>[+/-]</nowiki>module names list | ||
|- | |- | ||
|forum_all | |forum_all | ||
Line 58: | Line 58: | ||
|} | |} | ||
* | *<nowiki/> Mandatory columns | ||
'''Developer notes:''' some provision is given by the Moodle framework for obtaining the specific reinitialisation options a module presents. Un fortunately, this provison is NOT extensible on contributed modules y the original reinitialisation function. Developpers can add a resetlib.php file in their module directory root, defining the '$modname'_reset_course_form_definition function to help handling such suboptions. this function should return an array of reinitialisation options variables. Developpers should also define the standard '$modname'_reset_course_form_default in modname/lib.php, to match these declarations.</p> | '''Developer notes:''' some provision is given by the Moodle framework for obtaining the specific reinitialisation options a module presents. Un fortunately, this provison is NOT extensible on contributed modules y the original reinitialisation function. Developpers can add a resetlib.php file in their module directory root, defining the '$modname'_reset_course_form_definition function to help handling such suboptions. this function should return an array of reinitialisation options variables. Developpers should also define the standard '$modname'_reset_course_form_default in modname/lib.php, to match these declarations.</p> |
Revision as of 22:08, 20 December 2012
This file allows asking the "course reinitialisation tool" for massive reinitialisation of a set of courses, using several options per course. As expected in this special case, this tools WILL NOT BE PROCESSED BY CRON !
A report file is generated after execution of the test in the special sync file cabinet at the following location:
sync/reports
This file can be retrieved using the embedded file manager.
File format
The file format is a CSV file using either ';' or ',' separator. Note semicolon sep is preferred in case course names use comma as textual admitted char.
the file MUST containt a first line giving column names in:
Column name | Value |
---|---|
shortname* | Course shortname |
events* | yes/no |
logs* | yes/no |
notes* | yes/no |
grades* | items/grades/nothing |
roles* | list of 'guest admin student teacher editingteacher' |
groups* | members/groupes/nothing |
modules* | all/[+/-]module names list |
forum_all | 1/0 |
forum_subscriptions | 1/0 |
chat | 1/0 |
... | 1/0 |
- Mandatory columns
Developer notes: some provision is given by the Moodle framework for obtaining the specific reinitialisation options a module presents. Un fortunately, this provison is NOT extensible on contributed modules y the original reinitialisation function. Developpers can add a resetlib.php file in their module directory root, defining the '$modname'_reset_course_form_definition function to help handling such suboptions. this function should return an array of reinitialisation options variables. Developpers should also define the standard '$modname'_reset_course_form_default in modname/lib.php, to match these declarations.
File Sample
shortname, roles, grades, groupes, events, logs, notes, modules short321, guest admin student teacher editingteacher, grades, members, no, yes, yes, all short322, student, items, groupes, yes, yes, yes, all short323, student teacher editingteacher, grades, members, yes, no, no, -forum -chat
The third data line says : all modules but forum and chat