Browse Source

Início de ajustes para inclusão de imagens na página do curso

MOODLE_36_STABLE
Matheus Garcia 6 years ago
parent
commit
01715a5e59
  1. 2
      config.php
  2. 7
      layout/columns2.php
  3. 8
      templates/columns2.mustache

2
config.php

@ -52,7 +52,7 @@ $THEME->layouts = [
'file' => 'columns2.php', 'file' => 'columns2.php',
'regions' => array('side-pre'), 'regions' => array('side-pre'),
'defaultregion' => 'side-pre', 'defaultregion' => 'side-pre',
'options' => array('langmenu' => true), 'options' => array('langmenu' => true, 'courseimg' => true),
), ),
'coursecategory' => array( 'coursecategory' => array(
'file' => 'columns2.php', 'file' => 'columns2.php',

7
layout/columns2.php

@ -37,9 +37,13 @@ if ($navdraweropen) {
$extraclasses[] = 'drawer-open-left'; $extraclasses[] = 'drawer-open-left';
} }
$bodyattributes = $OUTPUT->body_attributes($extraclasses); $bodyattributes = $OUTPUT->body_attributes($extraclasses);
$blockshtml = $OUTPUT->blocks('side-pre'); $blockshtml = $OUTPUT->blocks('side-pre');
$hasblocks = strpos($blockshtml, 'data-block=') !== false; $hasblocks = strpos($blockshtml, 'data-block=') !== false;
$regionmainsettingsmenu = $OUTPUT->region_main_settings_menu(); $regionmainsettingsmenu = $OUTPUT->region_main_settings_menu();
$courseimg = 'http://localhost/saberes/pluginfile.php/1562711/course/overviewfiles/Cerimonial%20no%20Ambiente%20Legislativo.png';
$templatecontext = [ $templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]), 'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT, 'output' => $OUTPUT,
@ -48,7 +52,8 @@ $templatecontext = [
'bodyattributes' => $bodyattributes, 'bodyattributes' => $bodyattributes,
'navdraweropen' => $navdraweropen, 'navdraweropen' => $navdraweropen,
'regionmainsettingsmenu' => $regionmainsettingsmenu, 'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu) 'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
'courseimg' => $courseimg
]; ];
$templatecontext['flatnavigation'] = $PAGE->flatnav; $templatecontext['flatnavigation'] = $PAGE->flatnav;

8
templates/columns2.mustache

@ -74,6 +74,14 @@
<div class="region_main_settings_menu_proxy"></div> <div class="region_main_settings_menu_proxy"></div>
{{/hasregionmainsettingsmenu}} {{/hasregionmainsettingsmenu}}
{{{ output.course_content_header }}} {{{ output.course_content_header }}}
{{#courseimg}}
<!--<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}di
sabled{{/disabled}}
{{{optionattributes}}}>{{{text}}}</option>-->
<img width='100%' src='{{{ courseimg }}}'/>
{{/courseimg}}
{{{ output.main_content }}} {{{ output.main_content }}}
{{{ output.activity_navigation }}} {{{ output.activity_navigation }}}
{{{ output.course_content_footer }}} {{{ output.course_content_footer }}}

Loading…
Cancel
Save