]> git.mjollnir.org Git - moodle.git/commitdiff
changed to get_recordset_sql because get_records forces the first element to be$
authortoyomoyo <toyomoyo>
Mon, 19 Nov 2007 04:13:15 +0000 (04:13 +0000)
committertoyomoyo <toyomoyo>
Mon, 19 Nov 2007 04:13:15 +0000 (04:13 +0000)
user/index.php

index e137056f974c54c7a6c044b3acdae8836af0198c..fcc43594b0dfd383d52dc7473f6ff27793b6dd3e 100644 (file)
             error('That role does not exist');
         }
         $a->number = $totalcount;
-        $a->role = $currentrole->name;
+        // MDL-12217, use course specific rolename
+        if (isset($rolenames[$currentrole->id])){
+            $a->role = $rolenames[$currentrole->id];
+        }else{                
+            $a->role = $currentrole->name;//safety net
+        }
         $heading = format_string(get_string('xuserswiththerole', 'role', $a));
         if (user_can_assign($context, $roleid)) {
             $heading .= ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?roleid='.$roleid.'&amp;contextid='.$context->id.'">';