From 32cece5424717595e0a2e29f1edc36db4e5937cf Mon Sep 17 00:00:00 2001 From: Dmitry Pupinin Date: Sat, 28 Nov 2009 17:28:10 +0600 Subject: [PATCH] Use htmleditor in questions --- question/type/edit_question_form.php | 2 +- question/type/match/edit_match_form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/question/type/edit_question_form.php b/question/type/edit_question_form.php index c98ed7d..5e8f119 100644 --- a/question/type/edit_question_form.php +++ b/question/type/edit_question_form.php @@ -252,7 +252,7 @@ class question_edit_form extends moodleform { function get_per_answer_fields(&$mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption) { $repeated = array(); $repeated[] =& $mform->createElement('header', 'answerhdr', $label); - $repeated[] =& $mform->createElement('text', 'answer', get_string('answer', 'quiz'), array('size' => 50)); + $repeated[] =& $mform->createElement('htmleditor', 'answer', get_string('answer', 'quiz'), array('size' => 50)); $repeated[] =& $mform->createElement('select', 'fraction', get_string('grade'), $gradeoptions); $repeated[] =& $mform->createElement('htmleditor', 'feedback', get_string('feedback', 'quiz'), array('course' => $this->coursefilesid)); diff --git a/question/type/match/edit_match_form.php b/question/type/match/edit_match_form.php index 132cd35..3f1b736 100644 --- a/question/type/match/edit_match_form.php +++ b/question/type/match/edit_match_form.php @@ -17,7 +17,7 @@ class question_edit_match_form extends question_edit_form { function get_per_answer_fields(&$mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption) { $repeated = array(); $repeated[] =& $mform->createElement('header', 'answerhdr', $label); - $repeated[] =& $mform->createElement('textarea', 'subquestions', get_string('question', 'quiz'), array('cols'=>40, 'rows'=>3)); + $repeated[] =& $mform->createElement('htmleditor', 'subquestions', get_string('question', 'quiz'), array('size' => 50)); $repeated[] =& $mform->createElement('text', 'subanswers', get_string('answer', 'quiz'), array('size'=>50)); $repeatedoptions['subquestions']['type'] = PARAM_RAW; $repeatedoptions['subanswers']['type'] = PARAM_TEXT; -- 1.6.2.2.1669.g7eaf8