Do you mean, you want to have a 1.9 site for yourself, for testing and documentation purposes?
I can give you one, with admin and SFTP access, with these restrictions:
- it will be on a VPS with 2 GB RAM, so don't expect high performance
- need to know the time frame (can't promise to maintain forever)
- it'll appear under my domain name. If you need one of your own, you have to look after the DNS.
Thanks for your kind offer, but that's not what I want. I do have a 1.9 installation on my local development machine, but for demonstration purposes it's much faster to have an "official" 1.9 version available as used to be under demo.moodle.org (which now is Moodle 2.0).
Yeah, a 'static' Moodle would have been too easy
I've to admit that I'm not familiar with this demo site. Just now I entered http://demo.moodle.org/ and was greeted by http://demo.moodle.net/. It gives away four user accounts with the comment "The database and files are erased and restored to a clean state every hour on the hour, ...".
Interestingly, that "clean state" doesn't mean it is empty, rather contains many courses in all kinds of laguages. Interesting!
Aparently the maintainer has the backup of an original, which periodically overwrites the site. I have two questions:
- How does the maintainer upgrade and/or edit the content of the original?
- How intensively is this site used, in terms of number of users logged in at the same time?
As you've found, demo.moodle.org redirects to demo.moodle.net as our security expert Petr recommended that a demo site providing admin access should be on a different domain from moodle.org.
The demo site is upgraded and content edited / added to by making use of a restricted access demo master site (which is not wiped clean every hour). The demo master site is updated and then copied to the live demo site. The same process is used for updating http://school.demo.moodle.net/ and for http://qa.moodle.net/.
Sorry I've no idea how intensively the site is used, though usually when I look at it there are new courses and often the theme has been switched, so it seems people appreciate the chance to have a play.
Many thanks! "Warum in die Ferne schweifen?"
I'm trying to setup my own demo moodle site that would reset back to a clean state on the hour or nitely like yours.
How is this done? CRON, Scripted..
I have full root access on WHM and cPanel.
Any directions are greatly appreciated.
Actually, I'm only a consumer of this nifty feature, not the provider
Basically you just have to create a database backup of a clean installation which you play back every hour or so. Don't know what about uploaded files, though.
You might get some ideas from this Drupal module: http://drupal.org/project/demo
I had to do something very similar. Here is my solution. Please note that this is a quick trick which worked for my setup. Think of it as a documentation of the necessary steps. DON'T just repeat them, you'll find your site wiped out!
There is an active Moodle instance with the following config.php in my server (the values in capitol letters are withheld for you to substitute):
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'MDLDB';
$CFG->dbuser = 'MDLUSER';
$CFG->dbpass = 'SECRET';
$CFG->dbpersist = false;
$CFG->prefix = 'mdl_';
$CFG->wwwroot = 'http://MY.SITE';
$CFG->dirroot = '/PATH/TO/MOODLE';
$CFG->dataroot = '/PATH/TO/MOODLEDATA';
$CFG->admin = 'admin';
$CFG->directorypermissions = 00777;
To duplicate this Moodle instance by command. The new one comes up as http://MY.SITE/copy/ If that is already there, it will be overwritten.
What is needed
a) The following commands put together as a shell script:
rm -rf /PATH/TO/MOODLECOPY
cp -ra /PATH/TO/MOODLE /PATH/TO/MOODLECOPY
rm -rf /PATH/TO/MOODLEDATACOPY
cp -ra /PATH/TO/MOODLEDATA /PATH/TO/MOODLEDATACOPY
cp -a /PATH/TO/config.php /PATH/TO/MOODLECOPY
/PATH/TO/mysqldump --databases MDLDB --user=MDLUSER --password=SECRET > mysqldump.sql
/PATH/TO/patch mysqldump.sql mysqldump.diff
/PATH/TO/mysql -u MDLUSER -pSECRET < mysqldump.sql
b) The config.php for the copy. These lines differ from the orignal:
$CFG->dbname = 'MDLDBCOPY';
$CFG->wwwroot = 'http://MY.SITE/copy';
$CFG->dirroot = '/PATH/TO/MOODLECOPY';
$CFG->dataroot = '/PATH/TO/MOODLEDATACOPY';
c) The mysql.diff I've generated by manually editing a copy of the mysqldump.sql I got above and running "diff mysqldump.sql mysqldumpnew.sql > mysqldump.diff". It looks like:
< -- Current Database: `MDLDB`
> -- Current Database: `MDLDBCOPY`
< CREATE DATABASE /*!32312 IF NOT EXISTS*/ `MDLDB` /*!40100 DEFAULT CHARACTER SET utf8 */;
> DROP DATABASE /*!32312 IF EXISTS*/ `MDLDBCOPY`;
> CREATE DATABASE `MDLDBCOPY` /*!40100 DEFAULT CHARACTER SET utf8 */;
< USE `MDLDB`;
> USE `MDLDBCOPY`;
Alias /copy/ "/PATH/TP/MOODLECOPY/"
Just run the shell script in a) keeping b) and c) in the current directory.
- The new Moodle instance has a slightly different URL. Therefore all the absolute links in the database must be adjusted. In a) above the following command right before or after the patch command will do the job:
sed -e "s/http:\/\/MMY.SITE/http:\/\/MY.SITE\/copy/ig" -i.bak mysqldump.sql
- In b) I've assumed that the same database user MDLUSER has all the privileges in the second database (MDLCOPY) too. Something like
GRANT ALL PRIVILEGES ON MDLCOPY.* TO 'MDLUSER'@'localhost';