This is a follow-up of
MDL-27414 where the randomsamatch qtype has been converted to the new question engine.
Now the question text of shortanswer questions used in a randomsamatch attempt are stored in the attempt data at attempt start, but the images are not stored
So to reproduce the problem
- As a teacher create 3 short answer questions including one image in question text
- create a randomsamatch question with "Number of questions to select" equal to 3
- include this randomsamatch question in a quiz
- as a student attempt this quiz
- as a teacher delete one of the short answer questions
- either as a teacher or as the student review the student attempt, the image is missing.
Of course this is somewhat of an edge case !
- the randomsamatch question is no utterly broken as it was in 1.9 in the same scenario because only the image is missing.
- we can object it's the teacher responsability no to screw things like that
But it would be better to fix the problem
- is a regression caused by
MDL-27414 Upgrade the randomsamatch question type to the new question engine