Posts made by Tim Hunt

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

To make sure I understand, are you saying that this is the problem setup:

  1. In the question bank, an single question 'Test question' in 'Test category' with two versions, v1 - ready, and v2 - draft.
  2. A quiz, set to pick a single random qustion from 'Test category'
  3. Student attempts quiz.

Expected result: Student gets a quiz attempt with v1 of Test question.

Actual result: Error "There are not enough questions in Test category to create the question Random question (2)."

If so, that is a bug. sad

Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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.
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Note that, at some point in the future the answer to this question will change (https://moodle.org/mod/forum/discuss.php?d=452417). However, for now, Rick and Visvanath have pionted you in the right direction.