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 = "";
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 = "";