From 1d0196520e37ea7cc4f43b23023a7f7d51959ed5 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 14 Jun 2003 11:50:32 +0000 Subject: [PATCH] Testing new jump menu for topics --- course/format/topics.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/course/format/topics.php b/course/format/topics.php index bf76423117..6713081c38 100644 --- a/course/format/topics.php +++ b/course/format/topics.php @@ -29,10 +29,11 @@ $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); @@ -130,10 +131,16 @@ $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; } @@ -244,6 +251,13 @@ $section++; } echo ""; + + if (!empty($sectionmenu)) { + echo "
"; + echo popup_form("$CFG->wwwroot/course/view.php?id=$course->id&", $sectionmenu, + "sectionmenu", "", get_string("jumpto"), "", "", true); + echo "
"; + } if ($news or $course->showrecent) { -- 2.39.5