From 77fed6adbe9db97246963ee3b95fadc93fb73a91 Mon Sep 17 00:00:00 2001 From: Luis Ramon Lopez Date: Fri, 21 Jan 2011 18:03:03 +0100 Subject: [PATCH] Copy from other sessions now also works in list view mode --- attendances.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/attendances.php b/attendances.php index 00b2eed..e56084a 100644 --- a/attendances.php +++ b/attendances.php @@ -234,7 +234,10 @@ $table->data[$student->id][] = "id}\">".((!$att && $update) ? '' : '').fullname($student).((!$att && $update) ? '' : '').''; foreach($statuses as $st) { - @$table->data[$student->id][] = 'id == $att->statusid ? 'checked' : '').'>'; + $copyid = ($copyfrom == "-1") ? $sessionid : $copyfrom; + $att = get_record('attendance_log', 'sessionid', $copyid, 'studentid', $student->id); + $currentstatusid = $att===false ? -1 : $att->statusid; + @$table->data[$student->id][] = 'id == $currentstatusid ? 'checked' : '').'>'; } $table->data[$student->id][] = ''; }