c6f329808c
Historically it was possible, through a series of question restores, moves and edits, to end up with multiple questions in the same category with the same stamp, but differences in other question or answer fields. This, combined with changes in versions, led to errors when restoring or duplicating quizzes using these questions. While recent changes have made it impossible to create this situation in current Moodle versions, as any edits will create a new question version with a new stamp, this situation may exist on long-standing Moodle sites which have been upgraded since pre-4.0. This change performs a much wider-ranging comparison of restored existing questions, generating a hash of all the data for a question in a backup file, and a corresponding hash for each question in the target category, to decide if a restored question matches a question already in the database.