Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45506 Add a theme based custom menu to frontpage of More theme
  3. MDL-45507

Fix regression for theme based custom menu in Bootstrapbase core_renderer

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.6, 2.6.3, 2.7
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      Note to Tester: This test requires that you have some menu items in the Site Administration > Appearance > Themes > Themes settings page.

      1. Open theme/clean/settings.php and add the following setting.

        // Theme overrides custom menu setting...
        $name = 'theme_clean/custommenuitems';
        $title = get_string('custommenuitems', 'admin');
        $description = get_string('configcustommenuitems', 'admin');
        $default = '';
        $setting = new admin_setting_configtextarea($name, $title, $description, $default);
        $setting->set_updatedcallback('theme_reset_all_caches');
        $settings->add($setting);
        

      2. Replace theme/clean/layout/columns3.php with the attached columns3.php file.
      3. Open clean theme's custom setting page found in Site Administration > Appearance > Themes > Clean
      4. Notice there is now a Custom Menu input box that allows for a theme based menu which, in this test, will only show up on the pages that use this three column page (e.g.frontpage, course pages) instead of the normal menu found in the top navbar.
      5. Add the following menu setting into this new Custom menu box...

        MDL-45507|https://tracker.moodle.org/browse/MDL-45507|Just testing 
        

      6. Save above settings.
      7. If not already selected change to Clean theme, and go to Notifications, and assuming that you have some normal menu settings, TEST that the normal menu is present on that page.
      8. Now go to Home page and TEST that the only link in the top menu is the one you just added in the theme custom settings. TEST this is true for Course pages too.
      9. Remove the Custom menu item you added in No.5 above.
      10. Go to the Home page and confirm that the top menu has reverted back to the normal menu for the site.
      Show
      Note to Tester: This test requires that you have some menu items in the Site Administration > Appearance > Themes > Themes settings page. Open theme/clean/settings.php and add the following setting. // Theme overrides custom menu setting... $name = 'theme_clean/custommenuitems'; $title = get_string('custommenuitems', 'admin'); $description = get_string('configcustommenuitems', 'admin'); $default = ''; $setting = new admin_setting_configtextarea($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $settings->add($setting); Replace theme/clean/layout/columns3.php with the attached columns3.php file. Open clean theme's custom setting page found in Site Administration > Appearance > Themes > Clean Notice there is now a Custom Menu input box that allows for a theme based menu which, in this test, will only show up on the pages that use this three column page (e.g.frontpage, course pages) instead of the normal menu found in the top navbar. Add the following menu setting into this new Custom menu box... MDL-45507|https://tracker.moodle.org/browse/MDL-45507|Just testing Save above settings. If not already selected change to Clean theme, and go to Notifications, and assuming that you have some normal menu settings, TEST that the normal menu is present on that page. Now go to Home page and TEST that the only link in the top menu is the one you just added in the theme custom settings. TEST this is true for Course pages too. Remove the Custom menu item you added in No.5 above. Go to the Home page and confirm that the top menu has reverted back to the normal menu for the site.
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      wip-MDL-45507_master

      Description

      See MDL-45506 description.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14