在跟下index.php下有这么一段:
print_container_start(); /// Print Section if ($SITE->numsections > 0) { if (!$section = get_record('course_sections', 'course', $SITE->id, 'section', 1)) { delete_records('course_sections', 'course', $SITE->id, 'section', 1); // Just in case $section->course = $SITE->id; $section->section = 1; $section->summary = ''; $section->sequence = ''; $section->visible = 1; $section->id = insert_record('course_sections', $section); } if (!empty($section->sequence) or !empty($section->summary) or $editing) { print_box_start('generalbox sitetopic'); /// If currently moving a file then show the current clipboard if (ismoving($SITE->id)) { $stractivityclipboard = strip_tags(get_string('activityclipboard', '', addslashes($USER->activitycopyname))); echo ''; echo "$stractivityclipboard (sesskey">". get_string('cancel') .')'; echo ' '; } $options = NULL; $options->noclean = true; echo format_text($section->summary, FORMAT_HTML, $options); if ($editing) { $streditsummary = get_string('editsummary'); echo " " href="course/editsection.php?id=$section->id"> " class="iconsmall" alt="$streditsummary" /> "; } get_all_mods($SITE->id, $mods, $modnames, $modnamesplural, $modnamesused); print_section($SITE, $section, $mods, $modnamesused, true); if ($editing) { print_section_add_menus($SITE, $section->section, $modnames); } print_box_end(); } } if (isloggedin() and !isguest() and isset($CFG->frontpageloggedin)) { $frontpagelayout = $CFG->frontpageloggedin; } else { $frontpagelayout = $CFG->frontpage; } foreach (explode(',',$frontpagelayout) as $v) { switch ($v) { /// Display the main part of the front page. //下面是显示“本站新闻” case FRONTPAGENEWS: if ($SITE->newsitems) { // Print forums only when needed require_once($CFG->dirroot .'/mod/forum/lib.php'); if (! $newsforum = forum_get_course_forum($SITE->id, 'news')) { error('Could not find or create a main news forum for the site'); } if (!empty($USER->id)) { $SESSION->fromdiscussion = $CFG->wwwroot; $subtext = ''; if (forum_is_subscribed($USER->id, $newsforum)) { if (!forum_is_forcesubscribed($newsforum)) { $subtext = get_string('unsubscribe', 'forum'); } } else { $subtext = get_string('subscribe', 'forum'); } print_heading_block($newsforum->name); echo 'id.'">'.$subtext.' '; } else { print_heading_block($newsforum->name); } forum_print_latest_discussions($SITE, $newsforum, $SITE->newsitems, 'header', 'p.modified DESC'); } break ;//这句是显示首页的“本站新闻”的 //从这里开始显示“课程分类及课程名称”的 case FRONTPAGECOURSELIST: if (isloggedin() and !has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest() and empty($CFG->disablemycourses)) { print_heading_block(get_string('mycourses')); print_my_moodle(); } else if ((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)) and !isguest()) or (count_records('course') |
|