]> git.mjollnir.org Git - moodle.git/commitdiff
merged fix for MDL-7115, teacher page replaced by generic role assign page
authortoyomoyo <toyomoyo>
Fri, 20 Oct 2006 05:49:05 +0000 (05:49 +0000)
committertoyomoyo <toyomoyo>
Fri, 20 Oct 2006 05:49:05 +0000 (05:49 +0000)
course/category.php

index cfb92288352d849b08a4dfb9074ca3b87047dbc1..f299f8789bd67819366cba657f7fed9f015bf1c7 100644 (file)
                     echo '<a title="'.$strsettings.'" href="'.$CFG->wwwroot.'/course/edit.php?id='.
                          $acourse->id.'">'.
                          '<img src="'.$CFG->pixpath.'/t/edit.gif" height="11" width="11" border="0" alt="'.$stredit.'" /></a> ';
-                    echo '<a title="'.$strassignteachers.'" href="'.$CFG->wwwroot.'/course/teacher.php?id='.
-                         $acourse->id.'">'.
-                         '<img src="'.$CFG->pixpath.'/t/user.gif" height="11" width="11" border="0" alt="'.$strassignteachers.'" /></a> ';
+                    // role assignment link     
+                    if (has_capability('moodle/role:assign', $context)) { 
+                        echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id.'"><img src="'.$CFG->pixpath.'/i/roles.gif" height="11" width="11" alt="'.get_string('assignroles', 'role').'" /></a>';
+                    }                       
+                         
                     if (has_capability('moodle/course:delete', $context)) {
                         echo '<a title="'.$strdelete.'" href="delete.php?id='.$acourse->id.'">'.
                              '<img src="'.$CFG->pixpath.'/t/delete.gif" height="11" width="11" border="0" alt="'.$strdelete.'" /></a> ';