Move break to ensure the break is clear + minor code style changes

pull/2487/head
Yannick Warnier 8 years ago
parent 2d580b6a18
commit 74b41af637
  1. 16
      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', '<div id="start_date_div" style="display:block;">');
@ -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

Loading…
Cancel
Save