Index: temp_moodle_dev/moodle/mod/scorm/locallib.php =================================================================== diff -u -r5251d2a62e0e78377219456d6bba613eb2d1fd26 -r146563e0853fa97dc0d4bab2214908820c71285a --- temp_moodle_dev/moodle/mod/scorm/locallib.php (.../locallib.php) (revision 5251d2a62e0e78377219456d6bba613eb2d1fd26) +++ temp_moodle_dev/moodle/mod/scorm/locallib.php (.../locallib.php) (revision 146563e0853fa97dc0d4bab2214908820c71285a) @@ -548,8 +548,8 @@ } echo ''; } - -function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') { +//lams: we pass a new variable (editing) to the function so the page player.php can know we are editing or ot in aim to display the correct lams' button +function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='',$editing=null) { global $CFG; if ($scorm->updatefreq == UPDATE_EVERYTIME){ @@ -604,8 +604,8 @@ $scorm->version = 'scorm_12'; } require_once($CFG->dirroot.'/mod/scorm/datamodels/'.$scorm->version.'lib.php'); - - $result = scorm_get_toc($user,$scorm,'structlist',$orgidentifier); + //lams: we pass a new variable (editing) to the function so the page player.php can know we are editing or ot in aim to display the correct lams' button + $result = scorm_get_toc($user,$scorm,'structlist',$orgidentifier,'','normal','',false,$editing); $incomplete = $result->incomplete; echo $result->toc; print_simple_box_end(); @@ -646,11 +646,12 @@ if ($scoes && (count($scoes) == 1)) { if ($scorm->skipview >= 1) { $sco = current($scoes); + //lams: we pass a new variable (editing) to the function so the page player.php can know we are editing or ot in aim to display the correct lams' button if (scorm_get_tracks($sco->id,$user->id) === false) { - header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id); + header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id.'&editing='.$editing); $result = true; } else if ($scorm->skipview == 2) { - header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id); + header('Location: player.php?a='.$scorm->id.'&scoid='.$sco->id.'&editing='.$editing); $result = true; } } @@ -698,7 +699,8 @@ $scorm->launch = scorm_parse_aicc($referencedir, $scorm->id); } else { require_once('datamodels/scormlib.php'); - $scorm->launch = scorm_parse_scorm($referencedir,$scorm->id); + //we pass the variables "is_lams" and "scormid" to be able to modify the path of the launch property + $scorm->launch = scorm_parse_scorm($referencedir,$scorm->id,$scorm->is_lams); } return $scorm->launch; }