-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.3, 3.0, 3.0.1, 3.2.5, 3.3.2
-
MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MDL-52653-master -
The number of attempts for a SCORM 2004 activity is never incremented. This is due to a bug in the function scorm_check_mode (/mod/scorm/lib.php).
the line
$tracks = $DB->get_recordset('scorm_scoes_track', array('scormid' => $scorm->id, 'userid' => $userid, 'attempt' => $attempt, 'element' => 'cmi.core.lesson_status')) |
will never give a result for a SCORM 2004 since "cmi.core.lesson_status" is for SCORM 1.2 api only.
Proposal :
add a line before and change this line :
$element = (scorm_version_check($scorm->version, SCORM_13)) ? 'cmi.completion_status' : 'cmi.core.lesson_status'; |
$tracks = $DB->get_recordset('scorm_scoes_track', array('scormid' => $scorm->id, 'userid' => $userid, 'attempt' => $attempt, 'element' => $element)); |
Worked for me.
Jean-Sébastien Rousseau-Piot
Belgium