]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed week zooming
authormartin <martin>
Wed, 10 Jul 2002 15:17:43 +0000 (15:17 +0000)
committermartin <martin>
Wed, 10 Jul 2002 15:17:43 +0000 (15:17 +0000)
course/weeks.php

index 870248b897a499e72c03192c6c82496f2c9dda08..00a0d556215610e14edbd5d09dcf2411089ce5f1 100644 (file)
         $sections[$cw->section] = $cw;
     }
 
-    if (isset($section)) {
-        if ($section == "all") {
+    if (isset($week)) {
+        if ($week == "all") {
             unset($USER->section);
         } else {
-            $USER->section = $section;
+            $USER->section = $week;
         }
     }
 
 
         $nextweekdate = $weekdate + ($weekofseconds);
 
-        if (isset($USER->week)) {         // Just display a single week
-            if ($USER->week != $week) { 
+        if (isset($USER->section)) {         // Just display a single week
+            if ($USER->section != $week) { 
                 $week++;
                 $weekdate = $nextweekdate;
                 continue;
         echo "</TD>";
         echo "<TD NOWRAP BGCOLOR=\"$highlightcolor\" VALIGN=top ALIGN=CENTER WIDTH=10>";
         echo "<FONT SIZE=1>";
-        if (isset($USER->week)) {
+        if (isset($USER->section)) {
             echo "<A HREF=\"view.php?id=$course->id&week=all\" TITLE=\"Show all weeks\"><IMG SRC=../pix/i/all.gif BORDER=0></A></FONT>";
         } else {
             echo "<A HREF=\"view.php?id=$course->id&week=$week\" TITLE=\"Show only week $week\"><IMG SRC=../pix/i/one.gif BORDER=0></A></FONT>";