I have a strange error when I delete a quiz from my Moodle 3.5.1+ (tested in 3.5.2+ too).
Unexpected token < in JSON at position 0
SyntaxError: Unexpected token < in JSON at position 0
at parse (<anonymous>)
A few more information :
- it doesn't come from my theme, I changed it to test.
- the error occures under Firefox and Chrome. The message is slightly different, but it doesn't reaaly change anyhting.
- the problem only occures with activities based on the question bank (for me, with the native Quiz and the Offline Qui plugin)
- the problem only occures when the deleted quiz contains questions. If it is empty, there is no message.
- when I close the popup message, the activity is always here. But if I refresh my page, it disappears.
It indicates that some characters in the server response (in this case, the <br/>) aren't JSON string and apparently it made the JSON parser complain.