-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
-
2.4.3
-
None
-
MOODLE_24_STABLE
-
Easy
Cohorts already require unique idnumbers which is good. However, you can create x amount of cohorts each with NO idnumber. This caused a problem when running cron that said:
Running cron for enrol_cohort...
!!! Coding error detected, it must be fixed by a programmer: User ID does not exist or is deleted! !!!
Here is the easy fix:
open /cohort/edit_form.php
look for
public function definition() {
look for
$mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"');
inside that function and add
$mform->addRule('idnumber', get_string('required'), 'required', null, 'client');
below it.
This fixed it for us adding and editing cohorts but I have no idea if there is anywhere else it should be modified OR if the line I have added will break anything else...have removed it for now till you guys decide to use this fix or not...
- duplicates
-
MDL-39802 Incorrect user deletes and updates in ims enterprise auth plugin
-
- Closed
-