From 51fbdad360d3dfccc446cf0f0f320ed713023f50 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 16 Sep 2014 15:08:29 +0200 Subject: [PATCH] Minor - format code --- main/exercice/multiple_answer.class.php | 7 +++++-- main/exercice/question.class.php | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/main/exercice/multiple_answer.class.php b/main/exercice/multiple_answer.class.php index 427c832eaf..12b48f3688 100755 --- a/main/exercice/multiple_answer.class.php +++ b/main/exercice/multiple_answer.class.php @@ -172,7 +172,7 @@ class MultipleAnswer extends Question $weighting = trim($form -> getSubmitValue('weighting['.$i.']')); $goodAnswer = trim($form -> getSubmitValue('correct['.$i.']')); - if($goodAnswer){ + if ($goodAnswer) { $weighting = abs($weighting); } else { $weighting = abs($weighting); @@ -192,7 +192,8 @@ class MultipleAnswer extends Question $this->save(); } - function return_header($feedback_type = null, $counter = null, $score = null) { + function return_header($feedback_type = null, $counter = null, $score = null) + { $header = parent::return_header($feedback_type, $counter, $score); $header .= ' @@ -203,4 +204,6 @@ class MultipleAnswer extends Question $header .= ''; return $header; } + + } diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php index ddaba78c49..9fd58e1307 100755 --- a/main/exercice/question.class.php +++ b/main/exercice/question.class.php @@ -1485,7 +1485,14 @@ abstract class Question * @param int Type of question (see constants at beginning of question.class.php) * @param int Question level/category */ - function create_question ($quiz_id, $question_name, $question_description = "" , $max_score = 0, $type = 1, $level = 1) { + function create_question ( + $quiz_id, + $question_name, + $question_description = "" , + $max_score = 0, + $type = 1, + $level = 1 + ) { $course_id = api_get_course_int_id(); $tbl_quiz_question = Database::get_course_table(TABLE_QUIZ_QUESTION); @@ -1501,7 +1508,7 @@ abstract class Question ." FROM $tbl_quiz_question q INNER JOIN $tbl_quiz_rel_question r" ." ON q.id = r.question_id" ." AND exercice_id = $quiz_id AND q.c_id = $course_id AND r.c_id = $course_id"; - $rs_max = Database::query($sql, __FILE__, __LINE__); + $rs_max = Database::query($sql); $row_max = Database::fetch_object($rs_max); $max_position = $row_max->max_position +1;