Restoring published quiz questions

Restoring published quiz questions

by Marilyn Fleming -
Number of replies: 2

I was trying to set up "question banks" to be shared among several courses. I built a hidden Question Bank course Z that contained only questions (not content), then courses A and B that used questions from Z.

When I back up A (or B) it copies all the questions from Z. Then, when I restore A, I have two copies of the question bank, one embedded in A plus the separate one in Z.

Any way around this?

The main reason it's an issue right now is that I am both learning Moodle and experimenting with different servers. So I have to keep moving a whole Moodle (not just one course) from one place to another.

Average of ratings: -
In reply to Marilyn Fleming

Re: Restoring published quiz questions

by Przemyslaw Stencel -

If you move the whole site to a different server, I think a better option would be to dump the whole database and restore it on the new server using PhpMyadmin, rather than creating backups of individual courses and restoring them on the new server using the Moodle restore function. It would save you a lot of work and you would not run into this problem with duplicate questions.

In reply to Marilyn Fleming

Re: Restoring published quiz questions

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Marilyn,

Let's imagine that your "original" Z, A and B courses are in server 1. Z is the "owner" of the questions.

If you backup and restore A or B in server 1, then the new courses, A2 or B2, will use Z questions too.

If you restore A or B in another server called 2, if Z exists there, the new restored courses will use its questions too.

But if Z doesn't exists in server 2, A or B will restore the questions as owners. This is the expected behaviour to ensure the integrity of the quizzes across different servers !!

So, I recommend you that always restore your Z (repository) course in the new server before restore the A or B (dependent) courses on it.

Has this sense for you ?

Ciao, smile