]> _ Git - fluidbook-html5.git/commitdiff
#2183 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 Aug 2018 13:56:34 +0000 (15:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 21 Aug 2018 13:56:34 +0000 (15:56 +0200)
js/libs/fluidbook/fluidbook.js
js/libs/scorm/scorm.js

index 1725c316af2334fb7dc4a13ddb58ec6642a0bcf6..c704aa3252dd2c1fbcf398e3e82aacc7c1efae45 100644 (file)
@@ -104,11 +104,18 @@ Fluidbook.prototype = {
         this.initKeyboardShortcuts();
     },
 
-    setMaxPage: function (p) {
+    setMaxPage: function (p, allowbackwards) {
+        if (allowbackwards === undefined) {
+            allowbackwards = false;
+        }
         if (p === undefined || p <= 0) {
             p = this.datas.pages;
         }
 
+        if (!allowbackwards && p < this.maxPage) {
+            return;
+        }
+
         this.maxPage = Math.min(p, this.datas.pages);
         this.updateMaxPage();
     },
index edd4a396b22c098eee190f7db881dab56d35d46b..811a58d79e7ec62be30130a2a483ce3d49e4e555 100644 (file)
@@ -211,6 +211,7 @@ function displayScormInteraction(id) {
 function answerScormInteraction(id, learner_response, result, set_latency) {
     var n = scormIdToN(id);
     var currentTime = Math.round(new Date().getTime() / 1000);
+    displayScormInteraction(id);
     var latency = getScormTimeInterval(SCORM_QUESTIONS[n].timestamp, new Date());
 
     if (fluidbook.scorm.manageScore) {