Sandbox
Maintained by
Alexander Bias, Moodle an Hochschulen e.V.
Moodle plugin which programatically restores courses to predefined course states. It can be used to provide playground moodle courses which will be cleaned periodically.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
Having made a backup of a course and having downloaded the back up file, I decided to restore through sandbox plugin on the same site. I have installed sandbox plugin and try to upload backup file after some time the upload stops/fails with "error connecting to the server".
Any ideas why this is happening?
Regards,
Warda Bukhari
Yannick
thanks for your proposal.
Your proposal is feasible, I would imagine to let the admin add a schedule for every course backup file like he can configure scheduled tasks in Moodle core. However, we don't have any need for this feature at Ulm University and thus don't have resources to implement it.
If you are a developer or have an experienced developer near you, I would be happy to discuss possible implementations with you on https://github.com/moodleuulm/moodle-local_sandbox/issues and get a pull request from you on https://github.com/moodleuulm/moodle-local_sandbox/pulls.
Thanks for understanding,
Alex
This is a nice plugin, I was wondering if it is possible to choose which courses are restored at what time. For example, only restore some courses weekly and some on a monthly basis if it is possible.
Thank you.
Sanjeet
you're right, that's just how the plugin works at the moment. This topic has been discussed before in this comment seciton here, please have a look at the other comments - especially from Jon Bolton - if you like.
Thanks,
Alex
no, it isn't.
Thanks!
based on your posted message, local_sandbox is looking for a course which has a shortname called "demo_lms" which it can reset to the state saved in demo_lms.mbz. If such a course does not exist, you can either change the shortname of the course you want to reset to "demo_lms" or you can rename demo_lms.mbz to the shortname of the course you want to reset.
Alex
Testing the plugin with:
moodle 3.03.
v3.0-r2 (2016021000)
/var/www/clients/client1/web1/private/moodledata/sandbox - (permission: -R 777)
getting email sandbox notification :
1 NOTICE: Sandbox has restored 0 courses
1 WARNING: There is no existing course with shortname "demo_lms", skipping
file...
backupfile name - backup-moodle2-course-6-demo_lms-20160328-1326.mbz
sandbox backup file "demo_lms.mbz"
what i'm doing wrong?
Thank you
Thanks
I can't do anything about 2., that's just how the plugin works at the moment.
But for 1., you can change your hardcoded link form https://yourmoodle.com/course/view.php?id=1234 to https://yourmoodle.com/course/view.php?name=courseshortname. As the course's shortname will be kept for the resetted course, this link will continue to work. And you don't have to hack the plugin ;)
Alex
1. my sandbox is hardcoded into menus, so when the course id changes, the link breaks
2. the sandbox will reset every day, so my course ID number is going to increment very rapidly.
Obviously, the second is not a huge issue, but the first is quite important.
The course ID seems to in classes/task/restore_courses.php - I tried...
$newcourseid = $oldcourseid;
and
$newcourseid = '19';
at the start of the // Create new course section, but neither option works.
Any advice?
> If so, is there a way to have moodle's course backup automatically be stored there?
Give Moosh a try. It's a command line tool and one of its functions, course-backup, allows you to specify the location where you want the backup file to be saved as well as the file name.
For more information, see http://moosh-online.com/commands/#course-backup
Best regards,
Michael