Manually triggering activity backup/restore

Manually triggering activity backup/restore

by Florian Grassl -
Number of replies: 1

Hi


I'm currently writing a module, which is supposed to automatically copy activities from one course into another. I could do this manually by messing with the database directly. That's fine for some activities, not so much for stuff like the Quiz however smile


So I figured I try to employ the backup/restore functionality for this. Backup the original activity, then restore it in it's new location.

That should work, shouldn't it?


However, I can't quite figure out how I manually trigger the backup/restore process. 

There has to be some function that gets called, or an object created or something like that, which then creates the backup on the HDD, and in return takes these files again to call a restore.


Someone who could point my nose in the right direction would be really appreciated.


Thank you

Average of ratings: -