MDL-33755 mod/scorm: directview scorm activity

Enable direct view of scorm activity from the course
overview page

Conflicts:

	mod/scorm/view.js
This commit is contained in:
Piers Harding 2012-06-15 11:34:34 +12:00 committed by Dan Marsden
parent 02ed0df5ae
commit 35cfa9e62c
4 changed files with 52 additions and 7 deletions

View file

@ -4,6 +4,14 @@ M.mod_scormform.init = function(Y) {
var cwidth = scormplayerdata.cwidth;
var cheight = scormplayerdata.cheight;
var poptions = scormplayerdata.popupoptions;
var courseid = scormplayerdata.courseid;
var launch = scormplayerdata.launch;
var currentorg = scormplayerdata.currentorg;
var sco = scormplayerdata.sco;
var scorm = scormplayerdata.scorm;
var launch_url = M.cfg.wwwroot+"/mod/scorm/player.php?a="+scorm+"&currentorg="+currentorg+"&scoid="+sco+"&sesskey="+M.cfg.sesskey;
var course_url = M.cfg.wwwroot+"/course/view.php?id="+courseid+"&sesskey="+M.cfg.sesskey;
if ((cwidth==100) && (cheight==100)) {
poptions = poptions+',width='+screen.availWidth+',height='+screen.availHeight+',left=0,top=0';
} else {
@ -15,5 +23,13 @@ M.mod_scormform.init = function(Y) {
}
poptions = poptions+',width='+cwidth+',height='+cheight;
}
scormform.onsubmit = function() {window.open('', 'Popup', poptions); this.target='Popup';};
if (launch != 0) {
if (launch == 2) {
launch_url = launch_url+"&display=popup";
}
window.open(launch_url,'Popup', poptions);
parent.window.location = course_url;
}
scormform.onsubmit = function() {window.open('', 'Popup', poptions); this.target='Popup'; parent.window.location = course_url;};
}