apluslms/a-plus-rst-tools

Pick-any questionnaires do not show a compilation error when wrong settings are used with the randomized question type

Opened this issue · 0 comments

The following case did not show a compilation error, but the questionnaire has an error.

.. questionnaire:: questionnaire_randomized 10
  :title: Use the randomized settings
  :submissions: 3
  :points-to-pass: 20

  .. pick-any:: 10
    :randomized: 4
    :correct-count: 1

    :math:`10` is the result of the following arithmetic operation.

    *a. :math:`5 \times 2`
    *b. :math:`50 \div 5`
    *c. :math:`2+2+2+2+2`
    d. :math:`50 \div 4`
    e. :math:`3+2+4+2`
    *f. :math:`3 \times 2+4`

In the example above, the number of questions to be included is four, but only one correct answer should be included. Therefore, the questionnaire has an error because there are only two incorrect answers. It means that we are missing one incorrect answer.

The grader shows the following error when this happens.

Exception Type: ValueError
Exception Value: Sample larger than population or is negative