]> git.mjollnir.org Git - moodle.git/commitdiff
Small fix to avoid PHP warnings
authormoodler <moodler>
Fri, 21 Mar 2003 04:49:29 +0000 (04:49 +0000)
committermoodler <moodler>
Fri, 21 Mar 2003 04:49:29 +0000 (04:49 +0000)
course/topics.php
course/weeks.php

index a91cd48063b0db4be225e5d95d71058419635548..7f2970d737f9d3ce47bbd5b77b22a18c15e9d945 100644 (file)
 
         echo "<TD VALIGN=top $colormain WIDTH=\"100%\">";
 
-        if (! $thissection = $sections[$section]) {
+        if (!empty($sections[$section])) {
+            $thissection = $sections[$section];
+
+        } else {
             $thissection->course = $course->id;   // Create a new section structure
             $thissection->section = $section;
             $thissection->summary = "";
index dbcfaf283d26446f4cb6b3ed46aed1a1d60d0b3f..b76b7b764ea6064b9b44795c4a82b892e80d456c 100644 (file)
         echo "<TD $colormain VALIGN=top WIDTH=\"100%\">";
         echo "<P><FONT SIZE=3 COLOR=\"$THEME->cellheading2\">$weekday - $endweekday</FONT></P>";
 
-        if (! $thisweek = $sections[$week]) {
+        if (!empty($sections[$week])) {
+            $thisweek = $sections[$week];
+        } else {
             $thisweek->course = $course->id;   // Create a new week structure
             $thisweek->section = $week;
             $thisweek->summary = "";