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

Error if answer has ? #101

Open
neeesn opened this issue Feb 2, 2023 · 7 comments
Open

Error if answer has ? #101

neeesn opened this issue Feb 2, 2023 · 7 comments

Comments

@neeesn
Copy link

neeesn commented Feb 2, 2023

Describe the bug
If theres questionmark in the question, the answer is returned wrong even if the question is right.

To Reproduce
Steps to reproduce the behavior:

  1. Make a drag question where the answer is with an ?
  2. make a preview and click "Fill in correct responses" and then "Submit and finish."
  3. It shows errors in the correct answers

Expected behavior
Show correct answer even with question mark

image

Desktop (please complete the following information):

  • Browser chrome, Version 109.0.5414.120 (Official Build) (64-bit)
  • Moodle 3.11.9 (Build: 20220822)
  • Plugin 2.134 (2022061900)
@marcusgreen
Copy link
Owner

Hi Neesn, thank you for your detailed report.
Can you confirm the status of the (slightly hidden) Disable Regex box.
See https://docs.moodle.org/401/en/Gapfill_question_type#Disable_Regex
I just got this to work
The [?cat] sat on the [mat?]

@neeesn
Copy link
Author

neeesn commented Feb 3, 2023

image

@neeesn
Copy link
Author

neeesn commented Feb 3, 2023

It is not disabled

@marcusgreen
Copy link
Owner

It needs to be disabled (checked) if you don't want the characters to be interpreted as regular expressions. I think it could be clearer.

@neeesn
Copy link
Author

neeesn commented Feb 3, 2023

Super that seems to be working :-)
But you are right - a better description would be nice. Most teachers dont know what regex is.

@marcusgreen
Copy link
Owner

You are right, very few people will know will know what regex is. It can be disabled at a system wide level (I know if you are a teacher that may mean nothing). I was thinking some more about that today. A few years ago I changed it so that by default regex is disabled, but it would be good if whenever it is on a clear sign is displayed on the question editing page saying something like "Regex processing is enabled, characters like ?* etc will have a special meaning, do you want that".

Can I mention you in the update document if/when I update that, as I like to credit anyone who has given me feedback on how it works. Is there a longer version of your name, or shall I put neesn?

@dinism
Copy link

dinism commented Feb 4, 2023

Thanks a lot neeesn (Henrik Sune Pedersen) and marcusgreen (Marcus Green).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants