From e17641e19e257a489f0915f17d196e2d7f25c02b Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 19 Oct 2017 14:55:18 +0800 Subject: [PATCH] MDL-52653 scorm: Comment for cms.completion_status --- mod/scorm/lib.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index f5227b31a80..8c18ccfb984 100644 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -1446,6 +1446,13 @@ function scorm_check_mode($scorm, &$newattempt, &$attempt, $userid, &$mode) { } // Check if the scorm module is incomplete (used to validate user request to start a new attempt). $incomplete = true; + + // Note - in SCORM_13 the cmi-core.lesson_status field was split into + // 'cmi.completion_status' and 'cmi.success_status'. + // 'cmi.completion_status' can only contain values 'completed', 'incomplete', 'not attempted' or 'unknown'. + // This means the values 'passed' or 'failed' will never be reported for a track in SCORM_13 and + // the only status that will be treated as complete is 'completed'. + $completionelements = array( SCORM_12 => 'cmi.core.lesson_status', SCORM_13 => 'cmi.completion_status',