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

Observe empty defaultblocks configuration values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.6, 3.1.2, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide

      Course creation

      1. Set $CFG->defaultblocks_override to empty string
      2. Create a course
      3. Confirm that the course was created with no blocks and that no debug messages were thrown.
      4. Repeat with:
        • $CFG->defaultblocks
        • A course format specific one, e.g. $CFG->defaultblocks_topics (ensure the default course format matches this before creating the course)

      Site creation

      1. Set $CFG->defaultblocks_site to empty string
      2. Drop database and reinstall
      3. Confirm that there are no blocks on the site home page
      Show
      Course creation Set $CFG->defaultblocks_override to empty string Create a course Confirm that the course was created with no blocks and that no debug messages were thrown. Repeat with: $CFG->defaultblocks A course format specific one, e.g. $CFG->defaultblocks_topics (ensure the default course format matches this before creating the course) Site creation Set $CFG->defaultblocks_site to empty string Drop database and reinstall Confirm that there are no blocks on the site home page
    • Workaround:
      Hide

      Use one or more spaces.

      Show
      Use one or more spaces.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:

      Description

      There is a peculiarity in the defaultblocks settings in config.php where setting them to an empty string, with the intention of having no default blocks, doesn't work. As pointed out in MDL-18203, you can use a space to force no default blocks, and Moodle works perfectly well, but this is very counter-intuitive (and undocumented).

      It would be good if empty strings were treated as "no default blocks" rather than ignored.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16