3.6.0.3 Chiusura automatica iframe visualizzazione scorm
- davide.desimone
- FormaLms User
- Posts: 108
- Joined: Sun Mar 04, 2012 12:11 pm
3.6.0.3 Chiusura automatica iframe visualizzazione scorm
il corso è generato con articulate presenter, alla chiusura del popup la pagina con il bottone "launch" si scarica ma l'iframe rimane aperto.
qualcuno sa darmi una soluzione?
- davide.desimone
- FormaLms User
- Posts: 108
- Joined: Sun Mar 04, 2012 12:11 pm
Re: 3.6.0.3 Chiusura automatica iframe visualizzazione scorm
file /doceboLms/modules/scorm/player.js:
sostituire questa funzione:
Code: Select all
ScormPlayer.prototype.blankPageLoaded = function() {
/*if(window.close_player) {
var url = window.top.location.href;
url = url.slice(0, url.lastIndexOf("/"));
window.top.location.href = url + "/" + playerConfig.backurl;
} else {
this.playNext();
}*/
//if we are in a single sco environment we can close the player
if(window.close_player) {
window.top.onbeforeunload = null;
/*var url = window.top.location.href;
url = url.slice(0, url.lastIndexOf("/"));
window.top.location.href = url + "/" + playerConfig.backurl;*/
window.top.location.href = playerConfig.lms_base_url + "" + playerConfig.backurl;
} else {
this.playNext();
}
}Code: Select all
ScormPlayer.prototype.singleSco = function() {
var item = this.xmlTree.selectNodes('//item[@resource!=""]');
if(item.length == 1) return true
else return false
}sostituire:
Code: Select all
StdUIPlayer.prototype.scormPlayerActionPerformer = function( evType, evValue) {
switch( evType ) {
case 'Initialize':
if( playerConfig.autoplay == '1' ) {
// set next scoid
var currScoId = this.scormPlayer.getCurrScoId();
var nextScoid = this.scormPlayer.getNextScoId(currScoId);
this.scormPlayer.setNextToPlay(nextScoid, this.cntSco);
}
break;
case 'Finish':
StdUIPlayer.refresh();
if(this.scormPlayer.singleSco()) window.close_player = true;
this.scormPlayer.play(null, this.cntSco);
break;
case 'BeforeScoLoad':
var elem = this.cntTree.ownerDocument.getElementById(evValue);
if(elem.className.indexOf('RunningSco') == -1) { elem.className += ' RunningSco' };
break;
}
}Re: 3.6.0.3 Chiusura automatica iframe visualizzazione scorm
scusa ma credo di non aver capito bene il problema che avevi... vorrei anche comprendere se è relativo alla sola versione 3.6.0.3 o anche alla 4.0.5.
Comunque sia, grazie per il fix.
Ciao
- davide.desimone
- FormaLms User
- Posts: 108
- Joined: Sun Mar 04, 2012 12:11 pm
Re: 3.6.0.3 Chiusura automatica iframe visualizzazione scorm
Nella 4.0.5 la pach è già integrata.
Re: 3.6.0.3 Chiusura automatica iframe visualizzazione scorm
Ciao

