Moodle 1.9 and Moodle 2.0 pointing to same Mahara instance

Moodle 1.9 and Moodle 2.0 pointing to same Mahara instance

by Ellen Marie Murphy -
Number of replies: 2

We are running Moodle 1.9 and Moodle 2.0 in parallel, while we migrate over.  We are running one instance of Mahara.  If an individual accesses Mahara from Moodle 2.0, it creates a new user account for them.  If they send a forum post from 2.0 to Mahara it goes to this new account, and not their original account.  Is there a way to fix this?

Here is an example of what I see after sending a post from Moodle 2.0 to Mahara.

two logins to Mahara

Average of ratings: -
In reply to Ellen Marie Murphy

Re: Moodle 1.9 and Moodle 2.0 pointing to same Mahara instance

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Yes, that is expected behaviour. From Mahara point of view, those are distinct users roaming from two different sites.

There is no easy/automatic way to handle this as far as I know. But there is a hacky way to achieve this, I believe. Mahara uses a table called "auth_remote_user" that maps remote users to local user accounts. You can try to populate the table in advance with the required values.

For example let us say there is a record:

authinstance = > 3, remoteusername => ellen.murphy, localusr => 42

that maps your 1.9 account to a local Mahara user with id 42. If you create a new record for the new 2.0 account like

authinstance = > 4, remoteusername => ellen.murphy, localusr => 42

then both remote accounts are mapped to a single local account in Mahara.

In reply to David Mudrák

Re: Moodle 1.9 and Moodle 2.0 pointing to same Mahara instance

by Ellen Marie Murphy -

Hi David,

Thanks for your response.  We'll give it a try.

Ellen