Closed rbclark closed 12 years ago
I just pushed my own fix, which uses $theme->dir. Does that work for you, and any thoughts on which is better? I'm not really familiar with what moodle_url does internally. I guess with $theme->dir it's one less thing you have to change when cloning a new theme but I'm not sure what the other plus and minuses would be.
After thinking about it, I believe your way may be the correct way to go, as mine still had the theme folder hardcoded and it should not be. I will pull your version once it shows up.
I've just pushed it for real, I forgot I'd created a new branch to see what the problem was so it didn't get pushed when I just did "git push", new merged back into master.
moodle_url isn't for building like this. the dev docs specify that you should do it like this:
$my_theme_dir = $CFG->themedir . '/' . current_theme() . '/'
This has since been changed to
$themedir = $theme->dir;
I was trying to find the doc which you are referring and was having some trouble, would you mind pointing me to it?
this was a pain to find again!:
http://docs.moodle.org/dev/Theme_directory_guide#How_to_refer_to_the_directory_of_the_current_theme
seems the default behavior is not working for $CFG->themedir
Theme directory was set statically, changed to pull dynamically.
this commit fixes #5