What's the best way to copy 2 quizzes from one course to another?

Re: What's the best way to copy 2 quizzes from one course to another?

{$a->নাম} - {$a->তারিখ} দ্বারা
Number of replies: 0
Core developers এর ছবি Documentation writers এর ছবি Particularly helpful Moodlers এর ছবি Peer reviewers এর ছবি Plugin developers এর ছবি

The issue will be to do with the weird numbers in those URLs. There are 4, and taking them in order:

  1. The first number (on its own) is the context id that the question belongs to. You can find the contextid for the course by going to Course administration -> Users -> Permissions and looking at the URL. For the quiz go to Quiz administration -> Permissions. If the number does not match either of those, something is weird.
  2. The second number is the 'question usage id'. Not easy to check, but also there is probably no issue with this. If you really want to check, not the URL .../mod/quiz/attempt.php?id=123, look that up in the quiz table, and find the uniqueid for that row. That is the question usage id.
  3. The third number is the 'slot' number, so the first question (or description) in the quiz is 1, then 2, etc. Also unlikely to be wrong.
  4. The last number should be the question id, which you can see somewhere in the URL when you edit or preview the question in the question bank. If that does not match, that is why backup and restore cannot find the image to copy.

Once you have found in more detail what is wrong, then the question becomes how did it get like that? (Since this situation should never happen.) Failing to copy images with the wrong id is not really a bug. The wrong ids getting created is the bug. Unfortunately, when the time comes to copy the quiz, it is probably long after the details of how the question was created have been forgotten, so it is hard to diagnose.