mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
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:
parent
1a744030d6
commit
cc94ab171d
@ -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,
|
||||
];
|
||||
|
@ -61,6 +61,9 @@
|
||||
</section>
|
||||
{{/hasfakeblocks}}
|
||||
<section class="embedded-main">
|
||||
{{#headercontent}}
|
||||
{{> core/activity_header }}
|
||||
{{/headercontent}}
|
||||
{{{ output.main_content }}}
|
||||
</section>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user