Add spellcheck=false to a quiz form or textbox

Add spellcheck=false to a quiz form or textbox

by Colin Matheson -
Number of replies: 13
Some teachers are requesting that the built in browser spellcheck be disabled for quizzes. I am trying to find out how to add the attribute to a quiz form or test quiz element. Any guidance would be appreciated.
Average of ratings: -
In reply to Colin Matheson

Re: Add spellcheck=false to a quiz form or textbox

by Rohit Agarwal -

I would also like to get a solution for the same. 

So far, the only way I could make this work is to use Safe Exam Browser (SEB) that has the option to disable spell check. However, SEB doesn't seem to work for question types that require audio input, hence it didn't work for me. 

It would be great if this can be a configuration in Moodle itself.



In reply to Rohit Agarwal

Re: Add spellcheck=false to a quiz form or textbox

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Colin and Rohit,

Unless you are using an application that takes control of the browwer such as SEB, anyone, that is, teachers and computer savvy students, can change the spellcheck attribute since it is in the DOM.

So if you don't want to use SEB and don't worry too much about computer savvy students, you can add spellcheck = "false" to questions, quizzes or site with a single line of JavaScript code.
In reply to Dominique Bauer

Re: Add spellcheck=false to a quiz form or textbox

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
In reply to Dominique Bauer

Re: Add spellcheck=false to a quiz form or textbox

by Rohit Agarwal -
Hi Dominique, thanks for your response. I tried the link about but it doesn't seem to work. I am getting the red squiggly lines in both the scenarios. I am using Google Chrome.
In reply to Rohit Agarwal

Re: Add spellcheck=false to a quiz form or textbox

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Rohit, Thank you for your feedback. It should work fine now.
In reply to Colin Matheson

Re: Add spellcheck=false to a quiz form or textbox

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers
We did a render override in the Fordson theme to address this issue.
https://github.com/dbnschools/moodle-theme_fordson/blob/master/classes/qtype_shortanswer_renderer.php#L38

I believe you can download this file and place it in the same place in Boost and it will work. I highlighted the one line that we needed that whole file for.

Chris
Average of ratings: Useful (4)
In reply to Chris Kenniburg

Re: Add spellcheck=false to a quiz form or textbox

by Rohit Agarwal -
Thanks Chris, this worked for me! I will try to repeat this for essay type question as well.
In reply to Rohit Agarwal

Re: Add spellcheck=false to a quiz form or textbox

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
In reply to Marcus Green

Re: Add spellcheck=false to a quiz form or textbox

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You created a duplicate of MDL-49297 (which was easlly found by searchnig for 'spellcheck').
In reply to Tim Hunt

Re: Add spellcheck=false to a quiz form or textbox

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I did search first, though clearly not well enough. Should have searched on your name...
In reply to Chris Kenniburg

Re: Add spellcheck=false to a quiz form or textbox

by Pedro Caldeira -

I would like to try it, but can't  find this file on my installation 🙁

In reply to Pedro Caldeira

Re: Add spellcheck=false to a quiz form or textbox

by Pedro Caldeira -
this one: qtype_shortanswer_renderer.php i mean.