MDL-29064 qtype multianswer, question text should be a required field.

This commit is contained in:
Tim Hunt
2011-08-23 08:41:18 +01:00
parent 9e47a85a24
commit e5073fe305
@@ -64,6 +64,9 @@ class question_edit_multianswer_form extends question_edit_form {
$mform->removeElement('defaultgrade');
$this->confirm = optional_param('confirm','0', PARAM_RAW);
// Make questiontext a required field for this question type.
$mform->addRule('questiontext', null, 'required', null, 'client');
// display the questions from questiontext;
if ( "" != optional_param('questiontext','', PARAM_RAW)) {
// echo "<p> optional_param('questiontext' <pre>";print_r(optional_param('questiontext','', PARAM_RAW));echo "</pre></p>";