diff --git a/main/exercise/result.php b/main/exercise/result.php index 91611f62f1..8ae4bb60ea 100755 --- a/main/exercise/result.php +++ b/main/exercise/result.php @@ -1,4 +1,5 @@ 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."';"; } diff --git a/main/lp/lp_content.php b/main/lp/lp_content.php index d005220c74..4cdb78af6d 100755 --- a/main/lp/lp_content.php +++ b/main/lp/lp_content.php @@ -1,4 +1,5 @@ */ require_once __DIR__.'/../inc/global.inc.php'; @@ -44,7 +43,7 @@ $list = $learnPath->get_toc(); $dir = false; foreach ($list as $toc) { - if ($toc['id'] == $lpItemId && $toc['type'] == 'dir') { + if ($toc['id'] == $lpItemId && $toc['type'] === 'dir') { $dir = true; } } diff --git a/main/lp/lp_controller.php b/main/lp/lp_controller.php index ac2923d9be..e17bebf50c 100755 --- a/main/lp/lp_controller.php +++ b/main/lp/lp_controller.php @@ -1,4 +1,5 @@ */