Exemple #1
0
 protected function save_changes_question()
 {
     $id = DB::escape($this->post->id);
     $question = DB::escape($this->post->question);
     $answer_1 = DB::escape($this->post->answer_1);
     $answer_2 = DB::escape($this->post->answer_2);
     $answer_3 = DB::escape($this->post->answer_3);
     $answer_4 = DB::escape($this->post->answer_4);
     $correct_answer = DB::escape($this->post->correct_answer);
     $active = DB::escape($this->post->active);
     $new_exam = DB::escape($this->post->new_exam);
     ExamsData::edit_question($id, $question, $answer_1, $answer_2, $answer_3, $answer_4, $correct_answer, $active, $new_exam);
     ExamsData::increase_exam_version($new_exam);
     ExamsData::increase_exam_changed_date($new_exam);
     $this->set('message', '<div id="success">Question Updated!</div>');
 }