NOMDL edit icon at the course participants page now links to the enrolments page...
authorDavid Mudrak <david.mudrak@gmail.com>
Wed, 22 Sep 2010 16:40:53 +0000 (16:40 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Wed, 22 Sep 2010 16:40:53 +0000 (16:40 +0000)
Also note the controlling capability has changed to the one used at the
linked page.

user/index.php

index 0e9a3a0..545c857 100644 (file)
         }
         echo $OUTPUT->heading($heading, 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="'.$OUTPUT->pix_url('i/edit') . '" class="icon" alt="" /></a>';
+        if ($course->id != SITEID && has_capability('moodle/course:enrolreview', $context)) {
+            $editlink = $OUTPUT->action_icon(new moodle_url('/enrol/users.php', array('id' => $course->id)),
+                                             new pix_icon('i/edit', get_string('edit')));
         } else {
             $editlink = '';
         }