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

regex processing should not be on by default #31

Closed
thepurpleblob opened this issue Feb 7, 2018 · 5 comments
Closed

regex processing should not be on by default #31

thepurpleblob opened this issue Feb 7, 2018 · 5 comments

Comments

@thepurpleblob
Copy link

Most 'normal' users won't have a clue what regular expressions are. Therefore they can easily have regex characters in their answer that will 'break' the question. They will have absolutely no idea why.

Regex processing is an advanced feature and should not be enabled by default.

@marcusgreen
Copy link
Owner

I agree that regex is an advanced feature that should not be enabled by default. However I made that decision very early on in the development process around 2011 and other more commonly used features depend on it, e.g. the use of or (with the broken bar |).

I have tried hard not to have any more than the most basic syntax required, so at minimum it is the delimiters (e.g. [cat]), and then once people are more used to it they might use cat|dog and perhaps !! for allowing a box to be empty.
It is possible to set regex processing to off in the config settings, another thing I could do is to offer a warning when a user goes to save a question with regex in the gap. What do you think?

@thepurpleblob
Copy link
Author

thepurpleblob commented Feb 7, 2018

Well... I got caught with this, https://moodle.org/mod/forum/discuss.php?d=365329. Took half a morning of digging in the code to figure out :(

The disable regex option is quite well hidden and I don't know the plugin that well. I don't know if that makes me typical :-D

Yes - a warning would do the trick "You have RegEx characters in the gap. You might want to disable it". Or something vaguely like that!

@marcusgreen
Copy link
Owner

I will address this in the next release. It is an issue that had crossed my mind when I was doing the original development. I don't have a timescale yet.

@marcusgreen
Copy link
Owner

Looks like I didn't address this in the next release. But see my response to
#32

@marcusgreen
Copy link
Owner

Fixed in the latest release in the Moodle.org plugins database (1.978) Thanks Howard.

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

2 participants