Skip to content

Commit

Permalink
MDL-28163 custom site frontpage support
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 3, 2011
1 parent 81f8e0f commit 8275eab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.php
Expand Up @@ -88,8 +88,11 @@
$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
Expand Down

0 comments on commit 8275eab

Please sign in to comment.