From 363f82243b58068477003fed5e4709bd797e74d5 Mon Sep 17 00:00:00 2001 From: Eric Merrill Date: Wed, 25 Sep 2013 09:07:04 -0400 Subject: [PATCH] MDL-9873 questions Set question text field to required. After much discussion, it was decided that the damage done by not not setting question text (student goes to take test and sees nothing) is more of a problem then the use cases where teachers want empty questions (inputing paper tests). In those cases, they will need to add something like a period to the question text field. --- question/type/edit_question_form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/question/type/edit_question_form.php b/question/type/edit_question_form.php index 80430b1ac6d..a186eba610d 100644 --- a/question/type/edit_question_form.php +++ b/question/type/edit_question_form.php @@ -188,6 +188,7 @@ abstract class question_edit_form extends question_wizard_form { $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 15), $this->editoroptions); $mform->setType('questiontext', PARAM_RAW); + $mform->addRule('questiontext', null, 'required', null, 'client'); $mform->addElement('text', 'defaultmark', get_string('defaultmark', 'question'), array('size' => 7)); -- 2.43.0