-
- Downloads
Allow admin to define the internal term representation
Before this patch, the internal representation of the terms (as they are stored in the Moodle database) was hardcoded to ST = 0 and WT = 1. This was a problem if you wanted to integrate Moodle with an external lecture management system which uses a different representation of ST = 1 and WT = 2 and wanted to fill the custom field directly with values from this external system. This patch adds an admin settings which lets the admin control how the terms are represented internally. Currently, it just has to options (ST = 0 / WT = 1 and ST = 1 / WT = 2), but the code is prepared to add additional options to the admin setting as well as add the possibility to control the internal representation of the term-independent value (which is 1 currently). This implementation does _not_ update existing field values when the setting is changed. The admin will have to consider a switch of the representation carefully.
Showing
- classes/data_controller.php 111 additions, 14 deletionsclasses/data_controller.php
- lang/de/customfield_semester.php 5 additions, 0 deletionslang/de/customfield_semester.php
- lang/en/customfield_semester.php 5 additions, 0 deletionslang/en/customfield_semester.php
- locallib.php 9 additions, 0 deletionslocallib.php
- settings.php 10 additions, 0 deletionssettings.php
- version.php 1 addition, 1 deletionversion.php
Loading
Please register or sign in to comment