How to set required for question text?

How to set required for question text?

by Huu Bach -
Number of replies: 4

Hi all,

Anybody can show me the way how to remove required for question name and set required for question text? It looks like the screenshot below that I found on this link http://docs.moodle.org/25/en/Editing_Questionnaire_questions

Thanks

Average of ratings: -
In reply to Huu Bach

Re: How to set required for question text?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The documentation on Moodle's forms library is http://docs.moodle.org/dev/lib/formslib.php_Form_Definition

The code you need to change is question/type/editform.php. (https://github.com/moodle/moodle/blob/a31e8115638b6410bb8e67ac9071a06c506d07fd/question/type/edit_question_form.php#L183 )

The rest is left as an exercise for the reader, but it should be pretty obvious. If not, get back to us.

In reply to Tim Hunt

Re: How to set required for question text?

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

@Tim,

Please move this discussion to the Questionnaire forum where it belongs.

Joseph

In reply to Joseph Rézeau

Re: How to set required for question text?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

No. The questioner is asking how to make the quiz like the questionnaire (I think). It is fine here.