diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index f700c7dc35..e23df291de 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -37,7 +37,7 @@ class ExerciseLib $current_item = '', $show_title = true, $freeze = false, - $user_choice = array(), + $user_choice = [], $show_comment = false, $show_answers = false ) { @@ -109,7 +109,7 @@ class ExerciseLib // because the match between the suggestions and the answers cannot be // done easily (suggestions and answers are in the same table), so we // have to go through answers first (elems with "correct" value to 0). - $select_items = array(); + $select_items = []; //This will contain the number of answers on the left side. We call them // suggestions here, for the sake of comprehensions, while the ones // on the right side are called answers @@ -188,7 +188,7 @@ class ExerciseLib // Add nanog if (api_get_setting('enable_record_audio') == 'true') { //@todo pass this as a parameter - global $exercise_stat_info, $exerciseId, $exe_id; + global $exercise_stat_info, $exerciseId; if (!empty($exercise_stat_info)) { $objQuestionTmp->initFile( @@ -212,7 +212,6 @@ class ExerciseLib $form = new FormValidator('free_choice_'.$questionId); $config = ['ToolbarSet' => 'TestFreeAnswer']; - //$form->addButtonAdvancedSettings('hide_description_'.$questionId, get_lang('AddDescription')); $form->addHtml('"; //clearfix $counterAnswer = 1; $s .= $isVertical ? '' : '
'; - for ($answerId = 1; $answerId <= $nbrAnswers; $answerId++) { $answerCorrect = $objAnswerTmp->isCorrect($answerId); $windowId = $questionId.'_'.$counterAnswer; @@ -1117,7 +1103,6 @@ HTML;
'; $s .= $isVertical ? '' : ''; - $counterAnswer++; } } @@ -1141,7 +1126,6 @@ HTML; if ($origin == 'export') { return $s; } - echo $s; } elseif ($answerType == HOT_SPOT || $answerType == HOT_SPOT_DELINEATION) { global $exerciseId, $exe_id;