following suggestions in 5950

1.9.x
unknown 12 years ago
parent bb4ad4b8d4
commit d5594b58f0
  1. 5
      main/exercice/answer.class.php

@ -470,6 +470,7 @@ class Answer {
$c_id = $this->course['real_id']; $c_id = $this->course['real_id'];
// inserts new answers into data base // inserts new answers into data base
$flag = 0;
$sql = "INSERT INTO $TBL_REPONSES (c_id, id, question_id, answer, correct, comment, ponderation, position, hotspot_coordinates,hotspot_type, destination) VALUES "; $sql = "INSERT INTO $TBL_REPONSES (c_id, id, question_id, answer, correct, comment, ponderation, position, hotspot_coordinates,hotspot_type, destination) VALUES ";
for ($i=1;$i <= $this->new_nbrAnswers; $i++) { for ($i=1;$i <= $this->new_nbrAnswers; $i++) {
@ -515,10 +516,6 @@ class Answer {
$this->nbrAnswers=$this->new_nbrAnswers; $this->nbrAnswers=$this->new_nbrAnswers;
$this->destination=$this->new_destination; $this->destination=$this->new_destination;
// clears $new_* arrays // clears $new_* arrays
//} else {
/*for ($i=1;$i <= $this->new_nbrAnswers; $i++) {
$this->updateAnswers($this->new_answer[$i],$this->new_correct[$i],$this->new_comment[$i],$this->new_weighting[$i],$this->new_position[$i],$this->new_destination[$i]);
}*/
$this->cancel(); $this->cancel();
} }

Loading…
Cancel
Save