コード例 #1
0
 function save_question($question, $form, $course)
 {
     wrsqz_presave_question('match', 'wmatprom', $question, $form, $course);
     return parent::save_question($question, $form, $course);
 }
コード例 #2
0
	function save_question($question, $form, $course){
    wrsqz_presave_question('truefalse', 'wtrflsprom', $question, $form, $course);
    return parent::save_question($question, $form, $course);
  }
コード例 #3
0
 function save_question($question, $form, $course)
 {
     wrsqz_presave_question('essay', 'wessaprom', $question, $form, $course);
     return parent::save_question($question, $form, $course);
 }
コード例 #4
0
 function save_question($authorizedquestion, $form, $course)
 {
     wrsqz_presave_question('multianswer', 'wmansprom', $authorizedquestion, $form, $course);
     global $CFG;
     require_once $CFG->dirroot . '/wiris-quizzes/lib/libquestiontype.php';
     $question = wrsqz_qtype_multianswer_extract_question($form);
     if (isset($authorizedquestion->id)) {
         $question->id = $authorizedquestion->id;
     }
     $question->category = $authorizedquestion->category;
     $form->course = $course;
     // To pass the course object to
     // save_question_options, where it is
     // needed to call type specific
     // save_question methods.
     $form->defaultgrade = $question->defaultgrade;
     $form->questiontext = $question->questiontext;
     // We do not force MOODLE_FORMAT: it is incoherent with default
     // multianswer behavior, but MOODLE_FORMAT will introduce links,
     // smileys and other undesired features, and it is coherent with
     // default questiontype behavior.
     // $form->questiontextformat = 0;
     $form->options = clone $question->options;
     unset($question->options);
     return default_questiontype::save_question($question, $form, $course);
 }
コード例 #5
0
 function save_question($question, $form, $course)
 {
     wrsqz_presave_question('multichoice', 'wmultiprom', $question, $form, $course);
     return parent::save_question($question, $form, $course);
 }
コード例 #6
0
 function save_question($question, $form, $course)
 {
     wrsqz_presave_question('shortanswer', 'wshanprom', $question, $form, $course);
     return parent::save_question($question, $form, $course);
 }