Fixing PHP notices
Fixes bug that queries all "quiz_rel_question" rows (for orphan questions) when cleaning/copying a course see BT#5854