Moodle does not allow base64 encoded images in some places for security and performance issues.
However, this is not clear for users since they do not get notice about their content not being saved.
In question type "essay", base64 encoded images are visible to students in their own attempts, but not to the teachers in the submitted attempt.
This can lead to students copy/pasting answers from programs that serve SVGs (eg Microsoft OneNote), and teachers not seeing these answers, even though it seems to the students that the answers will be saved.
This behaviour is inconsistent and should be changed, for example show a warning not, or if possible do not allow copy/pasting base64 encoded images altogether.
- Create a quiz with 2 questions of "essay" question type
- Set the quiz settings:
grade - attempts allowed: unlimited
review options - show the attempt immediately after the attempt
question behaviour - each attempt builds on the last: yes
- Log in as a student and copy/paste a SVG into the editor field for the first question
-> The SVG will be inserted as base64
- Go to the next question
- Log out, then log in again as the same student, open the quiz and "continue last attempt"
-> The base64 encoded SVG will still show
- Submit the question attempt
-> The SVG will not show
- Re-attempt the quiz as the same student
-> The base64 encoded SVG will show