From 4b9573e4d985e3b2c8dc24a34506cf101549e7cc Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 10 Mar 2017 13:14:32 +0100 Subject: [PATCH] Minor - format code --- main/inc/lib/exercise.lib.php | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index ddc482597f..13b95fc990 100644 --- a/main/inc/lib/exercise.lib.php +++ b/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];