|
|
|
|
@ -183,7 +183,7 @@ function save_item( |
|
|
|
|
|
|
|
|
|
$my_type = $myLPI->get_type(); |
|
|
|
|
// Set status to completed for hotpotatoes if score > 80%. |
|
|
|
|
if ($my_type == 'hotpotatoes') { |
|
|
|
|
if ($my_type === 'hotpotatoes') { |
|
|
|
|
if ((empty($status) || $status == 'undefined' || $status == 'not attempted') && $max > 0) { |
|
|
|
|
if (($score / $max) > 0.8) { |
|
|
|
|
$myStatus = 'completed'; |
|
|
|
|
@ -207,7 +207,7 @@ function save_item( |
|
|
|
|
error_log('Done calling set_status for hotpotatoes - now '.$myLPI->get_status(false)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} elseif ($my_type == 'sco') { |
|
|
|
|
} elseif ($my_type === 'sco') { |
|
|
|
|
/* |
|
|
|
|
* This is a specific implementation for SCORM 1.2, matching page 26 of SCORM 1.2's RTE |
|
|
|
|
* "Normally the SCO determines its own status and passes it to the LMS. |
|
|
|
|
@ -254,7 +254,7 @@ function save_item( |
|
|
|
|
* the status to either passed or failed depending on the |
|
|
|
|
* student's score compared to the mastery score. |
|
|
|
|
*/ |
|
|
|
|
if ($credit == 'credit' && |
|
|
|
|
if ($credit === 'credit' && |
|
|
|
|
$masteryScore && |
|
|
|
|
(isset($score) && $score != -1) && |
|
|
|
|
!$statusIsSet && !$statusSignalReceived |
|
|
|
|
@ -471,7 +471,7 @@ function save_item( |
|
|
|
|
error_log("progress: $myComplete / $myTotal"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($myLPI->get_type() != 'sco') { |
|
|
|
|
if ($myLPI->get_type() !== 'sco') { |
|
|
|
|
// If this object's JS status has not been updated by the SCORM API, update now. |
|
|
|
|
$return .= "olms.lesson_status='".$myStatus."';"; |
|
|
|
|
} |
|
|
|
|
|