Moodle community sites

Moodle documentation: Moodle 1.9 demo site for documentation purposes

 
 
Frank Ralf
Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Documentation writers
I'd like to have a Moodle 1.9 demo site for documentation purposes (back). It's the best way to create screenshots for specific questions in the forums, especially the "Moodle Features Demo" course.

Cheers,
Frank
 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Particularly helpful Moodlers
Hi Ralf

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.
 
Average of ratings: -
Frank Ralf
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Documentation writers
Hi Visvanath,

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).

Cheers,
Frank
 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Particularly helpful Moodlers
Hi Ralf

Yeah, a 'static' Moodle would have been too easy wink

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?

 
Average of ratings: -
Picture of Helen Foster
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Hi Visvanath,

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. smile

 
Average of ratings:Useful (1)
Picture of Ralf Hilgenstock
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hi Frank

you can use http://test.moodle.de which is a 1.9 instance .  Its updated daily at night (German time). Access data are at start page. Our 2.0 test instance can be found at  http://moodle2.de.

Ralf

 
Average of ratings:Useful (1)
Frank Ralf
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Documentation writers
Hi Ralf,

Many thanks! "Warum in die Ferne schweifen?" wink

Frank
 
Average of ratings: -
Don
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Testers

Ralf,

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.

 
Average of ratings: -
Frank Ralf
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Documentation writers
Hi Don,

Actually, I'm only a consumer of this nifty feature, not the provider wink

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

hth
Frank
 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Particularly helpful Moodlers

Hi Don
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!


Starting point

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):

<?php
unset($CFG);
$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;
require_once("$CFG->dirroot/lib/setup.php");
?>

The idea

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
rm /PATH/TO/MOODLEDATA/sessions/*
/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:

19c19
< -- Current Database: `MDLDB`
---
> -- Current Database: `MDLDBCOPY`
22c22,23
< 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 */;
24c25
< USE `MDLDB`;
---
> USE `MDLDBCOPY`;

d) Apache configured so that http://MY.SITE points to /PATH/TO/MOODLE and http://MY.SITE/copy points to /PATH/TO/MOODLECOPY. For example

...
DocumentRoot /PATH/TO/MOODLE
...
Alias /copy/ "/PATH/TP/MOODLECOPY/"

Just run the shell script in a) keeping b) and c) in the current directory.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Moodle documentation: Moodle 1.9 demo site for documentation purposes
Group Particularly helpful Moodlers
Two things I've missed in the previous post:

- 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';
 
Average of ratings: -