-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.2, 3.9.3, 3.10
-
MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_39_STABLE
-
MOODLE_311_STABLE
-
MDL-63683-master -
Reproduction steps
- Ensure debug mode is on
- Browse to: Site administration > Users > Permissions > Define roles
- Edit the student role (click the cog)
- Change the role archetype to "Teacher (editing)
- Go back to the main site administration page - you should see a bunch of errors
The issues seems to be that many enrolment plugins have this in their settings.php:
$student = get_archetype_roles('student');
|
$student = reset($student);
|
$settings->add(new admin_setting_configselect_with_advanced('enrol_mnet/roleid', get_string('defaultrole', 'role'), '', array('value'=>$student->id, 'adv'=>true), $options));
|
When no role has the student archetype, then $student is not an object and $student->id fails.
- is duplicated by
-
MDL-67614 Enrol plugins use student role but this may not exist
-
- Closed
-