From 74b41af637ddfdb558ddf5b25c9d83a239a1d12b Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 17 Apr 2017 08:54:30 -0500 Subject: [PATCH] Move break to ensure the break is clear + minor code style changes --- main/exercise/exercise.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php index a20af04799..97d982a403 100755 --- a/main/exercise/exercise.class.php +++ b/main/exercise/exercise.class.php @@ -2116,7 +2116,7 @@ class Exercise // Exercise time limit $form->addElement('checkbox', 'activate_start_date_check',null, get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()')); - $var = Exercise::selectTimeLimit(); + $var = self::selectTimeLimit(); if (!empty($this->start_time)) { $form->addElement('html', '
'); @@ -2348,7 +2348,7 @@ class Exercise */ public function processCreation($form, $type = '') { - $this->updateTitle(Exercise::format_title_variable($form->getSubmitValue('exerciseTitle'))); + $this->updateTitle(self::format_title_variable($form->getSubmitValue('exerciseTitle'))); $this->updateDescription($form->getSubmitValue('exerciseDescription')); $this->updateAttempts($form->getSubmitValue('exerciseAttempts')); $this->updateFeedbackType($form->getSubmitValue('exerciseFeedbackType')); @@ -2789,7 +2789,7 @@ class Exercise $questionList = array(), $weight = 0 ) { - $track_exercises = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); + $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $safe_lp_id = intval($safe_lp_id); $safe_lp_item_id = intval($safe_lp_item_id); $safe_lp_item_view_id = intval($safe_lp_item_view_id); @@ -3975,8 +3975,8 @@ class Exercise } $matching[$answerAutoId] = $choice[$answerAutoId]; } - break; } + break; case HOT_SPOT: if ($from_database) { $TBL_TRACK_HOTSPOT = Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTSPOT); @@ -5255,7 +5255,7 @@ class Exercise } if ($saved_results) { - $stat_table = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); + $stat_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $sql = 'UPDATE ' . $stat_table . ' SET exe_result = exe_result + ' . floatval($questionScore) . ' WHERE exe_id = ' . $exeId; @@ -6292,7 +6292,7 @@ class Exercise */ public function get_stat_track_exercise_info_by_exe_id($exe_id) { - $track_exercises = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); + $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $exe_id = intval($exe_id); $sql_track = "SELECT * FROM $track_exercises WHERE exe_id = $exe_id "; $result = Database::query($sql_track); @@ -6326,7 +6326,7 @@ class Exercise $exercise_info = self::get_stat_track_exercise_info_by_exe_id($exe_id); $question_id = intval($question_id); $exe_id = intval($exe_id); - $track_exercises = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); + $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); if ($exercise_info) { if (empty($exercise_info['questions_to_check'])) { @@ -7498,7 +7498,7 @@ class Exercise $ids = is_array($quizId) ? $quizId : array($quizId); $ids = array_map('intval', $ids); $ids = implode(',', $ids); - $track_exercises = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); + $track_exercises = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); if ($sessionId != 0) { $sql = "SELECT * FROM $track_exercises te INNER JOIN c_quiz cq ON cq.id = te.exe_exo_id AND te.c_id = cq.c_id