MDL-10635 using the same checks for visibility of edit button on the frontpage

This commit is contained in:
skodak
2007-08-26 16:03:09 +00:00
parent b286b86097
commit 5cfbec3f01
+2 -2
View File
@@ -254,10 +254,10 @@
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 />';
}