From 078484f2e240df8281ac018c3497bca12c84f1a6 Mon Sep 17 00:00:00 2001 From: Neill Magill Date: Fri, 29 Sep 2017 16:16:55 +0100 Subject: [PATCH] MDL-60300 Quiz: Offline update time not set correctly --- mod/quiz/attemptlib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index 578144bd7d0..3156b1b442a 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -2325,7 +2325,7 @@ class quiz_attempt { * This function should be used only when web services are being used. * * @param int $time time stamp - * @return boolean false if the field is not updated becase web services aren't being used. + * @return boolean false if the field is not updated because web services aren't being used. * @since Moodle 3.2 */ public function set_offline_modified_time($time) { @@ -2333,7 +2333,8 @@ class quiz_attempt { // Update the timemodifiedoffline field only if web services are being used. if (WS_SERVER) { - $attemptobj->attempt->timemodifiedoffline = $time; + $this->attempt->timemodifiedoffline = $time; + return true; } return false; }