-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.1
-
- In Moodle web, create a SCORM using the zip file attached to this issue.
- In the app, play the SCORM and check that it displays a text with the parameters, just like in Moodle web.
-
MOODLE_33_STABLE
-
MOODLE_33_STABLE
-
Moodle Mobile 3.3.2
As part of SCORM 1.2 ADL Standard, "parameters" is "Static parameters to be passed to the content 0 or 1 file at launch time." (References: SCORM 1.2 Technical Specification)
We've noticed that parameters included as element of items are included in "extradata" array (with isvisible element) but is not included in "launch" field in sco objects, so SCORMS doesn't have same behavior in Moodle Mobile app as in Moodle 3.3.1 (and in previous versions since 1.9 we've tested).
However, app loads correctly in "sco.launch" parameters included as part of field href in resources.
To reproduce: Include compulsory parameters for correct behavior of the scorm in the field parameters of an item, and add parameters in href field of the resource of another item (a clone without field parameters) and compare.
We think it must works like it works in Moodle 3.3.1.
// mod/scorm/locallib.php:2182
|
|
$connector = ''; |
$version = substr($scorm->version, 0, 4); |
if ((isset($sco->parameters) && (!empty($sco->parameters))) || ($version == 'AICC')) { |
if (stripos($sco->launch, '?') !== false) { |
$connector = '&'; |
} else { |
$connector = '?'; |
}
|
if ((isset($sco->parameters) && (!empty($sco->parameters))) && ($sco->parameters[0] == '?')) { |
$sco->parameters = substr($sco->parameters, 1); |
}
|
}
|
|
if ($version == 'AICC') { |
require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php"); |
$aiccsid = scorm_aicc_get_hacp_session($scorm->id);
|
if (empty($aiccsid)) { |
$aiccsid = sesskey();
|
}
|
$scoparams = ''; |
if (isset($sco->parameters) && (!empty($sco->parameters))) { |
$scoparams = '&'. $sco->parameters; |
}
|
$launcher = $sco->launch.$connector.'aicc_sid='.$aiccsid.'&aicc_url='.$CFG->wwwroot.'/mod/scorm/aicc.php'.$scoparams; |
} else { |
if (isset($sco->parameters) && (!empty($sco->parameters))) { |
$launcher = $sco->launch.$connector.$sco->parameters;
|
} else { |
$launcher = $sco->launch;
|
}
|
}
|