From 2b32888ff9b302c65b5355f3f7c5dd20c7af933a Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 17 Sep 2019 10:01:54 +1200 Subject: [PATCH] Fix #427 - correct some bad sql. --- locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index 426ab05..01bd79e 100644 --- a/locallib.php +++ b/locallib.php @@ -458,7 +458,7 @@ function attendance_can_student_mark($sess, $log = true) { $record = $DB->get_record_select('attendance_log', $sql, $params); } else { // Assume ATTENDANCE_SHAREDIP_FORCED. - $sql = 'sessionid = ? AND studentid <> ? ipaddress = ?'; + $sql = 'sessionid = ? AND studentid <> ? AND ipaddress = ?'; $params = array($sess->id, $USER->id, getremoteaddr()); $record = $DB->get_record_select('attendance_log', $sql, $params); }