Sandbox help

Sandbox help

by nolan damon -
Number of replies: 8

Can someone please help me with creating a sandbox course.  I am using Moodle 2.7.1 and already installed the plugin.  I am having trouble creating the sandbox course. It is enabled in the Scheduled Tasks.

Average of ratings: -
In reply to nolan damon

Re: Sandbox help

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Where do you want to have your sandbox, on the Internet or on your local computer?  Do you mean a sandbox "moodle"?  If all you desire is a sandbox course in your current moodle, just create it.  I, for example, have a course called "Experimental" on my production moodle.  I also use several of the AMP installations to have a sandbox moodle on my Mac and virtual PCs (on my Mac.)

I find this to be the beauty of using Moodle: one can have easy experimental moodles.

In reply to Rick Jerz

Re: Sandbox help

by nolan damon -

I want it on my production site for newcomers to practice skills. The problem is how do I create it.

In reply to nolan damon

Re: Sandbox help

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Are you referring to the sandbox plugin here? I haven't used it but does the readme file offer any suggestions? I'm moving your post to the general plugins forum. Do you perhaps just have to create a course as usual?

In reply to Mary Cooch

Re: Sandbox help

by nolan damon -

Yes, Mary, the sandbox plugin. I don't know how to create a sandbox course for newcomers to practice skills.

In reply to nolan damon

Re: Sandbox help

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Does it not work if you simply create a course first? (Sorry- I haven't used this plugin but presumably you have to create the courses?)

In reply to Mary Cooch

Re: Sandbox help

by nolan damon -

I created about 12 courses. My question is, is there a place where you set the course as a "sandbox course" where guests or participants can practice skills and it gets reset every 30 minutes or so.

In reply to nolan damon

Re: Sandbox help

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Nolan,

This was something I've been wanting to set up myself, and I think I've finally figured it out.

You do not set a course as a "sandbox course" as it is a backup file, with the right name, in the right location, that does that automatically.

Let's say you have a course named Testing and it's short name is also Testing. The course name is not important as the sandbox plugin uses the short name. Get the course set up with all the activities and resources you want in it. Make a backup of the course. Now change it's name. Let's say the course backup file was named backup-moodle2-course-35-testing-20160921-1510.mbz shorten the file name to testing.mbz.

Now you must make sure that your have a sandbox folder in yourmoodledata. e.g. on my Linux server, mine is at /var/moodledata/moodledata3dev/sandbox. Place the testing.mbz file in the sandbox folder.

Go to Administration > Site administration > Courses > Sandbox and set things as you desire, just make sure the path to your sandbox folder is set correctly. In the Execution time section click the link for Scheduled tasks.

Scroll down the Scheduled Task list until you find, Restore sandbox courses. Notice that the default cron is set to run every Sunday at 1:00 AM. Click the edit icon and change the cron settings to whatever you need such as hourly, daily, etc. Save your changes. Just for testing purposes, I set mine for just a few minutes ahead or the current time so I would not have to wait for Sunday. big grin

Make sure your cron is actually working. Go back into your test course and mess something up. I practically deleted everything. After all, it was a testing course. When the cron for sandbox runs at the next date and time you set, your course should be restored. Can't stress it enough, make sure the filename is right and cron is working. I just tried this on a new server, and new dev site, and my first two attempts did not restore the course. One was due to using the original name of the backup file instead of the shortname.mbz version, and the other was due to cron not being setup for the dev site.

NOTE: You are going to need to create 12 different shortname.mbz files and place them in your sandbox folder.

HTH
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Sandbox help

by nolan damon -

Hi AL

Thank you so much.  I really appreciate your help.  My sandbox courses are running now, thanks to you.

Kind regards

Nolan