Multiple Moodles

Re: Multiple Moodles

by Martin Dougiamas -
Number of replies: 0
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I can't see a way to "send the value of $faculty" with each link, exactly, and you wouldn't put the switch statements in index.php (because then you need to do it in all the hundreds of scripts), but I can see two other ways.

If your front page (non-Moodle) set a cookie containing the faculty before sending you to the Moodle front page, then your main config.php could be modified to check for this cookie, and then branch to set different values for each case. So you would only need to modify config.php.

Another way would be to set up four virtual Apache servers pointing to the same directory, and have the script check the current domain name being used, and use that as the basis to set up your different configs in config.php.