From 4c9044212435ae1bc4e70292784e195e7eb4762a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 31 Mar 2015 02:28:36 +0000 Subject: fix bug: time wasting clock not fully restored When the value of the time wasting clock was restored from the browser's local storage, the hidden form field in the end of class form was left with a value of zero. So if the lesson ends after a browser restart with no further time wasted, the time on the clock was not submitted. --- assets/js/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/main.js b/assets/js/main.js index f0c1941..072f6bd 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -291,6 +291,7 @@ var timeWastingClock = MyFlipClock($('#time-wasting-clock'), { } }); timeWastingClock.setTime($.jStorage.get("time_wasted", 0)); +$("#class_time_wasted").val($.jStorage.get("time_wasted", 0)); timeWastingClock.running = false; timeWastingClock.reset = $.proxy(function () { -- cgit v1.2.3