mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
index: use $PAGE->edit_course_allowed() instead of editcourseallowed()
$PAGE->edit_course_allowed() has been reworked and is faster/smarter than editcourseallowed(). It can also be made more specific on a per-page-type basis.
This commit is contained in:
parent
9a55125ef6
commit
f7016edcb9
1 changed files with 2 additions and 2 deletions
|
@ -259,10 +259,10 @@
|
|||
break;
|
||||
case 'right':
|
||||
// The right column
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || editcourseallowed(SITEID)) {
|
||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || $PAGE->user_allowed_editing()) {
|
||||
echo '<td style="width: '.$preferred_width_right.'px;" id="right-column">';
|
||||
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
||||
if (editcourseallowed(SITEID)) {
|
||||
if ($PAGE->user_allowed_editing()) {
|
||||
echo '<div style="text-align:center">'.update_course_icon($SITE->id).'</div>';
|
||||
echo '<br />';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue