apluslms/a-plus-rst-tools

Problem with regexp

Opened this issue · 2 comments

The regexp: is not working. The example listed in the README file (see below) takes any response as correct.

  .. freetext:: 30 string-ignorews-ignorequotes-requirecase
    :length: 10

    A textual input can be compared with the model solution as integer, float or string.
    Here the correct answer is "test". Surrounding quotes are ignored in the solution
    as well as whitespace everywhere (modifiers ignorequotes and ignorews).

    test
    !test § Follow the instruction.
    regexp:Test|TEST § Use the lower case!

image

The problem may reside in the https://github.com/apluslms/mooc-grader/blob/db5135b6e18ec0a8e62cac4b763ffb4a421f4f79/access/types/forms.py

Ok, This is not happening all the time. It happened when the status of the questionnaire was set to enrollment.

.. questionnaire:: status_enrollment
  :title: Question with a ``enrollment`` status. The questionnaire is shown only to enrolled students.
  :submissions: 4
  :category: Status
  :status: enrollment

  .. freetext:: 10 string-ignorews-ignorequotes-requirecase

    **Modifiers used in this question:** ``ignorequotes`` and ``ignorews``.

    The correct answer for this question is "test". Surrounding quotes are ignored as well as whitespaces.

    test
    !test § Follow the instruction.
    regexp:Test|TEST § Use the lower case!

@jaguarfi When you say "takes any response as correct", I want to emphasize that you are talking about hints. This hint should be shown to the answers that match the regexp. In this case, those answers are wrong and the hint should be shown to such wrong answers.

Does this affect other questionnaires besides enrollment questionnaires? Nobody would really need hints in enrollment questionnaires.