From c6faaebc73488fee233d2f183aa135456b15c267 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 8 Aug 2012 15:23:52 +0200 Subject: [PATCH] Minor - cosmetic changes --- main/exercice/answer_admin.inc.php | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/main/exercice/answer_admin.inc.php b/main/exercice/answer_admin.inc.php index 220e0b96f6..e9da17b871 100644 --- a/main/exercice/answer_admin.inc.php +++ b/main/exercice/answer_admin.inc.php @@ -88,15 +88,13 @@ if ($modifyIn) { $weighting = unserialize($weighting); $hotspot_coordinates = unserialize($hotspot_coordinates); $hotspot_type = unserialize($hotspot_type); - } - //fill in blanks - else { + } else { + //fill in blanks $reponse = unserialize($reponse); $comment = unserialize($comment); $blanks = unserialize($blanks); $weighting = unserialize($weighting); } - unset($buttonBack); } @@ -277,7 +275,7 @@ if ($submitAnswers || $buttonBack) { */ // blanks will be put into an array - $blanks = Array(); + $blanks = array(); $i = 1; @@ -527,8 +525,6 @@ if ($submitAnswers || $buttonBack) { } if ($modifyAnswers) { - - if ($debug > 0) { echo str_repeat(' ', 0) . '$modifyAnswers is set' . "
\n"; } @@ -536,7 +532,6 @@ if ($modifyAnswers) { // construction of the Answer object $objAnswer = new Answer($questionId); - Session::write('objAnswer', $objAnswer); if ($answerType == UNIQUE_ANSWER || $answerType == MULTIPLE_ANSWER || $answerType == GLOBAL_MULTIPLE_ANSWER) { if ($debug > 0) { @@ -545,14 +540,14 @@ if ($modifyAnswers) { if (!$nbrAnswers) { $nbrAnswers = $objAnswer->selectNbrAnswers(); - $reponse = Array(); - $comment = Array(); - $weighting = Array(); + $reponse = array(); + $comment = array(); + $weighting = array(); // initializing + Modification de la ligne suivante if ($answerType == MULTIPLE_ANSWER || $answerType == GLOBAL_MULTIPLE_ANSWER) { - $correct = Array(); + $correct = array(); } else { $correct = 0; } @@ -593,7 +588,7 @@ if ($modifyAnswers) { $weighting = explode(',', $weighting); - $temp = Array(); + $temp = array(); // keys of the array go from 1 to N and not from 0 to N-1 for ($i = 0; $i < sizeof($weighting); $i++) { @@ -635,9 +630,9 @@ if ($modifyAnswers) { echo str_repeat(' ', 2) . '$answerType is MATCHING' . "
\n"; } if (!$nbrOptions || !$nbrMatches) { - $option = Array(); - $match = Array(); - $sel = Array(); + $option = array(); + $match = array(); + $sel = array(); $nbrOptions = $nbrMatches = 0; @@ -1117,7 +1112,7 @@ if ($modifyAnswers) {