Details

    • Testing Instructions:
      Hide

      Note that this issue can be effectively tested together with MDL-26955

      1. Create a folder called 'morethemes' in moodledata directory and set permissions so that the web server can at least read it
      2. Put the following into your config.php: $CFG->themedir = $CFG->dataroot.'/morethemes';
      3. Move a theme folder from $CFG->dirroot/theme/ into the morethemes folders
      4. Go to the theme selector
      5. TEST: make sure that the moved theme is still displayed in the list
      6. TEST: make sure that the name of the theme is displayed correctly
      7. TEST: make sure that when the theme is selected, it works as if it was in the standard location

      Show
      Note that this issue can be effectively tested together with MDL-26955 1. Create a folder called 'morethemes' in moodledata directory and set permissions so that the web server can at least read it 2. Put the following into your config.php: $CFG->themedir = $CFG->dataroot.'/morethemes'; 3. Move a theme folder from $CFG->dirroot/theme/ into the morethemes folders 4. Go to the theme selector 5. TEST: make sure that the moved theme is still displayed in the list 6. TEST: make sure that the name of the theme is displayed correctly 7. TEST: make sure that when the theme is selected, it works as if it was in the standard location
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27116-themedir-config

      Description

      CFG->themedir do not work in 2.0.

      Workaround
      file: /lib/outputlib.php
      Function: function find_theme_location

      REPLACE
      if (file_exists("$CFG->dirroot/theme/$themename/config.php")) {
      $dir = "$CFG->dirroot/theme/$themename";
      WITH
      if (file_exists("$CFG->dirroot/theme/$themename/config.php"))

      { $dir = "$CFG->dirroot/theme/$themename"; }

      elseif (file_exists("$CFG->themedir/$themename/config.php")) {
      $dir = "$CFG->themedir/$themename";

      MDL-26955 will still be an issue.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              ptrkmkl Patrick Malley added a comment -

              Solution falls outside the theme directory - I"m not sure how to fix.

              Show
              ptrkmkl Patrick Malley added a comment - Solution falls outside the theme directory - I"m not sure how to fix.
              Hide
              skodak Petr Skoda added a comment -

              reassigning, David: could you please have a look at this?

              Show
              skodak Petr Skoda added a comment - reassigning, David: could you please have a look at this?
              Hide
              urshunkler Urs Hunkler added a comment -

              I created two branches on a Moodle fork on Github to solve the external themedir issue. The branch with the solution for this issue is https://github.com/uhunkler/moodle2_optimized4design/commits/MDL-27116_CFG-themedir_broken. Have a look there and feel free to pull the solution.

              Show
              urshunkler Urs Hunkler added a comment - I created two branches on a Moodle fork on Github to solve the external themedir issue. The branch with the solution for this issue is https://github.com/uhunkler/moodle2_optimized4design/commits/MDL-27116_CFG-themedir_broken . Have a look there and feel free to pull the solution.
              Hide
              mudrd8mz David Mudrák added a comment -

              Thanks Jai for the idea of the patch.

              Integrators, please pull the patch that adds support for $CFG->themedir into the theme_config::find_theme_location()

              Show
              mudrd8mz David Mudrák added a comment - Thanks Jai for the idea of the patch. Integrators, please pull the patch that adds support for $CFG->themedir into the theme_config::find_theme_location()
              Hide
              urshunkler Urs Hunkler added a comment -

              I checked your solution on m2stable and it works here.

              Show
              urshunkler Urs Hunkler added a comment - I checked your solution on m2stable and it works here.
              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
              nebgor Aparup Banerjee added a comment -

              this works great for me.

              (ps: had to be careful, git thought my theme was deleted and wouldn't let me get it back when i was reverting the test, had to checkout the theme again.)

              Show
              nebgor Aparup Banerjee added a comment - this works great for me. (ps: had to be careful, git thought my theme was deleted and wouldn't let me get it back when i was reverting the test, had to checkout the theme again.)
              Hide
              mudrd8mz David Mudrák added a comment -

              yup, `git-checkout <path>` is a correct way to restore deleted contents from the working dir. thanks for the testing.

              Show
              mudrd8mz David Mudrák added a comment - yup, `git-checkout <path>` is a correct way to restore deleted contents from the working dir. thanks for the testing.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Closing as fixed. Many thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Closing as fixed. Many thanks!

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11