tool:sync:files:coursereset
Table des matières
Tool sync: Bulk course reset file format
Introduction
This file drives the reset of several courses. It is not tied to a scheduled task.
| Field | Value | |
|---|---|---|
| shortname | Course short name | Mandatory |
| events | 'yes' or 'no' | Mandatory |
| logs | 'yes' or 'no' | Mandatory |
| notes | 'yes' or 'no' | Mandatory |
| grades | one of ('items', 'grades', 'nothing') | Mandatory |
| roles | a list among ('guest', 'admin', 'student', 'teacher', 'editingteacher', …) or 'all' | Mandatory |
| local_roles | whether local role assignments (outside enrolment) must be removed or not. 0 or 1 | Mandatory |
| groups | one of ('members', 'groups', 'nothing') | Mandatory |
| groupings | one of ('all', 'members', 'groups', 'nothing') | Mandatory |
| modules | all: all the modules, otherwise a succession of module names separated by spaces, with the possibility of selecting by exclusion (see example) | Mandatory |
| forum_all | 1 or 0 | Optional |
| forum_subscriptions | 1 or 0 | Optional |
| chat | 1 or 0 | Optional |
| … | 1 or 0 | Optional |
Note to the developer
By creating a resetlib.php file at the root of your modules and writing the '$modname'_reset_course_form_definition function returning an array of reset variables, you can make your module compatible with this script. Also remember to complete the '$modname'_reset_course_form_default functions in your module's lib.php.
Example document for the reset
- shortname, roles, grades, groups, 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 last line corresponds to: All modules except the forum and the chat.
tool/sync/files/coursereset.txt · Dernière modification : de 127.0.0.1
