]> git.mjollnir.org Git - moodle.git/commitdiff
Merged link to role assign screen from 1.9
authormoodler <moodler>
Fri, 29 Feb 2008 04:30:27 +0000 (04:30 +0000)
committermoodler <moodler>
Fri, 29 Feb 2008 04:30:27 +0000 (04:30 +0000)
user/index.php

index 01310616d0c697cd8a122a6895c50f34ffed38c9..b6df199baeeb62a998f8aacf8ba8969e8ba08a32 100644 (file)
         }
         print_heading($heading, 'center', 3);
     } else {
+        if ($course->id !== SITEID && has_capability('moodle/role:assign', $context)) {
+            $editlink  = ' <a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'">';
+            $editlink .= '<img src="'.$CFG->pixpath.'/i/edit.gif" class="icon" alt="" /></a>';
+        } else {
+            $editlink = '';
+        }
         if ($matchcount < $totalcount) {
-            print_heading(get_string('allparticipants').': '.$matchcount.'/'.$totalcount, '', 3);
+            print_heading(get_string('allparticipants').': '.$matchcount.'/'.$totalcount . $editlink, '', 3);
         } else {
-            print_heading(get_string('allparticipants').': '.$matchcount, '', 3);
+            print_heading(get_string('allparticipants').': '.$matchcount . $editlink, '', 3);
         }
     }