MDL-74602 theme_boost: fix missing activity header in embedded layout

The activity header, which includes things like dates and completion
information, was moved out of the page $OUTPUT and into a separate
template context variable in 4.0, meaning it was missing from any layout
which didn't actively add it back to the page output. This fixes this
problem for the embedded layout only by adding support for the activity
header in the embedded template.
This commit is contained in:
Jake Dallimore 2022-05-03 09:53:57 +08:00
parent 1a744030d6
commit cc94ab171d
2 changed files with 5 additions and 0 deletions

View File

@ -26,9 +26,11 @@ defined('MOODLE_INTERNAL') || die();
$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,
];

View File

@ -61,6 +61,9 @@
</section>
{{/hasfakeblocks}}
<section class="embedded-main">
{{#headercontent}}
{{> core/activity_header }}
{{/headercontent}}
{{{ output.main_content }}}
</section>
</div>