diff --git a/config.php b/config.php index f39a2df..90e37e0 100644 --- a/config.php +++ b/config.php @@ -52,7 +52,7 @@ $THEME->layouts = [ 'file' => 'columns2.php', 'regions' => array('side-pre'), 'defaultregion' => 'side-pre', - 'options' => array('langmenu' => true), + 'options' => array('langmenu' => true, 'courseimg' => true), ), 'coursecategory' => array( 'file' => 'columns2.php', diff --git a/layout/columns2.php b/layout/columns2.php index 80faf85..21aa1ba 100644 --- a/layout/columns2.php +++ b/layout/columns2.php @@ -37,9 +37,13 @@ if ($navdraweropen) { $extraclasses[] = 'drawer-open-left'; } $bodyattributes = $OUTPUT->body_attributes($extraclasses); + $blockshtml = $OUTPUT->blocks('side-pre'); $hasblocks = strpos($blockshtml, 'data-block=') !== false; $regionmainsettingsmenu = $OUTPUT->region_main_settings_menu(); + +$courseimg = 'http://localhost/saberes/pluginfile.php/1562711/course/overviewfiles/Cerimonial%20no%20Ambiente%20Legislativo.png'; + $templatecontext = [ 'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), 'output' => $OUTPUT, @@ -48,7 +52,8 @@ $templatecontext = [ 'bodyattributes' => $bodyattributes, 'navdraweropen' => $navdraweropen, 'regionmainsettingsmenu' => $regionmainsettingsmenu, - 'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu) + 'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu), + 'courseimg' => $courseimg ]; $templatecontext['flatnavigation'] = $PAGE->flatnav; diff --git a/templates/columns2.mustache b/templates/columns2.mustache index d85973d..47385e5 100644 --- a/templates/columns2.mustache +++ b/templates/columns2.mustache @@ -74,6 +74,14 @@
{{/hasregionmainsettingsmenu}} {{{ output.course_content_header }}} + + {{#courseimg}} + + + {{/courseimg}} + {{{ output.main_content }}} {{{ output.activity_navigation }}} {{{ output.course_content_footer }}}