Index: temp_moodle_dev/moodle/mod/scorm/locallib.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/scorm/locallib.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/scorm/locallib.php 14 Nov 2008 06:29:40 -0000 1.1 +++ temp_moodle_dev/moodle/mod/scorm/locallib.php 14 Jan 2009 02:53:28 -0000 1.2 @@ -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; }