Forums | Mahara Community
Mahara/Moodle integration
/
Moodle Mahara SSO problem
18 March 2010, 23:38
Dear all,
I've done the setting for Moodle Mahara SSO but sometimes a "duplicated artefact" problem occurs when user SSO from Moodle to Mahara (during account creation). The real problem is that 2 identical records on the artefact table are found.
SELECT * FROM artefact WHERE owner=823 AND artefacttype = "country"
9909, country, 0, NULL, 823, 2010-03-16 11:44:08, 2010-03-16 11:44:08, 2010-03-16 11:44:08, 0, hk, NULL, NULL, NULL, NULL
9910, country, 0, NULL, 823, 2010-03-16 11:44:08, 2010-03-16 11:44:08, 2010-03-16 11:44:08, 0, hk, NULL, NULL, NULL, NULL
This will result an error when the user is doing the SSO:
Mahara: Site unavailable
A nonrecoverable error occured. This probably means you have encountered a bug in the system
The error log on Apache is:
get_record("artefact", "artefacttype", "country", "owner", "823") at /home/mahara/artefact/internal/lib.php:279
I've to manually remove a duplicated record at the moment. Is there any fixture for this problem? Thanks.
Regards,
Murphy
19 March 2010, 4:27
Problematic records can befound by SQL:
SELECT * FROM artefact a
WHERE EXISTS (SELECT * FROM artefact b
WHERE a.artefacttype = b.artefacttype
AND a.artefacttype IN ("city", "country")
AND a.owner = b.owner
AND a.id <> b.id)
ORDER BY a.owner;
21 March 2010, 17:48
Hello Murphy,
I can't reproduce this yet, but maybe you can help with a few questions... Is it always the country record that gets duplicated? Have you managed to see any pattern or anything similar about the users who get duplicated records? Is it always for new users who have never used Mahara before or can it sometimes happen for users on the second time they jump from Moodle to Mahara? Which Mahara version are you running?
Richard.
21 March 2010, 21:46
We use Moodle Mahara for classes of 40 students in Hong Kong quite often. This problem only occurs when students SSO the first time from Moodle to Mahara creating their accounts. On average, 1 out of 10 students may experience the problem. All 40 students are accessing Mahara from the same computer lab simultaneously. I suspect some SQL commands are duplicated because the server is receiving too many HTTP requests all at the same time. Is there any option to change the INSERT SQL to "INSERT IGNORE" to aviod record duplication? (http://www.tutorialspoint.com/mysql/mysql-handling-duplicates.htm).
It is always the country and city records. I think it may be the SQLs following firstname, lastname and email at last. I'm running Moodle 1.9.5 and Mahara 1.2.2. Users having problem cannot login Mahara at the first time. Afterwards, they will always get the same error screen and can never use the Mahara at all. Thanks.