]> git.mjollnir.org Git - moodle.git/commitdiff
Testing new jump menu for topics
authormoodler <moodler>
Sat, 14 Jun 2003 11:50:32 +0000 (11:50 +0000)
committermoodler <moodler>
Sat, 14 Jun 2003 11:50:32 +0000 (11:50 +0000)
course/format/topics.php

index bf76423117ca90a4c8758915e9df3f815c73c481..6713081c38cb7aee92946bd92d31bfbb803e74a8 100644 (file)
         $news = forum_get_course_forum($course->id, "news");
     }
 
-    $streditsummary = get_string("editsummary");
-    $stradd         = get_string("add");
-    $stractivities  = get_string("activities");
+    $streditsummary   = get_string("editsummary");
+    $stradd           = get_string("add");
+    $stractivities    = get_string("activities");
     $strshowalltopics = get_string("showalltopics");
+    $strtopic         = get_string("topic");
     if (isediting($course->id)) { 
         $strstudents = moodle_strtolower($course->students);
         $strtopichide = get_string("topichide", "", $strstudents);
 
     $timenow = time();
     $section = 1;
+    $sectionmenu = array();
 
     while ($section <= $course->numsections) {
 
         if (!empty($displaysection) and $displaysection != $section) {
+            $strsummary= "";
+            if (!empty($sections[$section])) {
+                $strsummary = " - ".substr($sections[$section]->summary, 0, 100);
+            }
+            $sectionmenu["topic=$section"] = "$section$strsummary";
             $section++;
             continue;
         }
         $section++;
     }
     echo "</table>";
+
+    if (!empty($sectionmenu)) {
+        echo "<center>";
+        echo popup_form("$CFG->wwwroot/course/view.php?id=$course->id&", $sectionmenu, 
+                   "sectionmenu", "", get_string("jumpto"), "", "", true);
+        echo "</center>";
+    }
     
 
     if ($news or $course->showrecent) {