}
function get_content() {
- global $CFG, $OUTPUT;
+ global $CFG, $OUTPUT, $COURSE;
if ($this->content !== NULL) {
return $this->content;
return '';
}
+ if ($COURSE->shortname === '') {
+ // remove admin block if site not fully configured yet
+ $this->content = '';
+ return '';
+ }
+
require_once($CFG->libdir.'/adminlib.php');
$adminroot = admin_get_root(false, false); // settings not required - only pages
return $this->content;
}
}
-?>
+