Posts made by Joseph Rézeau

Picture of Core developers 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 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: -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
I have moved this post from the Questionnaire forum to the Quiz forum. Classical problem with Spanish-speaking members confusing Quiz and Questionnaire because of their names in Spanish.
Average of ratings:Useful (1)