Override for Allowed Quiz Attempts Limited to 10

Override for Allowed Quiz Attempts Limited to 10

von Julian Terry -
Anzahl Antworten: 6
Hello,

We have a quiz in our system that only allows 1 attempt by default, and we want to have the ability to grant users additional attempts when needed. Per the documentation, this can be done through user overrides via the following steps:

Visiting the quiz activity > Selecting the "overrides" option > Adding a user override > Selecting the dropdown for attempts allowed

But I noticed the dropdown option for the number of attempts only goes up until 10.



Does this mean that quizzes set to a limited number of attempts can only have a maximum of 10 attempts? And assuming we want to grant additional user attempts, we can only grant up to 10? Or is there a setting I'm missing that can allow us to grant more?

Moodle Version 4.2.2+

Thank you, and appreciate the help.
Als Antwort auf Julian Terry

Re: Override for Allowed Quiz Attempts Limited to 10

von Tim Hunt -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
The number in only limited in the UI. I suppose somethought the list in the drop-down should not be too long.

Only possible to change in the code: specifically this number: https://github.com/moodle/moodle/blob/main/mod/quiz/lib.php#L50

If anyone has a suggestion for what number we should use as the limit, please suggest it.

(And, if anyone wants a really easy issue to use to learn the process for contributing a change to Moodle core code, this would be a really great change to use!)
Als Antwort auf Tim Hunt

Re: Override for Allowed Quiz Attempts Limited to 10

von Brett Dalton -
Nutzerbild von Moodle HQ Nutzerbild von Particularly helpful Moodlers
Tim

There is a similar drop down in assignments we are looking to replace with text entry with the appropriate validation.  Once that's sorted it's probably worth updating this as well.  Will poke my team to keep an eye on this.

Als Antwort auf Brett Dalton

Re: Override for Allowed Quiz Attempts Limited to 10

von Tim Hunt -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
Actually, HTML now has which it did not have when Moodle, and this bit of the quiz, was invented.

That seems to be what we should use in all places like this nowadays - and probably the way to start is by adding 'number' as a recognised type of field in formslib.

All that is perfectly doable but someone who has the time. (And that is not me!)
Als Antwort auf Tim Hunt

Re: Override for Allowed Quiz Attempts Limited to 10

von Mihail Geshoski -
Nutzerbild von Core developers Nutzerbild von Moodle HQ Nutzerbild von Peer reviewers Nutzerbild von Plugin developers Nutzerbild von Testers
Hi all,

We were assessing this same problem during our discovery process for improving the assignment settings page.
To give teachers more flexibility when setting the number of allowed attempts, we are planning to replace the current setting with a form group that consists of a numerical input for entering the number of attempts and a checkbox that represents the 'Unlimited' attempts option. This can be easily implemented in quizzes as well.
Here are some screenshots of this proposal:



Disabled numerical input, once 'Unlimited' is set.



Validation of the value entered for the number of attempts (must be numerical and not less than 1).

Hope this helps.

Als Antwort auf Mihail Geshoski

Re: Override for Allowed Quiz Attempts Limited to 10

von Tim Hunt -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers
Good that youa re working on this. I still think the best way to do this is a new 'number' field type in formslib, to represent . (That could include support for an 'unlimited checkbox' as an option.) Then that can be used in all similar places, without lots of duplicate code.