]> _ Git - fluidbook-html5.git/commitdiff
wip #3637 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 12 May 2020 12:33:30 +0000 (14:33 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 12 May 2020 12:33:30 +0000 (14:33 +0200)
_imsmanifest.12.xml
js/libs/fluidbook/fluidbook.slideshow.js
js/libs/scorm/scorm.js

index da320213abb8d0abac4606e86ccf70e9af84af50..576405468b8ccf976a23062a451d7e939611f1d0 100644 (file)
     <organizations default="$scorm_org">
         <organization identifier="$scorm_org" structure="hierarchical">
             <title>$scorm_title</title>
-            <item identifier="$scorm_id" identifierref="$scorm_id" isvisible="true">
+            <item identifier="$scorm_id" identifierref="$scorm_id_RES" isvisible="true">
                 <title>$scorm_title</title>
             </item>
         </organization>
     </organizations>
     <resources>
-        <resource type="webcontent" adlcp:scormtype="sco" identifier="$scorm_id" href="index.html">
+        <resource type="webcontent" adlcp:scormtype="sco" identifier="$scorm_id_RES" href="index.html">
             <file href="index.html"/>
         </resource>
     </resources>
index a838c44812e30695cbfaa324d7f00ad04e849be8..039bcd5fa964a260def40a582f1ddafb602ab831 100644 (file)
@@ -48,14 +48,14 @@ FluidbookSlideshow.prototype = {
         if (showThumbnails) {
             // Thumbnails slider
             $thumbnails.slick({
-                slidesToShow: 6,
+                slidesToShow: $slideshow.length,
                 asNavFor: '#' + id, // Synced with main slider
                 focusOnSelect: true,
                 variableWidth: true,
                 arrows: false,
                 draggable: true,
                 swipeToSlide: true,
-                infinite: true,
+                infinite: false,
                 centerMode: false,
             });
 
index 47b1752cd1d8ceda6c7beb713d2d41e7a2d87ffd..e9ad742c3afbbcbfbbcff1b12a2aadc81cd0820d 100644 (file)
@@ -39,10 +39,10 @@ function initScorm() {
     } catch (e) {
 
     }
-    setScormValue('exit', 'suspend');
-    startScormTimer();
 
     $(document).on('fluidbook.ready', function () {
+        scormExit();
+        startScormTimer();
         initScormEvents();
         initScormInteractions();
     });
@@ -144,13 +144,17 @@ function finishScorm() {
 }
 
 function scormMarkAsComplete() {
-    setScormValue('exit', 'suspend');
+    scormExit();
     setScormValue('status', "completed");
     if (!fluidbook.scorm.manageScore) {
         setScormValue('success_status', 'passed');
     }
 }
 
+function scormExit() {
+    setScormValue('exit', fluidbook.settings.scorm_force_attempts ? 'logout' : 'suspend');
+}
+
 function startScormTimer() {
     SCORM_START_TIME = new Date();
 }