error while restoring course: not_specified_restore_task

error while restoring course: not_specified_restore_task

by Perry Way -
Number of replies: 0

I am building a script to do a mass-restore of courses. We are running on Moodle 3.0.3. When I run the script to restore only one course, it will restore that course always, without fail. When I run the script in bulk to iterate zip files in a folder, it sometimes runs okay for a few courses in a row, but then it fails after a few iterations with this error not_specified_restore_task.  

When I research that error it seems that the error is only thrown when a task item is null in restore_step.class.php on line 43. Strangely though, that error only happens in bulk. When I reattempt to restore this course, it works!

Is this some kind of environmental bug?

What can I do as a go-around?

I seriously need to restore thousands of courses. Today. Not tomorrow.

Average of ratings: -