Fixing a bug, see http://moodle.org/mod/forum/discuss.php?d=37545
Instead of grabbing variables defined by the course format with global $var; the block now recomputes them itself. Of course this also introduces a (significant?) performance hit. I think it's much preferable to "live with" the hit until a good solution is developed rather than have a hacky solution that could break anytime for any obscure reason (case in point). Objections?
This commit is contained in:
@@ -3,14 +3,13 @@
|
||||
class block_activity_modules extends block_list {
|
||||
function init() {
|
||||
$this->title = get_string('activities');
|
||||
$this->version = 2004041000;
|
||||
$this->version = 2006011300;
|
||||
}
|
||||
|
||||
function get_content() {
|
||||
global $USER, $CFG;
|
||||
|
||||
// This is really NOT pretty, but let's do it simple for now...
|
||||
global $modnamesused, $modnamesplural;
|
||||
get_all_mods($this->instance->pageid, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
|
||||
if($this->content !== NULL) {
|
||||
return $this->content;
|
||||
|
||||
Reference in New Issue
Block a user