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:
defacer
2006-01-13 16:20:40 +00:00
parent b5f1b8b10e
commit 24acdc993b
@@ -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;