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

Wrong behaviour when correct answer contains special (german) characters #102

Open
Dmfama20 opened this issue Apr 28, 2023 · 11 comments
Open

Comments

@Dmfama20
Copy link

Dmfama20 commented Apr 28, 2023

Description
I have the following questiontext

Complete this sentence... [correct ending (richtige Lösung)]

containing the german character "ö".

and this wrong answers

Wrong ending, very wrong ending, not correct ending

To Reproduce
Steps to reproduce the behavior:

  1. I create a question as mentioned above and save it
  2. I fill the gap by the correct answer and this answer is displayed as wrong

Expected behavior
Correct answers should be displayed as correct

Screenshots

Screenshot 2023-04-28 at 09 46 29

@marcusgreen
Copy link
Owner

Could you export and attach an xml version of your question

@marcusgreen
Copy link
Owner

Have you got regular expressions disabled as the characters ( and ) are "special", see
https://docs.moodle.org/402/en/Gapfill_question_type#Disable_Regex

@Dmfama20
Copy link
Author

Hi,
here is the xml of the question (I renamed it to *.txt since xml-files not allowed here)
quiz-SF-Gapfill test-20230428-1115.txt

I tried "disableregex" on and off and purged cache when switching on/off. But no changes. The correct answer is still marked wrong.

@marcusgreen
Copy link
Owner

marcusgreen commented Apr 28, 2023

gapfill_v2
Thank you for your quick response. Can you confirm that when you change disableregex you are testing the modified version. I just imported your xml and it seemed to work for me. It would be nice if it warned when regular expression characters were used.

@Dmfama20
Copy link
Author

I'm not sure what you mean:
1.) I set "disableregex" as true and purge all caches.
2.) I go to the question and edit it.
3.) I save it as a new version.
4.) I start a new preview of the latest version of the question but I remark the same error as before.

Some more details:
Moodle version 4.1.2
qtype_gapfill version 2.136

@marcusgreen
Copy link
Owner

If you email me at marcusavgreen at gmail dot com I can give you access to a course where we compare how your question example works.

@Dmfama20
Copy link
Author

Dmfama20 commented May 3, 2023

I have sent you an email yesterday....

@Dmfama20
Copy link
Author

Any news about that?

@marcusgreen
Copy link
Owner

I have not worked on it, but your post is a prompt for me to at least start working on some code. I will create a new branch which you can monitor for changes. It would be fairly easy to strip out just the html space character, but I would probably need to strip out other things as well. In an ideal world I would throw up a warning that the text contained invisible things and stop the saving, but I have yet to work out how I would do that. I guess I need to ask around. Thanks for the reminder.

@PhilippImhof
Copy link

Could this be related to #106 ?

@marcusgreen
Copy link
Owner

I think this is a different issue, but it reminds me of a long time plan to put up a warning if the contents of gaps may not make any sense. I was focussing on showing the warning before saving (or preventing saving). But since then I figure I will just show it on reload after saving. Needs to go onto my ToDo list.

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