Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33388

CANVAS theme uses wrong layout for default in $THEME->layouts = array(...) in config.php

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Deferred
    • 2.0.8, 2.1, 2.2, 2.3
    • None
    • Themes
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE

    Description

      In CANVAS theme, and all other themes using Canvas as a PARENT, the layout for 'default' is wrong.

      If you look at BASE theme it gives the 'default' layout as:

      $THEME->layouts = array(
          // Most backwards compatible layout without the blocks - 
             this is the layout used by default
          'base' => array(
              'file' => 'default.php',
              'regions' => array(),
          ),

      However, if you compare this with CANVAS theme you can see the difference:

      $THEME->layouts = array(
          'base' => array(
              'file' => 'general.php',
              'regions' => array('side-pre', 'side-post'),
              'defaultregion' => 'side-post',
          ),

      In BASE there are NO regions or default regions declared, whereas in CANVAS there are.

      It is hard to understand why this has come about, as the default layout in BASE states clearly:

      Most backwards compatible layout without the blocks -
      this is the layout used by default

      So it looks very much like this has been an oversight from the very beginning of Moodle 2.0 themes!

      I am just wondering if it is this change of layout in Canvas that has been bugging Moodle all this time without detection, causing problems where problems should not arise? Making pages works differently for no apparent reason? One problem comes to mind when all blocks are docked, so that by default in BASE it would be no blocks, yet in Canvas, Moodle would still be looking for block regions, and may even be giving out wrong variables and confusing Moodle? Scary!

      Attachments

        Issue Links

          Activity

            People

              lazydaisy Mary Evans
              lazydaisy Mary Evans
              Huong Nguyen, Bas Brands, Mathew May
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: