|
@ -90,12 +90,15 @@ class mobile { |
|
|
|
|
|
|
|
|
$data['sessions'] = array(); |
|
|
$data['sessions'] = array(); |
|
|
|
|
|
|
|
|
$userdata = new \attendance_user_data($att, $USER->id, true); |
|
|
if ($isteacher) { |
|
|
|
|
|
$sessions = array(); // Support for teacher marking not implemented yet. |
|
|
$sessions = $DB->get_records_select('attendance_sessions', |
|
|
} else { |
|
|
'attendanceid = ? AND sessdate > ? ORDER BY sessdate', array($attendance->id, $time)); |
|
|
$sessions = $DB->get_records_select('attendance_sessions', |
|
|
|
|
|
'attendanceid = ? AND sessdate > ? ORDER BY sessdate', array($attendance->id, $time)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!empty($sessions)) { |
|
|
if (!empty($sessions)) { |
|
|
|
|
|
$userdata = new \attendance_user_data($att, $USER->id, true); |
|
|
foreach ($sessions as $sess) { |
|
|
foreach ($sessions as $sess) { |
|
|
if (!$isteacher && empty($userdata->sessionslog['c'.$sess->id])) { |
|
|
if (!$isteacher && empty($userdata->sessionslog['c'.$sess->id])) { |
|
|
// This session isn't viewable to this student - probably a group session. |
|
|
// This session isn't viewable to this student - probably a group session. |
|
|