From: moodler Date: Sat, 14 Jun 2003 12:17:13 +0000 (+0000) Subject: JUmp menu from week to week X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=584ec10ecc9d5b7947d3211dbc7d67323f96692b;p=moodle.git JUmp menu from week to week --- diff --git a/course/format/weeks.php b/course/format/weeks.php index 741fd9076a..9c9f719098 100644 --- a/course/format/weeks.php +++ b/course/format/weeks.php @@ -23,6 +23,7 @@ $stradd = get_string("add"); $stractivities = get_string("activities"); $strshowallweeks = get_string("showallweeks"); + $strweek = get_string("week"); if (isediting($course->id)) { $strstudents = moodle_strtolower($course->students); $strweekhide = get_string("weekhide", "", $strstudents); @@ -118,6 +119,7 @@ $timenow = time(); $weekdate = $course->startdate; // this should be 0:00 Monday of that week $section = 1; + $sectionmenu = array(); $weekofseconds = 604800; $course->enddate = $course->startdate + ($weekofseconds * $course->numsections); @@ -130,6 +132,7 @@ $endweekday = userdate($weekdate+518400, $strftimedateshort); if (!empty($displaysection) and $displaysection != $section) { // Check this week is visible + $sectionmenu["week=$section"] = s("$strweek $section | $weekday - $endweekday"); $section++; $weekdate = $nextweekdate; continue; @@ -238,6 +241,13 @@ $weekdate = $nextweekdate; } echo ""; + + if (!empty($sectionmenu)) { + echo "
"; + echo popup_form("$CFG->wwwroot/course/view.php?id=$course->id&", $sectionmenu, + "sectionmenu", "", get_string("jumpto"), "", "", true); + echo "
"; + } if (!empty($news) or !empty($course->showrecent)) { echo "";