500 (Internal Server Error)

Re: 500 (Internal Server Error)

by Kehinde Adeoya -
Number of replies: 0

Thanks, Howard. What I am trying to achieve is this:

This is my scenario:
1. There is a page that takes the login details of school managers who wants to join our Moodle platform. Their auth credentials are logged into our database, as well, the database config for each user.

2. If they agreed to join after running the demo, which is basically Moodle, they would be redirected to signup on Mahara and configured as an institution on it. This is because we want to have a client that can manage multiple institutions, which Mahara passes for.

3. All users created on Mahara would be synced into Moodle using LTI. Which makes them have 2 UIs for login - (Moodle and Mahara). LTI connects to instances of Moodle. This means that if I have 100 institutions in Mahara, I must have 100 instances of Moodle running. (This seems weird. It's an overkill to me, I suppose).

4. My proposed solution is to have a single Moodle that will have 100 databases (blind copy of Moodle default database setup). This means that all the users would use only a UI for authentication despite the institution. I am now looking to find a way to write a service that gets the user login details, check it against, our database that manages the auth credentials of the users. It would pull the database credentials of the user, and set it at runtime for the Moodle config.php params.
Moodle should now connect to the database based on the credentials. set for the logged in user.

This may be unstructured and not aligned with Moodle design. In a nutshell, what I want to achieve is to use a single Moodle for Multi-tenancy, with complete institution data separation. I have tried using Category of courses, yet it does not solve the problem as being a single database, complete data isolation is not achieved.

I'm sure, you being an expert already have a remedy for my concern. I'll be glad you share the better plan with me on how to achieve multi-tenancy.

Thanks a lot.