]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13300 Adds verbosity to the heading above the list of participants, showing which...
authornicolasconnault <nicolasconnault>
Thu, 13 Mar 2008 12:13:26 +0000 (12:13 +0000)
committernicolasconnault <nicolasconnault>
Thu, 13 Mar 2008 12:13:26 +0000 (12:13 +0000)
lang/en_utf8/role.php
user/index.php

index ad296ca3d5d7491b5f19573b8138fa979d3f964d..7f2e9c4a0eacabbad2ac438ce849c8336b84ebc3 100644 (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';
index b6df199baeeb62a998f8aacf8ba8969e8ba08a32..7a9aeca35df52280ddd614760ef02204ba1c02e2 100644 (file)
         }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>';