Skip to content

Commit fa350fc

Browse files
committed
Tidy render override method WIP 2
1 parent aa951f7 commit fa350fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

classes/output/renderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ public function render(\renderable $widget) {
9191
// Check for special course format templatables.
9292
if ($widget instanceof \templatable) {
9393
// Templatables from both core_courseformat\output\local\* and format_xxx\output\courseformat\*
94-
// use format_multitopic/courseformat templates by default, if they exist.
94+
// use format_multitopic/courseformat templates, if they exist.
9595
$corepath = 'core_courseformat\/output\/local';
9696
$pluginpath = 'format_\w+\/output\/courseformat';
9797
$specialrenderers = '/^(?<componentpath>' . $corepath . '|' . $pluginpath . ')\/(?<template>.+)$/';
9898
$matches = null;
9999

100100
if (preg_match($specialrenderers, $fullpath, $matches)
101-
&& file_exists($CFG->dirroot . '/course/format/multitopic/templates/courseformat/' . $matches['template'])) {
101+
&& file_exists($CFG->dirroot . '/course/format/multitopic/templates/courseformat/' . $matches['template'])) { // ADDED.
102102
$data = $widget->export_for_template($this);
103103
return $this->render_from_template('format_multitopic/courseformat/' . $matches['template'], $data); // CHANGED.
104104
}

0 commit comments

Comments
 (0)