// Mark complete when the user reaches the last page
- $(this.fluidbook).on('fluidbook.page.change.end', function () {
- if ($this.fluidbook.settings.scorm_complete_on_last_page && $this.fluidbook.currentPage === $this.fluidbook.settings.pages) {
- scormMarkAsComplete();
- }
- });
+ if (this.fluidbook.settings.scorm_complete_on_last_page) {
+ $(this.fluidbook).on('fluidbook.page.change.end', function () {
+ if ($this.fluidbook.currentPage === $this.fluidbook.settings.pages) {
+ scormMarkAsComplete();
+ }
+ });
+ }
},
hideScormLinks: function () {
}
+ try {
+ if (FORCE_SCORM) {
+ SCORM_OK = true;
+ }
+ }catch (e) {
+
+ }
+
if (SCORM_OK) {
$(document).on('fluidbook.ready', function () {
scormExit();
initScormEvents();
initScormInteractions();
});
- }else{
+ } else {
console.log('SCORM nok');
}
return SCORM_OK;
}
SCORM_LOCATION_INITED = true;
var currentLocation = getScormValue('location');
- try {
- var changePage = false;
- if (currentLocation.indexOf('page_') === 0) {
- var e = currentPage.split('_');
- if (e.length === 2 && e[0] === 'page') {
- fluidbook.setCurrentPage(e[1]);
- changePage = true;
- }
- } else if (currentLocation.indexOf('{') === 0) {
- var location = JSON.parse(currentLocation);
- if (location.maxPage) {
- fluidbook.contentlock.setMaxPage(location.maxPage, true);
+ console.log(currentLocation, 'null');
+ if (currentLocation !== 'null') {
+ try {
+ var changePage = false;
+ if (currentLocation.indexOf('page_') === 0) {
+ var e = currentPage.split('_');
+ if (e.length === 2 && e[0] === 'page') {
+ fluidbook.setCurrentPage(e[1]);
+ changePage = true;
+ }
+ } else if (currentLocation.indexOf('{') === 0) {
+ var location = JSON.parse(currentLocation);
+ if (location.maxPage) {
+ fluidbook.contentlock.setMaxPage(location.maxPage, true);
+ }
+ if (location.page) {
+ fluidbook.setCurrentPage(location.page);
+ changePage = true;
+ }
}
- if (location.page) {
- fluidbook.setCurrentPage(location.page);
- changePage = true;
- }
- }
- if (changePage) {
- fluidbook.splash.hideSplashTimeout = 6;
+ } catch (err) {
+ console.log(err);
}
- } catch (err) {
- console.log(err);
}