$string['outlinereport'] = 'Outline report';
$string['page'] = 'Page';
$string['pageheaderconfigablock'] = 'Configuring a block in %%fullname%%';
+$string['pageshouldredirect'] = 'This page should automatically redirect. If nothing is happening please use the continue link below.';
$string['parentcategory'] = 'Parent category';
$string['parentcoursenotfound'] = 'Parent course not found!';
$string['parentcoursenotmetacourse'] = 'Parent course not metacourse!';
protected function starting_output() {
global $SITE, $CFG;
- if (during_initial_install()) {
- $this->_course = new stdClass;
- $this->_course->id = 1;
- moodle_setlocale();
- return;
- }
+ $this->initialise_standard_body_classes();
- if (!$this->_course) {
- $this->set_course($SITE);
+ if (!during_initial_install()) {
+ $this->blocks->load_blocks();
}
- $this->initialise_standard_body_classes();
- $this->blocks->load_blocks();
-
// Add any stylesheets required using the horrible legacy mechanism.
if (!empty($CFG->stylesheets)) {
debugging('Some code on this page is using the horrible legacy mechanism $CFG->stylesheets to include links to ' .
public function initialise_theme_and_output() {
global $OUTPUT, $PAGE, $SITE, $THEME;
- if (!$this->_course) {
+ if (!$this->_course && !during_initial_install()) {
$this->set_course($SITE);
}
}
$this->add_body_class($this->_legacyclass);
- $this->add_body_class('course-' . $this->_course->id);
$this->add_body_classes(get_browser_version_classes());
$this->add_body_class('dir-' . get_string('thisdirection'));
$this->add_body_class('lang-' . current_language());
$this->add_body_class('yui-skin-sam'); // Make YUI happy, if it is used.
-
$this->add_body_class($this->url_to_class_name($CFG->wwwroot));
- $this->add_body_class('context-' . $this->context->id);
-
- if (!empty($this->_cm)) {
- $this->add_body_class('cmid-' . $this->_cm->id);
+ if (!during_initial_install()) {
+ $this->add_body_class('course-' . $this->_course->id);
+ $this->add_body_class('context-' . $this->context->id);
}
- $this->add_body_class('context-' . $this->context->id);
-
if (!empty($this->_cm)) {
$this->add_body_class('cmid-' . $this->_cm->id);
}
- if ($CFG->allowcategorythemes) {
+ if (!empty($CFG->allowcategorythemes)) {
$this->ensure_category_loaded();
foreach ($this->_categories as $catid => $notused) {
$this->add_body_class('category-' . $catid);