Moodle multisite

Moodle multisite

by Gabriel Dias -
Number of replies: 2
Hi everyone. I'm new in moodle but i've done something that could be useful. I'm trying to make a multisite for moodle. I've been talking with David Horat on how to implement this idea. Some months ago i did something similar with Xoops CMS. With a partner we 've created a multisite for xoops CMS called multix. Yesterday i probed it in moodle. Here i give you what i've done. Please take a look at this and please tell me what do you think.

The idea is:

Make a trigger in the config file that include a file depending of the current $_SERVER['host'] variable.
I created a 'sites' folder and make a folder for each site called 'sitename'. Inside the folder i just put the config file related with the site. Cause i'm new in moodle i 'd need that someone help me to know if there are more folder or config files that have to be different in each site(for example for xoops there is a folder called 'cache' and another called 'templates_c' that obviously have to be different for each site).

Here i pass you an example with two site in one dirroot. Do the following:

Copy the 'sites' folder i give you in moodle dirroot. Edit the /sites/sites.php file and put:

$moodle_site["sitename"]="sitename";

Install one site in the common way. Then make a folder in /sites folder with the name of the site
For example if you make a site called site1.com make the folder

/sites/sites1.com/

Copy in the folder the config file i give you.
Then replace the /config.php file with the one i give you. Prove the site, it should work.

The to install one more site. Make a backup of the config.php file and delete it. Install other site as usual. Modify the /sites/sites.php file and add the new site. Create a folder to this site and do the same as the other site.

Finally replace the /config.php file with the one that you backup. It should work.

Please tell me if you can prove it and what do you think.


Then the my idea is to do something to share tables between different sites. In fact i've done something but is too dirty. I'll try to meke it better.
Sorry for my english.

Saganxis
Average of ratings: -
In reply to Gabriel Dias

Re: Moodle multisite

by Colin Chambers -
Hi Gabriel,

I just noticed this post. and I really like your idea. It also has ties with a project I am working on at the Open University UK see http://moodle.org/mod/forum/discuss.php?d=71136. We're developing an offline moodle client which will effectively be a standalone Moodle installed on a mobile device that can synchronise with a parent hub.

So basically we need to get lots of data in and out of each Moodle and transfer it between each instance. The concept has been proven using very basic code since april. Now I've just got an end to end version working that has addressed the massive data transfer issues. It synchronises a course on the main hub with the offline client and back again. So I can update the hub, synch and see the change on the client, then reply on the client, synch and see the change on the hub.

The areas we have most in common are with needing to get a lot of info in and out of Moodle and transferring it back and forth. We've achieved this aspect using mainly the backup and restore component to get data in and out and Moodle Network to provide a web service layer to coordinate transfer of data.

I just thought I'd let you know because if what we've learned can help you then we'd love to pass on the knowledge. Similarly if you have anything you'd like to share then it'd be great to hear from some one with similar issues.
In reply to Gabriel Dias

Re: Moodle multisite

by Angela Roberts -
I am curious to know if anyone has tried to use this and if it works? Has anyone had any experiences with this? Recommenations?

thanks

anglea