Browse Source

Minor - format code

jmontoyaa 8 years ago
parent
commit
4b9573e4d9
1 changed files with 30 additions and 4 deletions
  1. 30 4
      main/inc/lib/exercise.lib.php

+ 30 - 4
main/inc/lib/exercise.lib.php

@@ -599,14 +599,29 @@ class ExerciseLib
                                     $correctItem = $studentAnswerList[$i];
                                 }
                                 $attributes["style"] = "width:" . $listAnswerInformations["tabinputsize"][$i] . "px";
-                                $answer .= FillBlanks::getFillTheBlankHtml($separatorStartRegexp, $separatorEndRegexp, $correctItemRegexp, $questionId, $correctItem, $attributes, $answer, $listAnswerInformations, $displayForStudent, $i);
+                                $answer .= FillBlanks::getFillTheBlankHtml(
+                                    $separatorStartRegexp,
+                                    $separatorEndRegexp,
+                                    $correctItemRegexp,
+                                    $questionId,
+                                    $correctItem,
+                                    $attributes,
+                                    $answer,
+                                    $listAnswerInformations,
+                                    $displayForStudent,
+                                    $i
+                                );
                             }
                             // display the last common word
                             $answer .= $listAnswerInformations["commonwords"][$i];
                         } else {
                             // display empty [input] with the right width for student to fill it
-                            $separatorStartRegexp = FillBlanks::escapeForRegexp($listAnswerInformations['blankseparatorstart']);
-                            $separatorEndRegexp = FillBlanks::escapeForRegexp($listAnswerInformations['blankseparatorend']);
+                            $separatorStartRegexp = FillBlanks::escapeForRegexp(
+                                $listAnswerInformations['blankseparatorstart']
+                            );
+                            $separatorEndRegexp = FillBlanks::escapeForRegexp(
+                                $listAnswerInformations['blankseparatorend']
+                            );
                             $answer = '';
                             for ($i = 0; $i < count($listAnswerInformations["commonwords"]) - 1; $i++) {
                                 // display the common words
@@ -617,7 +632,18 @@ class ExerciseLib
                                 $correctItemRegexp = $correctItem;
                                 // replace / with \/ to allow the preg_replace bellow and all the regexp char
                                 $correctItemRegexp = FillBlanks::getRegexpProtected($correctItemRegexp);
-                                $answer .= FillBlanks::getFillTheBlankHtml($separatorStartRegexp, $separatorEndRegexp, $correctItemRegexp, $questionId, '', $attributes, $answer, $listAnswerInformations, $displayForStudent, $i);
+                                $answer .= FillBlanks::getFillTheBlankHtml(
+                                    $separatorStartRegexp,
+                                    $separatorEndRegexp,
+                                    $correctItemRegexp,
+                                    $questionId,
+                                    '',
+                                    $attributes,
+                                    $answer,
+                                    $listAnswerInformations,
+                                    $displayForStudent,
+                                    $i
+                                );
                             }
                             // display the last common word
                             $answer .= $listAnswerInformations["commonwords"][$i];