by Ken Task.
Didn't see that in screen you shared ... but ...
Dunno if it's related or not, but there is a script in code/admin/cli/ called 'fix_orphaned_question_categories.php'. Have blindly fixed things in past by running something which triggers other.
Sounds like you might be in for some pain ... editing rows one at a time - once you match up module id with question having issues. :|
Sorry ... like I said ... maybe in the quiz forums one will attract attention of quiz experts.
'SoS', Ken