diff --git a/main/exercise/exercise_show.php b/main/exercise/exercise_show.php
index a2ad34a03f..405f681f74 100755
--- a/main/exercise/exercise_show.php
+++ b/main/exercise/exercise_show.php
@@ -1,4 +1,5 @@
body { background: none; } ";
@@ -253,7 +253,7 @@ if (!empty($track_exercise_info)) {
case RESULT_DISABLE_SHOW_SCORE_ONLY:
$show_results = false;
$show_only_total_score = true;
- if ($origin != 'learnpath') {
+ if ($origin !== 'learnpath') {
if ($currentUserId == $student_id) {
echo Display::return_message(
get_lang('ThankYouForPassingTheTest'),
@@ -293,7 +293,7 @@ if (!empty($track_exercise_info)) {
$show_results = false;
}
-if ($origin == 'learnpath' && !isset($_GET['fb_type'])) {
+if ($origin === 'learnpath' && !isset($_GET['fb_type'])) {
$show_results = false;
}
@@ -301,7 +301,7 @@ if ($is_allowedToEdit && in_array($action, ['qualify', 'edit', 'export'])) {
$show_results = true;
}
-if ($action == 'export') {
+if ($action === 'export') {
ob_start();
}
@@ -391,7 +391,6 @@ $arrid = [];
$arrmarks = [];
$strids = '';
$marksid = '';
-
$countPendingQuestions = 0;
foreach ($questionList as $questionId) {
$choice = isset($exerciseResult[$questionId]) ? $exerciseResult[$questionId] : '';
@@ -667,7 +666,7 @@ foreach ($questionList as $questionId) {
}
}
- if ($is_allowedToEdit && $isFeedbackAllowed && $action != 'export') {
+ if ($is_allowedToEdit && $isFeedbackAllowed && $action !== 'export') {
if (in_array($answerType, [FREE_ANSWER, ORAL_EXPRESSION, ANNOTATION])) {
$marksname = 'marksName'.$questionId;
$arrmarks[] = $questionId;
@@ -741,7 +740,12 @@ foreach ($questionList as $questionId) {
echo '
@@ -760,7 +764,6 @@ foreach ($questionList as $questionId) {
$my_total_weight = $questionWeighting;
$totalWeighting += $questionWeighting;
$category_was_added_for_this_test = false;
-
if (isset($objQuestionTmp->category) && !empty($objQuestionTmp->category)) {
if (!isset($category_list[$objQuestionTmp->category]['score'])) {
$category_list[$objQuestionTmp->category]['score'] = 0;
@@ -857,7 +860,6 @@ foreach ($questionList as $questionId) {
} // end of large foreach on questions
$totalScoreText = '';
-
if ($answerType != MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY) {
$pluginEvaluation = QuestionOptionsEvaluationPlugin::create();
@@ -873,7 +875,7 @@ if ($answerType != MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY) {
// Total score
$myTotalScoreTemp = $totalScore;
-if ($origin != 'learnpath' || ($origin == 'learnpath' && isset($_GET['fb_type']))) {
+if ($origin !== 'learnpath' || ($origin === 'learnpath' && isset($_GET['fb_type']))) {
if ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt) {
$totalScoreText .= '
';
if ($objExercise->selectPropagateNeg() == 0 && $myTotalScoreTemp < 0) {
@@ -1060,13 +1062,13 @@ if ($isFeedbackAllowed && $origin != 'learnpath' && $origin != 'student_progress
}
//Came from lpstats in a lp
-if ($origin == 'student_progress') {
+if ($origin === 'student_progress') {
?>