".
"";
// this is the main table
echo "";
if ($form->hours >1) {
echo "\n";
for($i=1;$i<=$form->hours;$i++) {
echo "\n";
}
echo " \n";
} // if more than one hour for each day
echo "\n";
echo "\n";
echo "\n";
$P=get_string("presentshort","attendance");
$T=get_string("tardyshort","attendance");
$A=get_string("absentshort","attendance");
// generate the headers for the attendance hours
for($i=1;$i<=$form->hours;$i++) {
echo "\n";
echo "\n";
echo "\n";
}
echo " \n";
$table->head = array("Last Name","First Name","ID",
get_string("presentlong","attendance"),
get_string("tardylong","attendance"),
get_string("absentlong","attendance"));
$table->align = array("left", "left", "left", "center","center","center");
$table->wrap = array("nowrap", "nowrap", "nowrap", "nowrap", "nowrap", "nowrap");
$table->width = "80";
$students = attendance_get_course_students($form->course, "u.lastname ASC");
$i=0;
foreach ($students as $student) {
echo "".$student->lastname." | \n";
echo "".$student->firstname." | \n";
echo "".$student->idnumber." | \n";
for($j=1;$j<=$form->hours;$j++) {
// set the attendance defaults for each student
$r1c=$r2c=$r3c=" ";
$rollstatus = (($form->edited==0)?$CFG->attendance_default_student_status:
((isset($sroll[$student->id][$j]->status)?$sroll[$student->id][$j]->status:0)));
if ($rollstatus==1) {$r2c="checked";}
elseif ($rollstatus==2) {$r3c="checked";}
else {$r1c="checked";}
$radio1="id."_".$j."\" value=\"0\" ".$r1c.">";
$radio2="id."_".$j."\" value=\"1\" ".$r2c.">";
$radio3="id."_".$j."\" value=\"2\" ".$r3c.">";
echo "".$radio1." | \n";
echo "".$radio2." | \n";
echo "".$radio3." | \n";
} // for loop
echo " \n";
// $radio1="id."\" value=\"0\" checked>";
// $radio2="id."\" value=\"1\">";
// $radio3="id."\" value=\"2\">";
// $table->data[$i]=array($student->lastname, $student->firstname,
// $student->idnumber, $radio1,$radio2,$radio3);
// $i++;
}
// doing the table manually now
// print_table($table);
// ending for both the tables
echo " |