Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with regexp #123

Open
jaguarfi opened this issue Feb 11, 2021 · 2 comments
Open

Problem with regexp #123

jaguarfi opened this issue Feb 11, 2021 · 2 comments
Labels
area: questionnaire Related to the questionnaire directive effort: hours The issue seems to be small and should be doable in hours or few days. experience: moderate required knowledge estimate priority: medium requester: internal type: bug This is a bug which is critical for the correct operation of the system

Comments

@jaguarfi
Copy link
Contributor

jaguarfi commented Feb 11, 2021

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

@jaguarfi jaguarfi added type: bug This is a bug which is critical for the correct operation of the system priority: medium effort: hours The issue seems to be small and should be doable in hours or few days. area: questionnaire Related to the questionnaire directive experience: moderate required knowledge estimate requester: internal labels Feb 11, 2021
@jaguarfi
Copy link
Contributor Author

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!

@markkuriekkinen
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: questionnaire Related to the questionnaire directive effort: hours The issue seems to be small and should be doable in hours or few days. experience: moderate required knowledge estimate priority: medium requester: internal type: bug This is a bug which is critical for the correct operation of the system
Projects
None yet
Development

No branches or pull requests

2 participants