moosh
moosh copied to clipboard
Restoring a course backup does not restore the question bank with --overwrite option
- moosh version: 1.14
- moodle version: 4.2.2
- database: Postgres
- php version: 8.0
- operating system: Ubuntu 22.04.3 LTS
Actual behaviour
When we use MOOSH to restore a course backup with --overwrite option , it does not restore the question bank, it just delete all the questions.
nb: If we use the same command to restore the backup a 2nd time (or on a course with no question bank), it works well.
Expected behaviour
The course-restore --overwrite command must overwrite the question bank.
Steps to reproduce
- Export a course backup with a question bank containing at least 2 questions
- Modify the questions
- Restore the backup with this command:
course-restore --overwrite -e course.mbz [COURSE_ID]
For the record, I just tested the same manipulation directly inside Moodle (Restore the same course backup on the course already containing a question bank), and Moodle worked as expected. The problem really comes from Moosh.