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:
Dan Poltawski 2012-07-10 09:43:23 +08:00
commit e1980f8bb9
37 changed files with 631 additions and 422 deletions

View file

@ -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');

View file

@ -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