Skip to content

Commit

Permalink
Merge branch 'wip-MDL-21097-m25' of git://github.com/marinaglancy/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_25_STABLE
  • Loading branch information
stronk7 committed Jun 5, 2013
2 parents e0e6015 + f9d68a1 commit ef58046
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.php
Expand Up @@ -40,6 +40,9 @@
} }
$PAGE->set_url('/', $urlparams); $PAGE->set_url('/', $urlparams);
$PAGE->set_course($SITE); $PAGE->set_course($SITE);
$PAGE->set_other_editing_capability('moodle/course:update');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');


// Prevent caching of this page to stop confusion when changing page after making AJAX changes // Prevent caching of this page to stop confusion when changing page after making AJAX changes
$PAGE->set_cacheable(false); $PAGE->set_cacheable(false);
Expand Down Expand Up @@ -89,8 +92,6 @@
} }


$PAGE->set_pagetype('site-index'); $PAGE->set_pagetype('site-index');
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
$PAGE->set_docs_path(''); $PAGE->set_docs_path('');
$PAGE->set_pagelayout('frontpage'); $PAGE->set_pagelayout('frontpage');
$editing = $PAGE->user_is_editing(); $editing = $PAGE->user_is_editing();
Expand Down Expand Up @@ -137,7 +138,7 @@


echo format_text($summarytext, $section->summaryformat, $summaryformatoptions); echo format_text($summarytext, $section->summaryformat, $summaryformatoptions);


if ($editing) { if ($editing && has_capability('moodle/course:update', $context)) {
$streditsummary = get_string('editsummary'); $streditsummary = get_string('editsummary');
echo "<a title=\"$streditsummary\" ". echo "<a title=\"$streditsummary\" ".
" href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ". " href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ".
Expand Down

0 comments on commit ef58046

Please sign in to comment.