Hello, I have been tearing some hair out on this one but suspect its rather simple. I am not well versed on CSS with Moodle but have been laerning lots through the forums.
I have a new 1.8 installation and copied the Standard theme, have been customizing successfully so far.
For some reason, my course pages dont offer any "course-view" elements for the content. So I cannot adjust the properties of the various sections etc. I can only control them by adjusting the properties of parent items like "table" or "li". The wonderful "#course-vew" pieces are in the CSS but not on the page!
Any ideas?
Are you building a theme to work on top of the standard theme, or have you turned the standard theme off completely?
In other words, is this what appears on line 16 of config.php within your theme folder:
If so, and you are trying to alter an exact copy of the standard theme, the two sheets are probably competing and the standard sheet is winning.
If you are building a theme that is built entirely on its own, you will want to set the above to "false".
Does this help?
In other words, is this what appears on line 16 of config.php within your theme folder:
$THEME->standardsheets = true;
If so, and you are trying to alter an exact copy of the standard theme, the two sheets are probably competing and the standard sheet is winning.
If you are building a theme that is built entirely on its own, you will want to set the above to "false".
Does this help?
Thanks for the response. I suspected that the competition was happening when I would delete something from my new style sheet and nothing would happen.
So I set it to false. Unfortunately no effect... which at least means that my sheet is clean to a degree...
the Firefox Inspector extension reports the following for a piece of course content (eg, section 1 of a course):
Maybe I should look at a validator or something?
So I set it to false. Unfortunately no effect... which at least means that my sheet is clean to a degree...
the Firefox Inspector extension reports the following for a piece of course content (eg, section 1 of a course):
body, table, td, th, li (line 3402)
{
font-family: Arial,Verdana,Helvetica,sans-serif;
font-size: 100%;
letter-spacing: 0.02em;
}
One (larger) solution (as long as you're not too far into this process) is to start over! 
Here me out:
I find that it is better (easier) to build themes that do use the Standard stylesheets. That way, your stylesheet will not be solely responsible for the layout of the page, and anything your change will take precedent over the Standard sheets. And, when Moodle upgrades, there is a good chance you will have little work because the Standard theme gets upgraded with it. My recommendation would be to:
I find the themes to be much more predictable this way.
A validator isn't going to find anything for you. The code could be valid and you would still be lost! What's probably happening is that you are trying to change something that is being defined on a much more specific level.
For example, if you try changing "#course-view .section," and somewhere else in your document is "body#course-view #layout-table tbody tr td#middle-column .weeks .section," then you're going to end up pulling out your hair.
As long as you have a reliable CSS inspector, you should be able to figure out if there is anything in the Standard sheets that needs to be specifically addressed.
Hope this helps. If you continue to have problems, perhaps give a screenshot of what you are specifically trying to alter.
Cheers.
Here me out:
I find that it is better (easier) to build themes that do use the Standard stylesheets. That way, your stylesheet will not be solely responsible for the layout of the page, and anything your change will take precedent over the Standard sheets. And, when Moodle upgrades, there is a good chance you will have little work because the Standard theme gets upgraded with it. My recommendation would be to:
- create a copy of the theme directory you're currently working on (for backup and reference).
- delete all stylesheets in the theme directory(trust me)
- change config.php back to:
$THEME->standardsheets = true;
- While you have config.php open, change:
$THEME->sheets = array('styles_layout', 'styles_fonts', 'styles_color');
to this:
$THEME->sheets = array('styles_anything');
where 'styles_anything' is anything you like! - Create a new CSS document name styles_anything (same as in config.php).
- Visit your site - though your theme is essentially empty, your Moodle should still look like the the Standard theme.
- Now, using a tool like the Firefox Web developer toolbar, and using the Standard sheets for reference, start adding code to your new sheet.
I find the themes to be much more predictable this way.
A validator isn't going to find anything for you. The code could be valid and you would still be lost! What's probably happening is that you are trying to change something that is being defined on a much more specific level.
For example, if you try changing "#course-view .section," and somewhere else in your document is "body#course-view #layout-table tbody tr td#middle-column .weeks .section," then you're going to end up pulling out your hair.
As long as you have a reliable CSS inspector, you should be able to figure out if there is anything in the Standard sheets that needs to be specifically addressed.
Hope this helps. If you continue to have problems, perhaps give a screenshot of what you are specifically trying to alter.
Cheers.
Thanks again for the helpful reply. I agree with you - I was about to embark on this path when, just for the fun of it, decided to set my site to just use the original standard theme.
Same result.
I then set it to use one of the other themes, like "orangewhite".
Same result - no ability to control the course content! So I dont think it has anything to do with the themes themselves.
So, this got me barking up the tree of permissions. The theory is some piece of code is not available to be executed because it cannot be read, so I dont get the full picture.
One thing I was going to try was to turn on PHP debugging, but am not sure how?
Thanks again for the help.
brad
Greetings, Brad!
See if this helps (by Ken Wilson):
To turn on debugging, try setting the Server -> Debugging options on [this is in admin menu]. Also, in your config.php, try adding:
http://moodle.org/mod/forum/discuss.php?d=74795#p333315
See if this helps (by Ken Wilson):
To turn on debugging, try setting the Server -> Debugging options on [this is in admin menu]. Also, in your config.php, try adding:
define('MDL_PERFDB' , true);
http://moodle.org/mod/forum/discuss.php?d=74795#p333315
Solved this one, finally!
Strange one - had to trace it back to the weblib.php and how Moodle determines the id and class of the course.
The $ME variable would return
http://my.brimmer.org:16080/course/view.php
while the $CFG->httpswwwroot variable would return
http://my.brimmer.org/course/view.php
The 16080 port number is a default Apache setting for implementing a performance cache on Mac OS X Tiger server.
The bottom line is that the function page_id_and_class would completely distort the id and class for the page, resulting in my inability to control it through the style sheets, looking something like
body class="http:--my.brimmer.org:16080-course course-21 nocoursepage" id="http:--my.brimmer.org:16080-course-view"
This link informed me how to disable the performance cache:
http://83.236.149.205/weblog/klausmcvenus/ProgrammingTheMac/?permalink=MacOSXServerConfigurationPor.html
(apparently good for firewalls anyway)
Working great now. Not sure if this should be considered a "bug"? Ie why compare $ME and $CFG->httpswwwroot, instead of picking one and using it consistently to strip and find the path?
Thanks to all who offered their help. Much appreciated!
Brad