From 184fdb9783bb8dc07145ace79edb8842a421ef19 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 15 Jun 2020 10:28:08 +0200 Subject: [PATCH] Minor - format code --- main/exercise/exercise.class.php | 8 ++++---- main/inc/lib/exercise.lib.php | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php index 1baf2a89d1..ec06e62222 100755 --- a/main/exercise/exercise.class.php +++ b/main/exercise/exercise.class.php @@ -5970,22 +5970,22 @@ class Exercise return false; break; case 1: // End - if ($type == 'end') { + if ($type === 'end') { $sendEnd = true; } break; case 2: // start - if ($type == 'start') { + if ($type === 'start') { $sendStart = true; } break; case 3: // end + open - if ($type == 'end') { + if ($type === 'end') { $sendEndOpenQuestion = true; } break; case 4: // end + oral - if ($type == 'end') { + if ($type === 'end') { $sendEndOralQuestion = true; } break; diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 0c56ab83d5..ff7ef63d6b 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -4377,6 +4377,7 @@ EOT; $remainingMessage = '' ) { $origin = api_get_origin(); + $courseId = api_get_course_int_id(); $courseCode = api_get_course_id(); $sessionId = api_get_session_id(); @@ -4477,7 +4478,7 @@ EOT; $attempts = Event::getExerciseResultsByUser( api_get_user_id(), $objExercise->id, - api_get_course_int_id(), + $courseId, $sessionId, $exercise_stat_info['orig_lp_id'], $exercise_stat_info['orig_lp_item_id'], @@ -4878,8 +4879,8 @@ EOT; echo self::displayResultsInRanking( $objExercise->iId, api_get_user_id(), - api_get_course_int_id(), - api_get_session_id() + $courseId, + $sessionId ); }