Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some "not defined" messages

  • Loading branch information...
commit 4c20cd82f20d309f59c9ac6550ff08ec04dae8a2 1 parent d08ffdd
authored October 22, 2004

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. 8  mod/attendance/view.php
8  mod/attendance/view.php
@@ -64,7 +64,9 @@
64 64
        $sroll[$roll->userid][$roll->hour]->status=$roll->status;
65 65
        $sroll[$roll->userid][$roll->hour]->notes=$roll->notes;
66 66
      }
67  
-   }
  67
+   } else {
  68
+       $sroll = array(); //just to set default value
  69
+   }    
68 70
 
69 71
    // get the list of attendance records for all hours of the given day and 
70 72
    // put it in the array for use in the attendance table
@@ -128,8 +130,8 @@
128 130
       $abs=$tar=0;
129 131
       for($j=1;$j<=$form->hours;$j++) {
130 132
       // set the attendance defaults for each student
131  
-          if ($sroll[$student->id][$j]->status == 1) {$status=$T;$tar++;}
132  
-          elseif ($sroll[$student->id][$j]->status == 2) {$status=$A;$abs++;}
  133
+          if (isset ($sroll[$student->id][$j]->status) && $sroll[$student->id][$j]->status == 1 ) {$status=$T;$tar++;}
  134
+          elseif (isset ($sroll[$student->id][$j]->status) && $sroll[$student->id][$j]->status == 2 ) {$status=$A;$abs++;}
133 135
         else {$status=$P;}
134 136
       echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-left: 1px dotted; border-top: 1px solid;\">".$status."</td>\n";
135 137
       } /// for loop

0 notes on commit 4c20cd8

Please sign in to comment.
Something went wrong with that request. Please try again.