ds125v / moodle-theme_bootstrap_renderers

A developer theme for working on Moodle 2.4/5 renderers that output Bootstrap 3 compatible HTML
15 stars 10 forks source link

Theme broken on default install #6

Closed rbclark closed 12 years ago

rbclark commented 12 years ago

Theme directory was set statically, changed to pull dynamically.

this commit fixes #5

ds125v commented 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.

rbclark commented 12 years ago

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.

ds125v commented 12 years ago

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.

thedannywahl commented 12 years ago

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() . '/'

rbclark commented 12 years ago

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?

thedannywahl commented 12 years ago

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

thedannywahl commented 12 years ago

seems the default behavior is not working for $CFG->themedir

http://tracker.moodle.org/browse/MDL-36065