Update attendance.lib.php