mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'w28_MDL-8249_m24_roletranslations' of git://github.com/skodak/moodle
Conflicts: lib/db/upgrade.php version.php
This commit is contained in:
commit
e1980f8bb9
37 changed files with 631 additions and 422 deletions
|
@ -268,15 +268,10 @@ class course_edit_form extends moodleform {
|
|||
$mform->addHelpButton('rolerenaming', 'rolerenaming');
|
||||
|
||||
if ($roles = get_all_roles()) {
|
||||
if ($coursecontext) {
|
||||
$roles = role_fix_names($roles, $coursecontext, ROLENAME_ALIAS_RAW);
|
||||
}
|
||||
$roles = role_fix_names($roles, null, ROLENAME_ORIGINAL);
|
||||
$assignableroles = get_roles_for_contextlevels(CONTEXT_COURSE);
|
||||
foreach ($roles as $role) {
|
||||
$mform->addElement('text', 'role_'.$role->id, get_string('yourwordforx', '', $role->name));
|
||||
if (isset($role->localname)) {
|
||||
$mform->setDefault('role_'.$role->id, $role->localname);
|
||||
}
|
||||
$mform->addElement('text', 'role_'.$role->id, get_string('yourwordforx', '', $role->localname));
|
||||
$mform->setType('role_'.$role->id, PARAM_TEXT);
|
||||
if (!in_array($role->id, $assignableroles)) {
|
||||
$mform->setAdvanced('role_'.$role->id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue