Permalink
Browse files

Added support to AICC lauch

  • Loading branch information...
1 parent 88f7551 commit 3332df214235e8616fe4130919fc18790fbd6900 bobopinna committed Apr 18, 2005
Showing with 8 additions and 3 deletions.
  1. +1 −1 mod/scorm/lib.php
  2. +7 −2 mod/scorm/loadSCO.php
View
2 mod/scorm/lib.php
@@ -922,7 +922,7 @@ function scorm_display_structure($scorm,$liststyle,$currentorg='',$scoid='',$mod
$nextid = 0;
}
}
- if ($nextid == 0) {
+ if (($nextid == 0) && (count($scoes) > 1)) {
$previd = $sco->id;
}
View
9 mod/scorm/loadSCO.php
@@ -71,15 +71,20 @@
// Forge SCO URL
//
$connector = '';
- if (!empty($sco->parameters)) {
+ $version = substr($scorm->version,0,4);
+ if (!empty($sco->parameters) || ($version == 'AICC')) {
if (stripos($sco->launch,'?') !== false) {
$connector = '&';
} else {
$connector = '?';
}
}
if (scorm_external_link($sco->launch)) {
- $result = $sco->launch;
+ if ($version == 'AICC') {
+ $result = $sco->launch.$connector.'aicc_sid='.$CFG->sesskey.'&aicc_url='.$CFG->wwwroot.'/mod/scorm/aicc.php&'.$sco->parameters;
+ } else {
+ $result = $sco->launch.$connector.$sco->parameters;
+ }
} else {
if ($CFG->slasharguments) {
$result = $CFG->wwwroot.'/file.php/'.$scorm->course.'/moddata/scorm/'.$scorm->id.'/'.$sco->launch.$connector.$sco->parameters;

0 comments on commit 3332df2

Please sign in to comment.