Multiple instances with single core moodle

Multiple instances with single core moodle

by kirupa lakshmi -
Number of replies: 4

I had got a solution for using a single core files with multiple databases.

I am using an external portal site and it authenticate to moodle.

When an user authenticates i will got current user's db name and invoke it as a COOKIE Variable. 

But, my alternate url will be the common single core url.

This works great. We have tested it with more than 200 databases.

Average of ratings: Useful (1)
In reply to kirupa lakshmi

Re: Multiple instances with single core moodle

by Mahendra Soni -

It sounds good.

Can you explain it a little more ?

How config.php will be modified ?

How did you get current user's db ?

You can conntect me with my email address also @mmahendra.soni@gmail.com

 

Thanks

Msoni

In reply to Mahendra Soni

Re: Multiple instances with single core moodle

by kirupa lakshmi -

I am creating the config file dynamically when a moodle instance is deployed. We have a seperate admin for this.

In config.php i had done the following change:

$CFG->dbname    = $_COOKIE['cookiename'];

Every time when an user login she will pass over this. I had stored the user's code(DB) .

$domain = ($_SERVER['HTTP_HOST'] != 'hosttype') ? $_SERVER['HTTP_HOST'] : false;
 setcookie('cookiename', $code, time()+60*60*24, '/', $domain, false);

In reply to kirupa lakshmi

Re: Multiple instances with single core moodle

by Mahendra Soni -

Nice concept..!!

I'll definitely use this concept with my moodle instance which we are going to release soon.

 

Thanks a lot!!

I hope I would get more help from you in future!!