]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20790 more page layouts -see base theme for full list; also added new css body...
authorPetr Skoda <skodak@moodle.org>
Sun, 27 Dec 2009 12:02:04 +0000 (12:02 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 27 Dec 2009 12:02:04 +0000 (12:02 +0000)
40 files changed:
admin/settings.php
admin/upgradesettings.php
blocks/rss_client/editfeed.php
blocks/rss_client/managefeeds.php
course/category.php
course/edit.php
course/modedit.php
index.php
lib/blocklib.php
lib/moodlelib.php
lib/outputlib.php
lib/outputrenderers.php
lib/pagelib.php
lib/session-test.php
login/index.php
mod/assignment/index.php
mod/chat/gui_basic/index.php
mod/chat/index.php
mod/choice/index.php
mod/data/index.php
mod/feedback/index.php
mod/folder/index.php
mod/forum/index.php
mod/glossary/index.php
mod/hotpot/index.php
mod/imscp/index.php
mod/lesson/index.php
mod/page/index.php
mod/quiz/edit.php
mod/quiz/index.php
mod/resource/index.php
mod/scorm/index.php
mod/survey/index.php
mod/url/index.php
mod/wiki/index.php
my/index.php
tag/edit.php
theme/base/config.php
theme/base/layout/frontpage.php [moved from theme/base/layout/home.php with 100% similarity]
theme/standard/config.php

index 04bf9bc64e1d7098e8f5a2369fba06bda2da7e56..cba9c55bade8d5816efa269b33882c0736e7d760 100644 (file)
@@ -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
index da9b3bf2b95b95c5994e2bf9dbf3d7f49fd45b4c..d5100faf88849ab6aa707edf87322c1c873c95a3 100644 (file)
@@ -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()) {
index e451e3509ce5b78324dcdfa849057ffdd329238c..5137a65e0f5497878d8405e10bcc5aaba19ff30c 100644 (file)
@@ -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;
index 57ba97e8b391b4487a694bb1a245d0b50df82330..6d6364efde00dd75f80dd7204fa507f414b8ac81 100644 (file)
@@ -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);
 
index 34c98a4d2a54ead909d9509f5b782fc5af51ef62..37dcc6d75ec4e35d3d456e724ce1e7a78d6b2f5f 100644 (file)
         $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();
     }
 
index be7f4f603c44908892aee855a0c69d0b3ae9d626..046a5bece3551ba41c1368d23fcd960bd51241e9 100644 (file)
@@ -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
index aaf2c1d05407caf3255d096f3f04a259de10da8c..3a25584ae96da2023ab8272eb5f7a3fc567916d5 100644 (file)
@@ -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)) {
index 1cfc7dd8b24d960f892ae0f02b9eca817811614c..7827976ab623dadbf278375cd65a4f0280ffd1d8 100644 (file)
--- 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);
index b3d0507cb3cf2bbbfcceaf7814c82276a453fdfa..070cd5d6985ea321153ea09406f24e7a1670e068 100644 (file)
@@ -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));
index 0e17e1f9aa57fbb7e4034d4aa64e2be49e2faa4a..ed82230554f786f79106acd2726d34f33795de67 100644 (file)
@@ -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);
                 }
index faa1635b309b2826f90ada98b8ce4a5a98a11458..cbd2ceb06fcffb4b1da495c539781e56da1af2e7 100644 (file)
@@ -177,7 +177,7 @@ class theme_config {
      * <pre>
      *   $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";
     }
index b66c0b319c92db95d7d16aaca712be0ad9797919..bcf1bc8e0e82e5c3aa5fe492462b7b056f363fd3 100644 (file)
@@ -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();
         }
index d7151b677f6113ea61eac2bd6e9332357afd94bb..6738ea2116c43b9f20113855c543fa9be8099d7e 100644 (file)
@@ -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);
index 3e7f72fe9e54fe00e7ba76675112005ae85ee1d6..e0ed0eba27a6f6b15fc9704481ad9d4c74742248 100644 (file)
@@ -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()!
 //
index ad09fdd5b62d96c6d365e5f0d0287751d36ef491..c6ba22dacd556dda721828b4a5aa312a26b48d48 100644 (file)
@@ -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 = '';
index 83884c10aa952b00533e15b1f5f390062fc85e65..6a8b61378d37433e94f95eb81ca94d86fcc975de 100644 (file)
@@ -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");
index 13dc2b3c962b199eaade2df86d67466c2b12bf24..62a54021f8115719af722dcccc72b1cbc0dce7fe 100644 (file)
@@ -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
index f83b9225eca04eb0fe12610c52411655a26a9e34..e0d8e7a67d171e2d6642eb2545b56a5900677df8 100644 (file)
@@ -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", '');
 
