From 01715a5e59bd5d5337b067ee8bb2bae7a23a87a2 Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Thu, 30 May 2019 11:28:57 -0300 Subject: [PATCH] =?UTF-8?q?In=C3=ADcio=20de=20ajustes=20para=20inclus?= =?UTF-8?q?=C3=A3o=20de=20imagens=20na=20p=C3=A1gina=20do=20curso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.php | 2 +- layout/columns2.php | 7 ++++++- templates/columns2.mustache | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) 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 }}}