mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
merged fix added "new role" in the drop down
This commit is contained in:
parent
e9d39a3215
commit
25a0f2d8dc
1 changed files with 3 additions and 3 deletions
|
@ -439,7 +439,7 @@ if ($info->backup_moodle_version < 2006092801) {
|
||||||
$roles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
$roles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
||||||
|
|
||||||
$editteacher = array_shift($roles);
|
$editteacher = array_shift($roles);
|
||||||
choose_from_menu ($siterolesarray, "defaultteacheredit", $editteacher->id);
|
choose_from_menu ($siterolesarray, "defaultteacheredit", $editteacher->id, 'new role', '', '0');
|
||||||
echo ('</td></tr>');
|
echo ('</td></tr>');
|
||||||
|
|
||||||
/// Non-editting teacher
|
/// Non-editting teacher
|
||||||
|
@ -451,7 +451,7 @@ if ($info->backup_moodle_version < 2006092801) {
|
||||||
$roles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
$roles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
||||||
$teacher = array_shift($roles);
|
$teacher = array_shift($roles);
|
||||||
|
|
||||||
choose_from_menu ($siterolesarray, "defaultteacher", $teacher->id);
|
choose_from_menu ($siterolesarray, "defaultteacher", $teacher->id, 'new role', '', '0');
|
||||||
echo ('</td></tr>');
|
echo ('</td></tr>');
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ if ($info->backup_moodle_version < 2006092801) {
|
||||||
$roles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
$roles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM, SITEID));
|
||||||
$studentrole = array_shift($roles);
|
$studentrole = array_shift($roles);
|
||||||
|
|
||||||
choose_from_menu ($siterolesarray, "defaultstudent", $studentrole->id);
|
choose_from_menu ($siterolesarray, "defaultstudent", $studentrole->id, 'new role', '', '0');
|
||||||
echo ('</td></tr>');
|
echo ('</td></tr>');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue