How can I reset everything?

How can I reset everything?

by Mary Cooch -
Number of replies: 4
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Is it easy (or difficult) to reset a whole site in the way demo Moodle and School Moodle are reset each hour? When I did training for  Moodle partner they had a smiilar thing -I typed something in browser that reset all training sites to empty after each session. I would like to do the same for my localhost Moodle each time I play with it - is it beyond me?

Average of ratings: -
In reply to Mary Cooch

Re: How can I reset everything?

by Alex Walker -

I actually do the same thing at my college. I have a training Moodle that wipes every night at midnight. It does require moderate technical skills, but here's exactly what you want to do:

  • Set up your Moodle the way you want it. You might want to include a few sample courses, or give lecturers extra permissions (e.g. course creation). This will be the "clean state" that your Moodle will be restored to.
  • Take a backup of the Moodle database, the webroot (where Moodle's PHP files live) and the moodledata folder.
  • If you want to restore your Moodle to the clean state, all you have to do is overwrite the Moodle database, webroot and moodledata folder with your backups.

If you want to automatically do this every so often, you could write a script to do it. I have one in my Linux crontab. You might be able to do it in Windows with scheduled tasks.

In reply to Alex Walker

Re: How can I reset everything?

by khaled baloul -

Hello Alex,

 

Could u please share with us your linux script to reset moodle.

Cheers

K. Baloul

In reply to khaled baloul

Re: How can I reset everything?

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

Ah right Alex - that makes perfect sense; just overwrite everything again. My local host is on a Windows laptop and I have no idea how to write a script or set up scheduled tasks so I will have to do it the long waysmile