MDL-73532 theme_boost: Display the course name in single activity format
The module context header will display the full name of the course when the course is using the single activity format header.
This commit is contained in:
@@ -150,13 +150,17 @@ class core_renderer extends \core_renderer {
|
||||
|
||||
$prefix = null;
|
||||
if ($context->contextlevel == CONTEXT_MODULE) {
|
||||
$heading = $this->page->cm->get_formatted_name();
|
||||
$imagedata = $this->pix_icon('icon', '', $this->page->activityname, ['class' => 'activityicon']);
|
||||
$purposeclass = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
|
||||
$purposeclass .= ' activityiconcontainer';
|
||||
$purposeclass .= ' modicon_' . $this->page->activityname;
|
||||
$imagedata = html_writer::tag('div', $imagedata, ['class' => $purposeclass]);
|
||||
$prefix = get_string('modulename', $this->page->activityname);
|
||||
if ($this->page->course->format === 'singleactivity') {
|
||||
$heading = $this->page->course->fullname;
|
||||
} else {
|
||||
$heading = $this->page->cm->get_formatted_name();
|
||||
$imagedata = $this->pix_icon('icon', '', $this->page->activityname, ['class' => 'activityicon']);
|
||||
$purposeclass = plugin_supports('mod', $this->page->activityname, FEATURE_MOD_PURPOSE);
|
||||
$purposeclass .= ' activityiconcontainer';
|
||||
$purposeclass .= ' modicon_' . $this->page->activityname;
|
||||
$imagedata = html_writer::tag('div', $imagedata, ['class' => $purposeclass]);
|
||||
$prefix = get_string('modulename', $this->page->activityname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user