MDL-33702 scorm: refactoring interraction report to use '2004 SCORM' score elements

This commit is contained in:
Ankit Agarwal 2012-06-28 14:53:32 +08:00
parent 57a32d3eb6
commit 9381c28084
3 changed files with 7 additions and 12 deletions

View File

@ -456,13 +456,8 @@ class scorm_interactions_report extends scorm_default_report {
if ($trackdata->score_raw != '') {
$score = $trackdata->score_raw;
// add max score if it exists
if ($scorm->version == 'SCORM_1.3') {
$maxkey = 'cmi.score.max';
} else {
$maxkey = 'cmi.core.score.max';
}
if (isset($trackdata->$maxkey)) {
$score .= '/'.$trackdata->$maxkey;
if (isset($trackdata->score_max)) {
$score .= '/'.$trackdata->score_max;
}
// else print out status
} else {

View File

@ -279,7 +279,7 @@ if (!empty($b)) {
$printedelements[]=$objectiveid;
// Merge 2004 and 1.2 SCORM formats
if (!scorm_version_check($scorm->version, SCORM_13)) {
if (scorm_version_check($scorm->version, SCORM_13)) {
$sucstatuskey = 'cmi.objectives.'.$i.'.success_status';
$progstatuskey = 'cmi.objectives.'.$i.'.progress_measure';
$compstatuskey = 'cmi.objectives.'.$i.'.completion_status';