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

Theme defaults to standard when course theme missing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.3
    • Fix Version/s: 2.4.1
    • Component/s: Themes
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      To test the patch:

      • Enable course themes
      • Install two themes, A and B
      • Set theme A as the server default
      • Set a course to use theme B
      • Uninstall theme B
      • View the course - it should be using theme A
      Show
      To test the patch: Enable course themes Install two themes, A and B Set theme A as the server default Set a course to use theme B Uninstall theme B View the course - it should be using theme A
    • Workaround:
      Hide

      There are two reasonable workarounds for this:

      1. For an individual course, force the theme to one of the enabled ones, save, then change again to "do not force"
      2. For an entire server, remove entries from the theme column in the course table where the theme does not exist on the server
      Show
      There are two reasonable workarounds for this: For an individual course, force the theme to one of the enabled ones, save, then change again to "do not force" For an entire server, remove entries from the theme column in the course table where the theme does not exist on the server
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-36946-master

      Description

      Where a theme has been removed from a server but is still set on a course as the forced theme, the course uses the "standard" theme instead of the server's default theme.

      To replicate (properly):

      • Enable course themes
      • Install two themes, A and B
      • Set theme A as the server default
      • Set a course to use theme B
      • Uninstall theme B
      • View the course - it will be using the "standard" theme instead of theme A

      To replicate quickly, on a server with any theme but "standard" set as the default, and course themes enabled, set the theme field for a course to some random value in the database. The course should display using "standard".

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            maherne Michael Aherne added a comment - - edited

            Added a patch which fixes this.

            Show
            maherne Michael Aherne added a comment - - edited Added a patch which fixes this.
            Hide
            lazydaisy Mary Evans added a comment -

            Looks OK to me.

            Show
            lazydaisy Mary Evans added a comment - Looks OK to me.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks guys, this has been integrated now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks guys, this has been integrated now
            Hide
            abgreeve Adrian Greeve added a comment -

            Tested on the master integration branch.
            Worked as described.
            Test passed.

            Show
            abgreeve Adrian Greeve added a comment - Tested on the master integration branch. Worked as described. Test passed.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13