Skip to content

Commit

Permalink
Merge branch 'MDL-74602-master' of https://github.com/snake/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed May 5, 2022
2 parents 96ffb21 + db93333 commit 93e96e0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions mod/assign/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4756,6 +4756,8 @@ protected function view_grader() {
// Need submit permission to submit an assignment.
$this->require_view_grades();

$PAGE->activityheader->disable();

$PAGE->set_pagelayout('embedded');

$courseshortname = $this->get_context()->get_course_context()->get_context_name(false, true);
Expand Down
3 changes: 2 additions & 1 deletion mod/book/tool/print/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

$PAGE->set_url('/mod/book/print.php', array('id' => $id, 'chapterid' => $chapterid));

$PAGE->activityheader->disable();
$PAGE->set_pagelayout("embedded");

unset($id);
Expand Down Expand Up @@ -93,4 +94,4 @@
echo $renderer->render($page);

// Finish page output.
echo $OUTPUT->footer();
echo $OUTPUT->footer();
1 change: 1 addition & 0 deletions mod/chat/gui_ajax/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

$PAGE->set_title(get_string('modulename', 'chat').": $courseshortname: ".format_string($chat->name, true)."$groupname");
$PAGE->add_body_class('yui-skin-sam');
$PAGE->activityheader->disable();
$PAGE->set_pagelayout('embedded');
if ( $theme != 'course_theme') {
$PAGE->requires->css('/mod/chat/gui_ajax/theme/'.$theme.'/chat.css');
Expand Down
1 change: 1 addition & 0 deletions mod/wiki/pagelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2261,6 +2261,7 @@ class page_wiki_prettyview extends page_wiki {
function __construct($wiki, $subwiki, $cm) {
global $PAGE;
$PAGE->set_pagelayout('embedded');
$PAGE->activityheader->disable();
parent::__construct($wiki, $subwiki, $cm);
}

Expand Down
2 changes: 2 additions & 0 deletions theme/boost/layout/embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

$fakeblockshtml = $OUTPUT->blocks('side-pre', array(), 'aside', true);
$hasfakeblocks = strpos($fakeblockshtml, 'data-block="_fake"') !== false;
$renderer = $PAGE->get_renderer('core');

$templatecontext = [
'output' => $OUTPUT,
'headercontent' => $PAGE->activityheader->export_for_template($renderer),
'hasfakeblocks' => $hasfakeblocks,
'fakeblocks' => $fakeblockshtml,
];
Expand Down
3 changes: 3 additions & 0 deletions theme/boost/templates/embedded.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
</section>
{{/hasfakeblocks}}
<section class="embedded-main">
{{#headercontent}}
{{> core/activity_header }}
{{/headercontent}}
{{{ output.main_content }}}
</section>
</div>
Expand Down

0 comments on commit 93e96e0

Please sign in to comment.