From d8c33b479ed828c0e9fdcc60b9bdb275f05ffeda Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 5 Jan 2018 08:39:48 +0100 Subject: [PATCH] Minor - fixes by php-cs-fixer --- main/lp/learnpath.class.php | 780 ++++++++++++++++++------------------ 1 file changed, 398 insertions(+), 382 deletions(-) diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index 7d826316f0..a1724e8e30 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -595,7 +595,7 @@ class learnpath $max_score = 100; } - $params = array( + $params = [ "c_id" => $course_id, "lp_id" => $this->get_id(), "item_type" => $typeCleaned, @@ -612,7 +612,7 @@ class learnpath "max_time_allowed" => $max_time_allowed, 'min_score' => 0, 'launch_data' => '' - ); + ]; if ($prerequisites != 0) { $params['prerequisite'] = $prerequisites; @@ -953,13 +953,14 @@ class learnpath } // Trying completing parents of failed and browsed items as well. if ($childItem->status_is( - array( + [ 'completed', 'passed', 'succeeded', 'browsed', 'failed' - )) + ] + ) ) { // Keep completion status to true. continue; @@ -1699,12 +1700,12 @@ class learnpath error_log('New LP - In learnpath::get_complete_items_count()', 0); } $i = 0; - $completedStatusList = array( + $completedStatusList = [ 'completed', 'passed', 'succeeded', 'browsed' - ); + ]; if (!$failedStatusException) { $completedStatusList[] = 'failed'; @@ -1893,7 +1894,6 @@ class learnpath error_log('New LP - in learnpath::get_js_info('.$item_id.') - returning: '.$info, 0); } return $info; - } else { // If item_id is empty, just update to default SCORM data. $info .= '