Default Mulitple Choice Change

Default Mulitple Choice Change

by Scott Johnson -
Number of replies: 5
Can anyone tell me how to change the default from 3 choices to 4 on a multiple choice question type so I don't have to click on the add 3 more choices button each time? Thanks!
Average of ratings: -
In reply to Scott Johnson

Re: Default Mulitple Choice Change

by Deleted user -

What version of Moodle?

I'm using Moodle 1.6.4, and when I add a new Multiple-Choice type question (in the Quiz Module), it displays ten(10) Choice/Question boxes and tells me I need to enter at least two(2), and that any that are left blank will be ignored!

In reply to Deleted user

Re: Default Mulitple Choice Change

by Scott Johnson -
I am using version 1.8.
In reply to Scott Johnson

Re: Default Mulitple Choice Change

by Matt Campbell -
/lib/questionlib.php, line 66 -
define("QUESTION_NUMANS_START", 3);
Change the 3 to whatever you need the original number of answer options to be.

/lib/questionlib.php, line 73 -
define("QUESTION_NUMANS_ADD", 3);
Change the 3 to whatever you want the 'Add more options' button to be.

Thanks,
Matt
In reply to Matt Campbell

Re: Default Mulitple Choice Change

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Scott - I would recommend updating to the latest Moodle as this was changed not too long ago. Keep in mind that Matt's solution will also change the number of questions for short answer which makes the page longer. This was fixed specifically for MC questions from 3 to 5 options (see MDL-11310 for details) and comments. I had proposed the change that Matt mentions but it is not ideal as it impacts other question types. Peace - Anthony
In reply to Anthony Borrow

Re: Default Mulitple Choice Change

by Shane Gibney -

Hi,

Where can I change the default for quiz layout to 10 questions per page?

Can't see anything in /lib/questionlib.php maybe I am just missing it.

Thanks,

Shane