From 60e9b78a3903d0c08a0542d21941ccb3b92c0033 Mon Sep 17 00:00:00 2001 From: Christian Lawson-Perfect Date: Tue, 5 Sep 2023 10:14:46 +0100 Subject: [PATCH] Converted loaded exam end time to a Date --- runtime/scripts/exam.js | 2 +- tests/numbas-runtime.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/scripts/exam.js b/runtime/scripts/exam.js index 87db0cae8..acbb313e6 100644 --- a/runtime/scripts/exam.js +++ b/runtime/scripts/exam.js @@ -622,7 +622,7 @@ Exam.prototype = /** @lends Numbas.Exam.prototype */ { this.settings.numQuestions = numQuestions; this.start = new Date(suspendData.start); if(suspendData.stop) { - this.stop = suspendData.stop + this.stop = new Date(suspendData.stop); } if(this.settings.allowPause) { this.timeSpent = suspendData.timeSpent; diff --git a/tests/numbas-runtime.js b/tests/numbas-runtime.js index 1523ff0e0..98994bff5 100644 --- a/tests/numbas-runtime.js +++ b/tests/numbas-runtime.js @@ -23751,7 +23751,7 @@ Exam.prototype = /** @lends Numbas.Exam.prototype */ { this.settings.numQuestions = numQuestions; this.start = new Date(suspendData.start); if(suspendData.stop) { - this.stop = suspendData.stop + this.stop = new Date(suspendData.stop); } if(this.settings.allowPause) { this.timeSpent = suspendData.timeSpent;