From: Vincent Vanwaelscappel Date: Tue, 12 May 2020 12:33:30 +0000 (+0200) Subject: wip #3637 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0d1894c03631b0f3d2c2c50aa1d88b0b3e8ab1c5;p=fluidbook-html5.git wip #3637 @1.5 --- diff --git a/_imsmanifest.12.xml b/_imsmanifest.12.xml index da320213..57640546 100644 --- a/_imsmanifest.12.xml +++ b/_imsmanifest.12.xml @@ -14,13 +14,13 @@ $scorm_title - + $scorm_title - + diff --git a/js/libs/fluidbook/fluidbook.slideshow.js b/js/libs/fluidbook/fluidbook.slideshow.js index a838c448..039bcd5f 100644 --- a/js/libs/fluidbook/fluidbook.slideshow.js +++ b/js/libs/fluidbook/fluidbook.slideshow.js @@ -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, }); diff --git a/js/libs/scorm/scorm.js b/js/libs/scorm/scorm.js index 47b1752c..e9ad742c 100644 --- a/js/libs/scorm/scorm.js +++ b/js/libs/scorm/scorm.js @@ -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(); }