From c394dccf878831a8943df51b39356bcd22be5d1c Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 28 Sep 2018 10:52:28 +1200 Subject: [PATCH] Show message to user if preventsharederror is hit. --- classes/output/mobile.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/output/mobile.php b/classes/output/mobile.php index c367c7d..b2c2d1f 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -139,7 +139,11 @@ class mobile { continue; } } - list($canmark, $reason) = attendance_can_student_mark($sess, false); + list($canmark, $reason) = attendance_can_student_mark($sess); + if ($reason == 'preventsharederror') { + $data['showmessage'] = true; + $data['messages'][]['string'] = 'preventsharederror'; // Lang string to show as a message. + } if ($isteacher || $canmark) { $html = array('time' => attendance_construct_session_time($sess->sessdate, $sess->duration));