]> git.mjollnir.org Git - moodle.git/commitdiff
Forums index page, add table headers for section/week MDL-7480
authorskodak <skodak>
Wed, 22 Nov 2006 07:48:35 +0000 (07:48 +0000)
committerskodak <skodak>
Wed, 22 Nov 2006 07:48:35 +0000 (07:48 +0000)
and fixed section_links block for weekscss format

blocks/section_links/block_section_links.php
mod/forum/index.php

index 35b0b348a68f18d55a5ab011d7ef56c417565258..106c00aaa5a26d5fb51a9b8641f53ff093faf523 100644 (file)
@@ -45,7 +45,7 @@ class block_section_links extends block_base {
         $course = get_record('course', 'id', $this->instance->pageid);
         $context = get_context_instance(CONTEXT_COURSE, $course->id);
 
-        if ($course->format == 'weeks') {
+        if ($course->format == 'weeks' or $course->format == 'weekscss') {
             $highlight = ceil((time()-$course->startdate)/604800);
             $linktext = get_string('jumptocurrentweek', 'block_section_links');
             $sectionname = 'week';
index 1fb026810099c63dd86aef4c6c668c69f48386ae..2b182f093141cbbdea8dcde6415fb126ad6ca796 100644 (file)
@@ -41,6 +41,8 @@
     $stryes = get_string('yes');
     $strno = get_string('no');
     $strrss = get_string("rss");
+    $strweek = get_string('week');
+    $strsection = get_string('section');
 
     $searchform = forum_search_form($course);
 
 
     if ($course->id != SITEID) {    // Only real courses have learning forums
         // Add extra field for section number, at the front
-        array_unshift($learningtable->head, "");
+        if ($course->format == 'weeks' or $course->format == 'weekscss') {
+            array_unshift($learningtable->head, $strweek);
+        } else {
+            array_unshift($learningtable->head, $strsection);
+        }
         array_unshift($learningtable->align, "center");