Skip to content

Commit

Permalink
Fixed some "not defined" messages
Browse files Browse the repository at this point in the history
  • Loading branch information
paca70 committed Oct 22, 2004
1 parent d08ffdd commit 4c20cd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mod/attendance/view.php
Expand Up @@ -64,7 +64,9 @@
$sroll[$roll->userid][$roll->hour]->status=$roll->status;
$sroll[$roll->userid][$roll->hour]->notes=$roll->notes;
}
}
} else {
$sroll = array(); //just to set default value
}

// get the list of attendance records for all hours of the given day and
// put it in the array for use in the attendance table
Expand Down Expand Up @@ -128,8 +130,8 @@
$abs=$tar=0;
for($j=1;$j<=$form->hours;$j++) {
// set the attendance defaults for each student
if ($sroll[$student->id][$j]->status == 1) {$status=$T;$tar++;}
elseif ($sroll[$student->id][$j]->status == 2) {$status=$A;$abs++;}
if (isset ($sroll[$student->id][$j]->status) && $sroll[$student->id][$j]->status == 1 ) {$status=$T;$tar++;}
elseif (isset ($sroll[$student->id][$j]->status) && $sroll[$student->id][$j]->status == 2 ) {$status=$A;$abs++;}
else {$status=$P;}
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-left: 1px dotted; border-top: 1px solid;\">".$status."</td>\n";
} /// for loop
Expand Down

0 comments on commit 4c20cd8

Please sign in to comment.