index a83c05c9b7a324e3da8344ce8b610562aeb2cb2a..3a5c3c83ae42b41ad210151c8daca632d8f0e1e3 100644 (file)
@@ -12,6 +12,7 @@
     }
 
     require_course_login($course);
+    $PAGE->set_pagelayout('incourse');
 
     add_to_log($course->id, "choice", "view all", "index?id=$course->id", "");
 
index 0d814b5a15d1976be25015ce8bb2f7d9ca876a6b..da7b0e33012574a2382dc9f57ddc8d53f1f89ae8 100755 (executable)
@@ -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);
 
index 0d227a32f3b83d7063a4958842033071352cf360..9210cf46b62aa8cba8686a06839da02217bdd6d5 100644 (file)
@@ -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);
 
index 89fb86f626f124c889839a6bcd241c190b77cfa7..de493d5b72b429f141773d63d967abedf8827de9 100644 (file)
@@ -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", '');
 
index 834e639d61b2318d355ba8acaac90c23dcbfaf16..4d82d549eb1faff6e3d7f715f42cf7b6e46d24d3 100644 (file)
@@ -44,6 +44,7 @@ if ($id) {
 }
 
 require_course_login($course);
+$PAGE->set_pagelayout('incourse');
 $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
 
 
index 3d0fc85517f7a4ab4f282e91ea7c6a7e825c5e87..fe17a17d69fe9387fcec99ebda0813e80072a738 100644 (file)
@@ -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", "");
index f0d6dab57b7adb0d696dd0ae6d5552292c2e32f7..00c29f16d1b71fc6a60c31087b7d0a26af49c202 100644 (file)
@@ -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);
index b1a26204277a79d1bd76deecfbe2be53f8f57fd0..2be16a3ed14a55c9979f7a9325283fdea7bf7719 100644 (file)
@@ -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", '');
 
index 86ac45f844bf6aa71c1122852fcd684f22588db3..21553c26cfe05278e31a20e9cc8d7d53e50b35d4 100644 (file)
@@ -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", "");
 
index dda366d5b6b228b2b84a1e758e52d7e21dca982b..87c7e97e6d5d6e5befe07f3a038e076ef81cd21e 100644 (file)
@@ -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", '');
 
index bc36f1c2df8cb223a47803220d29fbee35aba9d1..0a3a2ac0c2799206a7aee41a88e86017e044b830 100644 (file)
@@ -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;
index 6e0f77c42d37185a6360660a7480c378848d7e1c..e69a7fcc35c3a89642eb2e9a88597c7b5d7c436d 100644 (file)
@@ -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
index 8212884a8785961d4e2decbc56bb45e3b657810a..cd818d9b9631ad590dc755c8afb1acf859b528a2 100644 (file)
@@ -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", '');
 
index 4ea04b0cfce8980887d224bea79003962c785c8b..d369486d44e97044bb8393652b6fd674cd8fa81a 100755 (executable)
@@ -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", "");
 
index be7435982de499b53a273b6a250d84bb3f50c3d1..fa0cfad0bc3b46a52b2203a57a5995c9253c247a 100644 (file)
@@ -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", "");
 
index f7d5da131617e6a1ea1680ce4c3961890eaa4072..b4df7a5eca242aec964a6c5486b65a3fd9124ed0 100644 (file)
@@ -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", '');
 
index 4c5e1d22112234ad8cb991ff37aceafee786618b..7bd6e2e7182186e17f7d2a3423bbbff2f8eb6b81 100644 (file)
@@ -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", "");
 
index 27ef6d3ed86120517afb577dafa9c8bb6b6a5231..c1a7f27330ae487d4a58e404f7abdeacab6c430f 100644 (file)
@@ -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()) {
index f6521f5b2293107858f8d4f4f095fe45ecf34e1e..193cb3310b79317b63c9510469f4a72e415fd39a 100644 (file)
@@ -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');
index 1631610ca8c58aa53f2bd2138a3d96981a328339..44b85a7a80d9a6082bf5ee123c31e85e4ecc3220 100644 (file)
@@ -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',
index bdeec55b6d62ee685e7a1f2e746ca88b77ba3c4b..5accb06f2fc1fc38d567b7d5f9a5c11f1ee1a254 100644 (file)
@@ -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',