diff --git a/admin/settings.php b/admin/settings.php index 04bf9bc64e1..cba9c55bade 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -12,6 +12,7 @@ require_login(0, false); $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM)); $PAGE->set_url($CFG->admin . '/settings.php', array('section' => $section)); $PAGE->set_pagetype('admin-setting-' . $section); +$PAGE->set_pagelayout('admin'); $PAGE->navigation->clear_cache(); $adminroot = admin_get_root(); // need all settings diff --git a/admin/upgradesettings.php b/admin/upgradesettings.php index da9b3bf2b95..d5100faf888 100644 --- a/admin/upgradesettings.php +++ b/admin/upgradesettings.php @@ -13,7 +13,6 @@ require_login(0, false); $adminroot = admin_get_root(); // need all settings admin_externalpage_setup('upgradesettings'); // now hidden page -$PAGE->set_pagelayout('maintenance'); // now we'll deal with the case that the admin has submitted the form with new settings if ($data = data_submitted() and confirm_sesskey()) { diff --git a/blocks/rss_client/editfeed.php b/blocks/rss_client/editfeed.php index e451e3509ce..5137a65e0f5 100644 --- a/blocks/rss_client/editfeed.php +++ b/blocks/rss_client/editfeed.php @@ -175,7 +175,7 @@ if ($returnurl) { $managefeeds = new moodle_url($CFG->wwwroot . '/blocks/rss_client/managefeeds.php', $urlparams); $PAGE->set_url('blocks/rss_client/editfeed.php', $urlparams); -$PAGE->set_pagelayout('form'); +$PAGE->set_pagelayout('base'); if ($rssid) { $isadding = false; diff --git a/blocks/rss_client/managefeeds.php b/blocks/rss_client/managefeeds.php index 57ba97e8b39..6d6364efde0 100644 --- a/blocks/rss_client/managefeeds.php +++ b/blocks/rss_client/managefeeds.php @@ -78,7 +78,7 @@ $feeds = $DB->get_records_select('block_rss_client', $select, null, $DB->sql_ord $strmanage = get_string('managefeeds', 'block_rss_client'); -$PAGE->set_pagelayout('form'); +$PAGE->set_pagelayout('base'); $PAGE->set_title($strmanage); $PAGE->set_heading($strmanage); diff --git a/course/category.php b/course/category.php index 34c98a4d2a5..37dcc6d75ec 100644 --- a/course/category.php +++ b/course/category.php @@ -167,6 +167,7 @@ $PAGE->set_title("$site->shortname: $category->name"); $PAGE->set_heading("$site->fullname: $strcourses"); $PAGE->set_button(print_course_search('', true, 'navbar')); + $PAGE->set_pagelayout('coursecategory'); echo $OUTPUT->header(); } diff --git a/course/edit.php b/course/edit.php index be7f4f603c4..046a5bece35 100644 --- a/course/edit.php +++ b/course/edit.php @@ -9,7 +9,7 @@ $id = optional_param('id', 0, PARAM_INT); // course id $categoryid = optional_param('category', 0, PARAM_INT); // course category - can be changed in edit form - $PAGE->set_pagelayout('form'); + $PAGE->set_pagelayout('base'); /// basic access control checks if ($id) { // editing course diff --git a/course/modedit.php b/course/modedit.php index aaf2c1d0540..3a25584ae96 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -35,7 +35,7 @@ $return = optional_param('return', 0, PARAM_BOOL); //return to course/view.php if false or mod/modname/view.php if true $type = optional_param('type', '', PARAM_ALPHANUM); //TODO: hopefully will be removed in 2.0 - $PAGE->set_pagelayout('form'); + $PAGE->set_pagelayout('base'); $url = new moodle_url($CFG->wwwroot.'/course/modedit.php'); if (!empty($add)) { diff --git a/index.php b/index.php index 1cfc7dd8b24..7827976ab62 100644 --- a/index.php +++ b/index.php @@ -84,7 +84,7 @@ $PAGE->set_other_editing_capability('moodle/course:manageactivities'); $PAGE->set_url(''); $PAGE->set_docs_path(''); - $PAGE->set_pagelayout('home'); + $PAGE->set_pagelayout('frontpage'); $editing = $PAGE->user_is_editing(); $PAGE->set_title($SITE->fullname); $PAGE->set_heading($SITE->fullname); diff --git a/lib/blocklib.php b/lib/blocklib.php index b3d0507cb3c..070cd5d6985 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -1056,7 +1056,7 @@ class block_manager { } $editpage = new moodle_page(); - $editpage->set_pagelayout('form'); + $editpage->set_pagelayout('base'); $editpage->set_course($this->page->course); $editpage->set_context($block->context); $editurlbase = str_replace($CFG->wwwroot . '/', '', $this->page->url->out(true)); diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0e17e1f9aa5..ed82230554f 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2049,6 +2049,9 @@ function get_login_url($loginguest=false) { * If $cm is given and the coursemodule is hidden and the user is not a teacher * in the course then the user is redirected to the course home page. * + * When $cm parameter specified, this function sets page layout to 'module'. + * You need to change it manually later if some other layout needed. + * * @global object * @global object * @global object @@ -2083,6 +2086,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu } if ($cm) { $PAGE->set_cm($cm, $course); + $PAGE->set_pagelayout('incourse'); } else { $PAGE->set_course($course); } @@ -2388,6 +2392,7 @@ function require_course_login($courseorid, $autologinguest=true, $cm=null, $setw } if ($cm) { $PAGE->set_cm($cm, $course); + $PAGE->set_pagelayout('incourse'); } else { $PAGE->set_course($course); } diff --git a/lib/outputlib.php b/lib/outputlib.php index faa1635b309..cbd2ceb06fc 100644 --- a/lib/outputlib.php +++ b/lib/outputlib.php @@ -177,7 +177,7 @@ class theme_config { *
* $THEME->layouts = array(
* // Most pages - if we encounter an unknown or amissing page type, this one is used.
- * 'normal' => array(
+ * 'standard' => array(
* 'theme' = 'mytheme',
* 'file' => 'normal.php',
* 'regions' => array('side-pre', 'side-post'),
@@ -999,7 +999,8 @@ class theme_config {
if (array_key_exists($pagelayout, $this->layouts)) {
return $this->layouts[$pagelayout];
} else {
- return $this->layouts['normal'];
+ debugging('Invalid page layout specified: ' . $pagelayout);
+ return $this->layouts['standard'];
}
}
@@ -1028,6 +1029,7 @@ class theme_config {
}
}
+ debugging('Can not find layout file for: ' . $pagelayout);
// fallback to standard normal layout
return "$CFG->dirroot/theme/base/layout/general.php";
}
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index b66c0b319c9..bcf1bc8e0e8 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -1692,7 +1692,7 @@ class core_renderer extends renderer_base {
@header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
}
$this->page->set_url(''); // no url
- //$this->page->set_pagelayout('form'); //TODO: MDL-20676 blocks on error pages are weird, unfortunately it somehow detect the pagelayout from URL :-(
+ //$this->page->set_pagelayout('base'); //TODO: MDL-20676 blocks on error pages are weird, unfortunately it somehow detect the pagelayout from URL :-(
$this->page->set_title(get_string('error'));
$output .= $this->header();
}
diff --git a/lib/pagelib.php b/lib/pagelib.php
index d7151b677f6..6738ea2116c 100644
--- a/lib/pagelib.php
+++ b/lib/pagelib.php
@@ -99,7 +99,7 @@ class moodle_page {
protected $_pagetype = null;
- protected $_pagelayout = 'normal';
+ protected $_pagelayout = 'base';
/**
* List of theme layeout options, these are ignored by core.
@@ -292,7 +292,7 @@ class moodle_page {
/**
* Please do not call this method directly, use the ->pagelayout syntax. {@link __get()}.
- * @return string the general type of page this is. For example 'normal', 'popup', 'home'.
+ * @return string the general type of page this is. For example 'standard', 'popup', 'home'.
* Allows the theme to display things differently, if it wishes to.
*/
protected function magic_get_pagelayout() {
@@ -709,7 +709,7 @@ class moodle_page {
/**
* @param string $pagelayout the page layout this is. For example 'popup', 'home'.
- * This properly defaults to 'normal', so you only need to call this function if
+ * This properly defaults to 'base', so you only need to call this function if
* you want something different. The exact range of supported layouts is specified
* in the standard theme.
*/
@@ -1175,6 +1175,8 @@ class moodle_page {
$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('pagelayout-' . $this->_pagelayout); // extra class describing current page layout
+
if (!during_initial_install()) {
$this->add_body_class('course-' . $this->_course->id);
$this->add_body_class('context-' . $this->context->id);
diff --git a/lib/session-test.php b/lib/session-test.php
index 3e7f72fe9e5..e0ed0eba27a 100644
--- a/lib/session-test.php
+++ b/lib/session-test.php
@@ -33,7 +33,6 @@
require '../config.php';
$PAGE->set_url(new moodle_url($CFG->wwwroot.'/lib/session-test.php'));
-$PAGE->set_pagelayout('form');
error('session test not reimplemented yet'); //DO NOT localize or use print_error()!
//
diff --git a/login/index.php b/login/index.php
index ad09fdd5b62..c6ba22dacd5 100644
--- a/login/index.php
+++ b/login/index.php
@@ -32,7 +32,7 @@ $testcookies = optional_param('testcookies', 0, PARAM_BOOL); // request cookie t
$context = get_context_instance(CONTEXT_SYSTEM);
$PAGE->set_course($SITE);
-$PAGE->set_pagelayout('form');
+$PAGE->set_pagelayout('login');
/// Initialize variables
$errormsg = '';
diff --git a/mod/assignment/index.php b/mod/assignment/index.php
index 83884c10aa9..6a8b61378d3 100644
--- a/mod/assignment/index.php
+++ b/mod/assignment/index.php
@@ -11,6 +11,8 @@ if (!$course = $DB->get_record('course', array('id'=>$id))) {
}
require_course_login($course);
+$PAGE->set_pagelayout('incourse');
+
add_to_log($course->id, "assignment", "view all", "index.php?id=$course->id", "");
$strassignments = get_string("modulenameplural", "assignment");
diff --git a/mod/chat/gui_basic/index.php b/mod/chat/gui_basic/index.php
index 13dc2b3c962..62a54021f81 100644
--- a/mod/chat/gui_basic/index.php
+++ b/mod/chat/gui_basic/index.php
@@ -43,7 +43,7 @@ if (!$cm = get_coursemodule_from_instance('chat', $chat->id, $course->id)) {
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_login($course->id, false, $cm);
require_capability('mod/chat:chat',$context);
-$PAGE->set_pagelayout('form');
+$PAGE->set_pagelayout('base');
/// Check to see if groups are being used here
if ($groupmode = groups_get_activity_groupmode($cm)) { // Groups are being used
diff --git a/mod/chat/index.php b/mod/chat/index.php
index f83b9225eca..e0d8e7a67d1 100644
--- a/mod/chat/index.php
+++ b/mod/chat/index.php
@@ -12,6 +12,7 @@ if (! $course = $DB->get_record('course', array('id'=>$id))) {
}
require_course_login($course);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'chat', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/choice/index.php b/mod/choice/index.php
index a83c05c9b7a..3a5c3c83ae4 100644
--- a/mod/choice/index.php
+++ b/mod/choice/index.php
@@ -12,6 +12,7 @@
}
require_course_login($course);
+ $PAGE->set_pagelayout('incourse');
add_to_log($course->id, "choice", "view all", "index?id=$course->id", "");
diff --git a/mod/data/index.php b/mod/data/index.php
index 0d814b5a15d..da7b0e33012 100755
--- a/mod/data/index.php
+++ b/mod/data/index.php
@@ -35,6 +35,7 @@ if (!$course = $DB->get_record('course', array('id'=>$id))) {
}
require_course_login($course);
+$PAGE->set_pagelayout('incourse');
$context = get_context_instance(CONTEXT_COURSE, $course->id);
diff --git a/mod/feedback/index.php b/mod/feedback/index.php
index 0d227a32f3b..9210cf46b62 100644
--- a/mod/feedback/index.php
+++ b/mod/feedback/index.php
@@ -21,6 +21,7 @@ if (!$course = $DB->get_record('course', array('id'=>$id))) {
$capabilities = feedback_load_course_capabilities($course->id);
require_login($course->id);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'feedback', 'view all', htmlspecialchars('index.php?id='.$course->id), $course->id);
diff --git a/mod/folder/index.php b/mod/folder/index.php
index 89fb86f626f..de493d5b72b 100644
--- a/mod/folder/index.php
+++ b/mod/folder/index.php
@@ -30,6 +30,7 @@ $id = required_param('id', PARAM_INT); // course id
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_course_login($course, true);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'folder', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/forum/index.php b/mod/forum/index.php
index 834e639d61b..4d82d549eb1 100644
--- a/mod/forum/index.php
+++ b/mod/forum/index.php
@@ -44,6 +44,7 @@ if ($id) {
}
require_course_login($course);
+$PAGE->set_pagelayout('incourse');
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
diff --git a/mod/glossary/index.php b/mod/glossary/index.php
index 3d0fc85517f..fe17a17d69f 100644
--- a/mod/glossary/index.php
+++ b/mod/glossary/index.php
@@ -17,6 +17,7 @@ if (!$course = $DB->get_record('course', array('id'=>$id))) {
}
require_course_login($course);
+$PAGE->set_pagelayout('incourse');
$context = get_context_instance(CONTEXT_COURSE, $course->id);
add_to_log($course->id, "glossary", "view all", "index.php?id=$course->id", "");
diff --git a/mod/hotpot/index.php b/mod/hotpot/index.php
index f0d6dab57b7..00c29f16d1b 100644
--- a/mod/hotpot/index.php
+++ b/mod/hotpot/index.php
@@ -15,6 +15,7 @@
}
require_login($course->id);
+ $PAGE->set_pagelayout('incourse');
$coursecontext = get_context_instance(CONTEXT_COURSE, $id);
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
diff --git a/mod/imscp/index.php b/mod/imscp/index.php
index b1a26204277..2be16a3ed14 100644
--- a/mod/imscp/index.php
+++ b/mod/imscp/index.php
@@ -30,6 +30,7 @@ $id = required_param('id', PARAM_INT); // course id
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_course_login($course, true);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'imscp', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/lesson/index.php b/mod/lesson/index.php
index 86ac45f844b..21553c26cfe 100644
--- a/mod/lesson/index.php
+++ b/mod/lesson/index.php
@@ -36,6 +36,7 @@ if (!$course = $DB->get_record("course", array("id" => $id))) {
}
require_login($course);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, "lesson", "view all", "index.php?id=$course->id", "");
diff --git a/mod/page/index.php b/mod/page/index.php
index dda366d5b6b..87c7e97e6d5 100644
--- a/mod/page/index.php
+++ b/mod/page/index.php
@@ -30,6 +30,7 @@ $id = required_param('id', PARAM_INT); // course id
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_course_login($course, true);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'page', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php
index bc36f1c2df8..0a3a2ac0c27 100644
--- a/mod/quiz/edit.php
+++ b/mod/quiz/edit.php
@@ -115,7 +115,7 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo
list($thispageurl, $contexts, $cmid, $cm, $quiz, $pagevars) =
question_edit_setup('editq', true);
$PAGE->set_url('mod/quiz/edit.php', $thispageurl->params());
-$PAGE->set_pagelayout('form');
+$PAGE->set_pagelayout('base');
$defaultcategoryobj = question_make_default_categories($contexts->all());
$defaultcategoryid = $defaultcategoryobj->id;
diff --git a/mod/quiz/index.php b/mod/quiz/index.php
index 6e0f77c42d3..e69a7fcc35c 100644
--- a/mod/quiz/index.php
+++ b/mod/quiz/index.php
@@ -16,6 +16,8 @@
}
$coursecontext = get_context_instance(CONTEXT_COURSE, $id);
require_login($course->id);
+ $PAGE->set_pagelayout('incourse');
+
add_to_log($course->id, "quiz", "view all", "index.php?id=$course->id", "");
// Print the header
diff --git a/mod/resource/index.php b/mod/resource/index.php
index 8212884a878..cd818d9b963 100644
--- a/mod/resource/index.php
+++ b/mod/resource/index.php
@@ -30,6 +30,7 @@ $id = required_param('id', PARAM_INT); // course id
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_course_login($course, true);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'resource', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/scorm/index.php b/mod/scorm/index.php
index 4ea04b0cfce..d369486d44e 100755
--- a/mod/scorm/index.php
+++ b/mod/scorm/index.php
@@ -16,6 +16,7 @@
}
require_course_login($course);
+ $PAGE->set_pagelayout('incourse');
add_to_log($course->id, "scorm", "view all", "index.php?id=$course->id", "");
diff --git a/mod/survey/index.php b/mod/survey/index.php
index be7435982de..fa0cfad0bc3 100644
--- a/mod/survey/index.php
+++ b/mod/survey/index.php
@@ -12,6 +12,7 @@
}
require_course_login($course);
+ $PAGE->set_pagelayout('incourse');
add_to_log($course->id, "survey", "view all", "index.php?id=$course->id", "");
diff --git a/mod/url/index.php b/mod/url/index.php
index f7d5da13161..b4df7a5eca2 100644
--- a/mod/url/index.php
+++ b/mod/url/index.php
@@ -30,6 +30,7 @@ $id = required_param('id', PARAM_INT); // course id
$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
require_course_login($course, true);
+$PAGE->set_pagelayout('incourse');
add_to_log($course->id, 'url', 'view all', "index.php?id=$course->id", '');
diff --git a/mod/wiki/index.php b/mod/wiki/index.php
index 4c5e1d22112..7bd6e2e7182 100644
--- a/mod/wiki/index.php
+++ b/mod/wiki/index.php
@@ -15,6 +15,7 @@
}
require_course_login($course);
+ $PAGE->set_pagelayout('incourse');
add_to_log($course->id, "wiki", "view all", "index.php?id=$course->id", "");
diff --git a/my/index.php b/my/index.php
index 27ef6d3ed86..c1a7f27330a 100644
--- a/my/index.php
+++ b/my/index.php
@@ -22,7 +22,7 @@
$PAGE->set_context(get_context_instance(CONTEXT_USER, $USER->id));
$PAGE->set_url('my/index.php');
- $PAGE->set_pagelayout('my');
+ $PAGE->set_pagelayout('mydashboard');
$PAGE->set_blocks_editing_capability('moodle/my:manageblocks');
if (($edit != -1) and $PAGE->user_allowed_editing()) {
diff --git a/tag/edit.php b/tag/edit.php
index f6521f5b229..193cb3310b7 100644
--- a/tag/edit.php
+++ b/tag/edit.php
@@ -31,7 +31,7 @@ $PAGE->set_url('tag/index.php', array('id' => $tag->id));
$PAGE->set_subpage($tag->id);
$PAGE->set_context($systemcontext);
$PAGE->set_blocks_editing_capability('moodle/tag:editblocks');
-$PAGE->set_pagelayout('form');
+$PAGE->set_pagelayout('base');
$PAGE->requires->yui2_lib('animation');
$PAGE->requires->yui2_lib('autocomplete');
diff --git a/theme/base/config.php b/theme/base/config.php
index 1631610ca8c..44b85a7a80d 100644
--- a/theme/base/config.php
+++ b/theme/base/config.php
@@ -47,48 +47,73 @@ $THEME->sheets = array(
$THEME->editor_sheets = array();
$THEME->layouts = array(
- // Most pages - if we encounter an unknown or a missing page type, this one is used.
- 'normal' => array(
+ // Most backwards compatible layout without the blocks - this is the layout used by default
+ 'base' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array(),
+ ),
+ // Standard layout with blocks, this is recommended for most pages with general information
+ 'standard' => array(
'theme' => 'base',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
),
- // Course page
+ // Main course page
'course' => array(
'theme' => 'base',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
+ ),
+ 'coursecategory' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
+ ),
+ // part of course, typical for modules - default page layout if $cm specified in require_login()
+ 'incourse' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
),
// The site home page.
- 'home' => array(
+ 'frontpage' => array(
'theme' => 'base',
- 'file' => 'home.php',
+ 'file' => 'frontpage.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
),
// Server administration scripts.
'admin' => array(
'theme' => 'base',
'file' => 'general.php',
'regions' => array('side-pre'),
- 'defaultregion' => 'side-pre'
+ 'defaultregion' => 'side-pre',
),
- // My moodle page
- 'my' => array(
+ // My dashboard page
+ 'mydashboard' => array(
'theme' => 'base',
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
),
-
- // Settings form pages, like course of module settings.
- 'form' => array(
+ // My public page
+ 'mypublic' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
+ ),
+ 'login' => array(
'theme' => 'base',
'file' => 'general.php',
'regions' => array(),
),
+
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
'theme' => 'base',
@@ -103,7 +128,7 @@ $THEME->layouts = array(
'regions' => array(),
'options' => array('nofooter'),
),
- // Embeded pages, like iframe embeded in moodleform
+ // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible
'embedded' => array(
'theme' => 'base',
'file' => 'embedded.php',
diff --git a/theme/base/layout/home.php b/theme/base/layout/frontpage.php
similarity index 100%
rename from theme/base/layout/home.php
rename to theme/base/layout/frontpage.php
diff --git a/theme/standard/config.php b/theme/standard/config.php
index bdeec55b6d6..5accb06f2fc 100644
--- a/theme/standard/config.php
+++ b/theme/standard/config.php
@@ -78,48 +78,73 @@ $THEME->sheets = array(
$THEME->editor_sheets = array('styles_tinymce');
$THEME->layouts = array(
- // Most pages - if we encounter an unknown or a missing page type, this one is used.
- 'normal' => array(
+ // Most backwards compatible layout without the blocks - this is the layout used by default
+ 'base' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array(),
+ ),
+ // Standard layout with blocks, this is recommended for most pages with general information
+ 'standard' => array(
'theme' => 'standard',
'file' => 'normal.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
),
- // Course page
+ // Main course page
'course' => array(
'theme' => 'standard',
'file' => 'normal.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
+ ),
+ 'coursecategory' => array(
+ 'theme' => 'base',
+ 'file' => 'general.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
+ ),
+ // Standard module pages - default page layout if $cm specified in require_login()
+ 'module' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
),
// The site home page.
- 'home' => array(
+ 'frontpage' => array(
'theme' => 'standard',
'file' => 'home.php',
'regions' => array('side-pre', 'side-post'),
- 'defaultregion' => 'side-post'
+ 'defaultregion' => 'side-post',
),
// Server administration scripts.
'admin' => array(
'theme' => 'standard',
'file' => 'normal.php',
'regions' => array('side-pre'),
- 'defaultregion' => 'side-pre'
+ 'defaultregion' => 'side-pre',
),
- // My moodle page
- 'my' => array(
+ // My dashboard page
+ 'mydashboard' => array(
+ 'theme' => 'standard',
+ 'file' => 'normal.php',
+ 'regions' => array('side-pre', 'side-post'),
+ 'defaultregion' => 'side-post',
+ ),
+ // My public page
+ 'mypublic' => array(
'theme' => 'standard',
'file' => 'normal.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
-
- // Settings form pages, like course of module settings.
- 'form' => array(
+ 'login' => array(
'theme' => 'standard',
'file' => 'normal.php',
'regions' => array(),
),
+
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
'theme' => 'standard',
@@ -132,7 +157,7 @@ $THEME->layouts = array(
'file' => 'frametop.php',
'regions' => array(),
),
- // Embeded pages, like iframe embeded in moodleform
+ // Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible
'embedded' => array(
'theme' => 'standard',
'file' => 'embedded.php',