Quiz

 
 
Picture of Huu Bach
How to set required for question text?
 

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: -
Tim at Lone Pine Koala Sanctuary
Re: How to set required for question text?
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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.

 
Average of ratings: -
Picture of Joseph Rézeau
Re: How to set required for question text?
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

@Tim,

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

Joseph

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: How to set required for question text?
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Joseph Rézeau
Re: How to set required for question text?
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators

Ah, OK, Tim. I was misled by the screenshot.

Joseph

 
Average of ratings: -