using such SERVER_NAME and HTTP_HOST variables.
It should help in servers having wrong Apache configurations, being
the cause of bad logins, referer problems....
Seems to work both under PHP 4.3 (linux) and PHP 5 (MacOS X).
Please, TEST it, specially in installation, upgrade and cron!
The visibility of coursemodules is now always set through the function set_coursemodule_visible() in order to make sure that the associated events get updated in the calendar appropriately.
If moving a coursemodule to a hidden section then the module is set to hidden as well and its events are hidden in the calendar.
If deleting a coursemodule its events are deleted from the calendar.
The function choose_from_menu() has an extra optional argument $disabled which, when set to true, will disable the menu.
For the sake of consistency the function set_groupmode_for_module has been renamed to set_coursemodule_groupmode and the functions show_course_module() and hide_course_module() have been combined to set_coursemodule_visible().
Added $user->theme and $course->theme choices, controlled by admin
variables on the main config variables page.
By default this is all turned off, since multiple themes can be
a little disorienting.
A hidden feature is session themes ... you can change the theme
on any page by passing theme=xxxx as a parameter. By default this
requires sesskey (so that people don't change theme on each other),
but this security can be switched off using a hidden variable
$CFG->allowthemechangeonurl = true; Good for quick tests.
Admin can put a site on hold during an upgrade or theme changing etc
Controlled by a file in dataroot, so it can also be controlled via command line:
touch moodledata/1/maintenance.html
rm moodledata/1/maintenance.html
How it works:
_ within the "sideblockheading" a DIV with class="hide-show" holds a link calling the JS containerDisplaySwitching(). To the user it's represented by the icon "switch.gif" (a plus in a square) at the right end side of the header.
_ all content of the sideblock is surounded by a new <div class="blockcontent" id="'.$attributes['id']."_cont\">"
_ a call of the JS containerDisplaySwitching() changes the state of the appropriate DIV with the content to "display:none/inline" and writes this state into a cookie.
_ at the end of every block I added a call to the JS "containerDisplaySet()". This reads the block's state and hides the content or leaves it visible with every page load.
_ in the stylesheet I added the positioning of the icon:
.sideblockheading .hide-show {
float:right;
}
.sideblockheading a img.hide-show-image {
padding-top:0.25em;
}