mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +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
|
@ -64,22 +64,13 @@
|
|||
|
||||
$rolenamesurl = new moodle_url("$CFG->wwwroot/user/index.php?contextid=$context->id&sifirst=&silast=");
|
||||
|
||||
$allroles = get_all_roles();
|
||||
$roles = get_profile_roles($context);
|
||||
$allrolenames = array();
|
||||
$rolenames = role_fix_names(get_profile_roles($context), $context, ROLENAME_ALIAS, true);
|
||||
if ($isfrontpage) {
|
||||
$rolenames = array(0=>get_string('allsiteusers', 'role'));
|
||||
} else {
|
||||
$rolenames = array(0=>get_string('allparticipants'));
|
||||
}
|
||||
|
||||
foreach ($allroles as $role) {
|
||||
$allrolenames[$role->id] = strip_tags(role_get_name($role, $context)); // Used in menus etc later on
|
||||
if (isset($roles[$role->id])) {
|
||||
$rolenames[$role->id] = $allrolenames[$role->id];
|
||||
}
|
||||
}
|
||||
|
||||
// make sure other roles may not be selected by any means
|
||||
if (empty($rolenames[$roleid])) {
|
||||
print_error('noparticipants');
|
||||
|
|
|
@ -822,7 +822,7 @@ class group_non_members_selector extends groups_user_selector_base {
|
|||
|
||||
// Build the SQL
|
||||
list($enrolsql, $enrolparams) = get_enrolled_sql($context);
|
||||
$fields = "SELECT r.id AS roleid, r.shortname AS roleshortname, r.name AS rolename, u.id AS userid,
|
||||
$fields = "SELECT r.id AS roleid, u.id AS userid,
|
||||
" . $this->required_fields_sql('u') . ",
|
||||
(SELECT count(igm.groupid)
|
||||
FROM {groups_members} igm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue