Possible Moodle 3.9 Essay Quiz question bug on pasted images

Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Eoin Campbell -
Number of replies: 10
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Moodle 3.9 introduced a new feature to allow images to be pasted into the Atto text editor (cf. https://docs.moodle.org/39/en/Images#Copying_and_pasting_an_image). It works when using a modern Firefox browser. In the general case, it seems to work. However, when a student pastes an image into an Essay question in a quiz, that image is not displayed when the student reviews the quiz attempt. It is also not displayed when the lecturer manually grades the Essay question. The text of the students answer is displayed, but not the image. Below are screenshots showing a pasted image when editing the Essay question in the quiz attempt, and the view when the student subsequently reviews their attempt. This YouTube video also shows the issue: Pasted Images Don't Display in Moodle 3.9 Essay Quiz Question Review. This seems like a bug to me.

Screenshot of student with a pasted image in an Essay question attempt.

Above is a screenshot of a student attempting an essay question. The image has been pasted.

Student review of essay question attempt. The pasted image is not displayed.

The above screenshot shows the student view when they review their quiz attempt. The pasted image is not displayed.

Average of ratings: -
In reply to Eoin Campbell

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Is the essay question set to Response format: 'HTML editor with file picker'?
In reply to Tim Hunt

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Just popping in to say that it works as intended for me using Firefox (and Chrome) if you do indeed use the "HTML editor with file picker" format.
Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Thanks for testing Mary.

Now that the HTML editor support drag-and-drop upload, and pasting, perhaps we need to change the wording of "HTML editor with file picker"?

It is easy to find test that makes sense if you know how Moodle internals work. Slighly harder (for a geek like me) to work out what language would make sense to most teachers.

How about "HTML editor with the possibility to embed files"? (That is certainly very long, but I think that is all that can be said for it.) Please someone think of something better! smile

Hmm. Perhpas it is easier to say it on the other one: "HTML editor (no embedded files)" and "Full HTML editor" ???
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
The Essay question documentation uses "WYSIWYG editor" instead of HTML editor, replacing an obscure acronym with an even more obscure one. "Rich text" or "Formatted text" might fit better as an alternative to "Plain text". "Rich text with multimedia" could replace "HTML editor with file picker".
Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

The image is displayed OK in the review and grading pages when the Essay question has the response format "HTML editor with file picker", but not when it is "HTML editor" (see screenshot below). 

Is there a way to pre-configure the Essay question so that the default for the "Response format" field is "HTML editor with file picker"? Otherwise lecturers will have to remember to manually change it whenever they create an Essay question.

It still seems like a bug that a student can paste an image in the answer, but it is not displayed.


Screenshot showing pasted image in one question only

In reply to Eoin Campbell

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, it is not Moodle letting the students paste images in a non-working way. That is something web-browers do, and I don't know any way to get them to stop when Moodle cannot support it.

Regarding defaults for essays, the only way to change this default is in the code. https://github.com/moodle/moodle/blob/master/question/type/essay/edit_essay_form.php#L46. Change 'editor' to 'editorfilepicker'.

Also, and hopefully in time for Moodle 3.11, my colleague Mahmoud is working on a feature where after you create one question, the defaults use for the next question (for settings like this one where it makes sense) are the values you used last time. Hopefully that will help a bit. That idea was discussed over at https://moodle.org/mod/forum/discuss.php?d=417341. ;
Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

It's brilliant that we can paste images into the Atto editor, and it's great that there is an easy workaround for the particular issue with Essay questions and the response format "HTML editor" too. 

However, as far as I can see, the only thing wrong with the current implementation in Moodle is that the rendering of answers for the Essay question "HTML editor" format hasn't been updated to support the pasted image feature. If they were simply rendered in the same way as "HTML editor with file picker", would that not fix the issue?

In reply to Eoin Campbell

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

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 are missing the point. Sometimes the question author wants are response that is purely formatted text, with no images (or other embedded suff. Sometimes the question author wants a response that is text embedded media. That is what these two options are about (even if the name is confusing.)
In reply to Eoin Campbell

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Noemí Pérez -

I had a similar problem. I changed "Input box size" from 15 lines to 40 lines and it worked. See the image below (it is in Spanish, sorry).

 

In reply to Noemí Pérez

Re: Possible Moodle 3.9 Essay Quiz question bug on pasted images

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Size of the box does not matter. The key setting is 'Formato de la respuesta'. You have that set to allow embedded files, so it works.
Average of ratings: Useful (1)