]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10635 using the same checks for visibility of edit button on the frontpage
authorskodak <skodak>
Sun, 26 Aug 2007 16:03:09 +0000 (16:03 +0000)
committerskodak <skodak>
Sun, 26 Aug 2007 16:03:09 +0000 (16:03 +0000)
index.php

index 161318bfd16994176c4ada7f30e29d276c569b26..de0dad8da58e9f8768da70968ced7db926800839 100644 (file)
--- a/index.php
+++ b/index.php
             break;
             case 'right':
     // The right column
-    if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, SITEID))) {
+    if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || editcourseallowed(SITEID)) {
         echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
         if (!empty($THEME->customcorners)) print_custom_corners_start();
-        if (has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, SITEID))) {
+        if (editcourseallowed(SITEID)) {
             echo '<div style="text-align:center">'.update_course_icon($SITE->id).'</div>';
             echo '<br />';
         }