MDL-28163 custom site frontpage support
authorPetr Skoda <commits@skodak.org>
Sun, 3 Jul 2011 13:02:46 +0000 (15:02 +0200)
committerPetr Skoda <commits@skodak.org>
Sun, 3 Jul 2011 13:02:46 +0000 (15:02 +0200)
index.php

index 7c3472d..747bb04 100644 (file)
--- a/index.php
+++ b/index.php
     $PAGE->set_heading($SITE->fullname);
     echo $OUTPUT->header();
 
-/// Print Section
-    if ($SITE->numsections > 0) {
+/// Print Section or custom info
+    if (!empty($CFG->customfrontpageinclude)) {
+        include($CFG->customfrontpageinclude);
+
+    } else if ($SITE->numsections > 0) {
 
         if (!$section = $DB->get_record('course_sections', array('course'=>$SITE->id, 'section'=>1))) {
             $DB->delete_records('course_sections', array('course'=>$SITE->id, 'section'=>1)); // Just in case