Select Git revision
settings.php
-
Alexander Bias authored
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.
Alexander Bias authoredBefore 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.