Posts made by Joseph Rézeau

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Change of plans... I'll keep the questiontext field but use it for Description/Introduction for my questions.

And under it I'll add a "gaps" text field for entering the words to be guessed. At the moment I don't know how to save the contents of that field in my edit form. I'll keep trying.

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

In my question edit form I have put this:

$mform->removeelement('questiontext'); 
$mform->addElement('text', 'questiontext', 'questiontext', 
   
array('size' => 50, 'maxlength' => 255));
$mform->setType('questiontext', PARAM_TEXT);
$mform->addRule('questiontext', null, 'required', null, 'client');

but I'm getting "Default exception handler: Exception - htmlspecialchars(): Argument #1 ($string) must be of type string, array given" traced back to "line 385 of \question\bank\editquestion\question.php: call to question_type->display_question_editing_page()"

Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Title says it all. In the new guessit q_type I am developing, I do not need/want my question text to use a complex editor. I only want to use a plain text field. How do I do that?

I've tried adding $this->editoroptions['format'] = FORMAT_PLAIN; but does not work.

Average of ratings: -