MDL-13300 Adds verbosity to the heading above the list of participants, showing which group is selected, and the inactivity time period, if either of these two filters are used

This commit is contained in:
nicolasconnault 2008-03-13 12:13:26 +00:00
parent f152be5f38
commit f642a21aad
2 changed files with 18 additions and 2 deletions

View File

@ -167,7 +167,9 @@ $string['user:viewdetails'] = 'View user profiles';
$string['user:viewhiddendetails'] = 'View hidden details of users';
$string['user:viewuseractivitiesreport'] = 'See user activity reports';
$string['viewrole'] = 'View role details';
$string['xuserswiththerole'] = 'Users with the role \"$a->role\": $a->number';
$string['xuserswiththerole'] = 'Users with the role \"$a->role\"';
$string['ingroup'] = 'in the group \"$a->group\"';
$string['inactiveformorethan'] = 'inactive for more than $a->timeperiod';
// MNET
$string['site:mnetlogintoremote'] = 'Roam to a remote Moodle';

View File

@ -508,7 +508,21 @@
}else{
$a->role = $currentrole->name;//safety net
}
$heading = format_string(get_string('xuserswiththerole', 'role', $a));
$heading = format_string(get_string('xuserswiththerole', 'role', $a));
if ($currentgroup and $group) {
$a->group = $group->name;
$heading .= ' ' . format_string(get_string('ingroup', 'role', $a));
}
if ($accesssince) {
$a->timeperiod = $timeoptions[$accesssince];
$heading .= ' ' . format_string(get_string('inactiveformorethan', 'role', $a));
}
$heading .= ": $a->number";
if (user_can_assign($context, $roleid)) {
$heading .= ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';
$heading .= '<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" /></a>';