From 1c1f335a75c0c0a49d68a91b24b1803e665440b9 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Tue, 3 Oct 2017 12:09:25 +1300 Subject: [PATCH] Fix #279 - fix for php 5.4 compatibility. --- attendance.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/attendance.php b/attendance.php index 8b9bda8..cf9d3ec 100644 --- a/attendance.php +++ b/attendance.php @@ -39,7 +39,8 @@ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST) // Require the user is logged in. require_login($course, true, $cm); -if (empty(get_config('attendance', 'studentscanmark')) || empty($attforsession->studentscanmark)) { +$canmark = get_config('attendance', 'studentscanmark'); +if (empty($canmark) || empty($attforsession->studentscanmark)) { redirect(new moodle_url('/mod/attendance/view.php', array('id' => $cm->id))); exit; }