Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent 32110808f9
commit 516c5ec619
  1. 2
      main/exercise/answer.class.php
  2. 2
      main/exercise/fill_blanks.class.php
  3. 1
      main/exercise/question_admin.inc.php
  4. 3
      main/exercise/unique_answer.class.php
  5. 1
      main/inc/ajax/exercise.ajax.php
  6. 4
      main/inc/lib/exercise.lib.php

@ -662,7 +662,6 @@ class Answer
)) { )) {
$answer = new Answer($this->questionId); $answer = new Answer($this->questionId);
$answer->read(); $answer->read();
$correctAnswerId = $answer->selectAnswerIdByPosition($correct); $correctAnswerId = $answer->selectAnswerIdByPosition($correct);
// Continue to avoid matching question bug if $correctAnswerId returns false // Continue to avoid matching question bug if $correctAnswerId returns false
@ -672,7 +671,6 @@ class Answer
} }
$correctAnswerAutoId = $answer->selectAutoId($correct); $correctAnswerAutoId = $answer->selectAutoId($correct);
$quizAnswer->setCorrect($correctAnswerAutoId ? $correctAnswerAutoId : 0); $quizAnswer->setCorrect($correctAnswerAutoId ? $correctAnswerAutoId : 0);
$em->merge($quizAnswer); $em->merge($quizAnswer);

@ -762,8 +762,6 @@ class FillBlanks extends Question
$tblTrackEAttempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $tblTrackEAttempt = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
$tblTrackEExercise = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); $tblTrackEExercise = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$courseId = api_get_course_int_id(); $courseId = api_get_course_int_id();
// request to have all the answers of student for this question // request to have all the answers of student for this question
// student may have doing it several time // student may have doing it several time
// student may have not answered the bracket id, in this case, is result of the answer is empty // student may have not answered the bracket id, in this case, is result of the answer is empty

@ -50,7 +50,6 @@ if (is_object($objQuestion)) {
// FORM VALIDATION // FORM VALIDATION
if (isset($_POST['submitQuestion']) && $form->validate()) { if (isset($_POST['submitQuestion']) && $form->validate()) {
// question // question
$objQuestion->processCreation($form, $objExercise); $objQuestion->processCreation($form, $objExercise);

@ -310,7 +310,6 @@ class UniqueAnswer extends Question
$answer = trim($form->getSubmitValue('answer[' . $i . ']')); $answer = trim($form->getSubmitValue('answer[' . $i . ']'));
$comment = trim($form->getSubmitValue('comment[' . $i . ']')); $comment = trim($form->getSubmitValue('comment[' . $i . ']'));
$weighting = trim($form->getSubmitValue('weighting[' . $i . ']')); $weighting = trim($form->getSubmitValue('weighting[' . $i . ']'));
$scenario = $form->getSubmitValue('scenario'); $scenario = $form->getSubmitValue('scenario');
//$list_destination = $form -> getSubmitValue('destination'.$i); //$list_destination = $form -> getSubmitValue('destination'.$i);
@ -340,7 +339,7 @@ class UniqueAnswer extends Question
$destination_str.=$destination_id.';'; $destination_str.=$destination_id.';';
}*/ }*/
$goodAnswer = ($correct == $i) ? true : false; $goodAnswer = $correct == $i ? true : false;
if ($goodAnswer) { if ($goodAnswer) {
$nbrGoodAnswers++; $nbrGoodAnswers++;

@ -229,7 +229,6 @@ switch ($action) {
// Use have permissions? // Use have permissions?
if (api_is_allowed_to_session_edit()) { if (api_is_allowed_to_session_edit()) {
// "all" or "simple" strings means that there's one or all questions exercise type // "all" or "simple" strings means that there's one or all questions exercise type
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null; $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;

@ -633,9 +633,7 @@ class ExerciseLib
*/ */
if ($origin !== null) { if ($origin !== null) {
global $exe_id; global $exe_id;
$trackAttempts = Database::get_main_table( $trackAttempts = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
TABLE_STATISTIC_TRACK_E_ATTEMPT
);
$sql = 'SELECT answer FROM ' . $trackAttempts . ' $sql = 'SELECT answer FROM ' . $trackAttempts . '
WHERE exe_id=' . $exe_id . ' AND question_id=' . $questionId; WHERE exe_id=' . $exe_id . ' AND question_id=' . $questionId;
$rsLastAttempt = Database::query($sql); $rsLastAttempt = Database::query($sql);

Loading…
Cancel
Save