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

Setting Theme-Priority with $CFG->themeorder does not work correctly

    Details

    • Testing Instructions:
      Hide
      1. In config php set: $CFG->themeorder = array('course', 'category', 'session', 'user', 'site');
      2. Go To Admin > Appearance > Themes > Theme Settings
      3. Enable user themes and course themes
      4. Go to your user profile and edit your theme to be anonomoly
      5. Verify theme is is changed to anomoly on all pages
      6. Create a course and set the theme to splash
      7. Verify theme is changed to splash
      8. Change your config.php to:
        $CFG->themeorder = array('user', 'course', 'category', 'session', 'site');
      9. Verify that the theme visible in the course is now anomoly not splash.
      Show
      In config php set: $CFG->themeorder = array('course', 'category', 'session', 'user', 'site'); Go To Admin > Appearance > Themes > Theme Settings Enable user themes and course themes Go to your user profile and edit your theme to be anonomoly Verify theme is is changed to anomoly on all pages Create a course and set the theme to splash Verify theme is changed to splash Change your config.php to: $CFG->themeorder = array('user', 'course', 'category', 'session', 'site'); Verify that the theme visible in the course is now anomoly not splash.
    • Workaround:
      Hide

      None

      Show
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:

      Description

      When using $CFG->themeorder = array('session', 'course', 'category', 'user', 'site'); Moodle will take the site-Theme before the course-Theme because of missing "break" in the switch-case Block of the function resolve_theme() in lib/pagelib.php.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12