Forums | Mahara Community
Mahara/Moodle integration
/
Problem with Mahara-Moodle View Submission
05 January 2010, 7:31
I have been following the instructions for Mahara-Moodle View Submission at http://tinyurl.com/ycnh8bz using Moodle 1.9.7 and Mahara 1.2.0. Everything works fine until the teacher tries to view the student's assignment submission. This just shows "Site unavailable: A nonrecoverable error occured. This probably means you have encountered a bug in the system". The URL being linked to looks fine, and works when the teacher logs out. Also, the student can see his/her own submission from within Moodle. Has anyone else seen this?
13 January 2010, 13:13
I have the same issue. It can get this to work fine on all instances but one, however the environments are identical so it is hard to diagnose.
The following is the related Mahara error log:
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] [WAR] 79 (lib/errors.php:738) get_record_sql found more than one row. If you meant to retrieve more than one record, use get_records_*, otherwise check your code or database for inconsistencies, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] Call stack (most recent first):, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * log_message("get_record_sql found more than one row. If you mea...", 8, true, true) at /mahara/docroot/lib/errors.php:111, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * log_warn("get_record_sql found more than one row. If you mea...") at /mahara/docroot/lib/errors.php:738, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * SQLException->__construct("get_record_sql found more than one row. If you mea...") at /mahara/docroot/lib/dml.php:320, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * get_record_sql("SELECT, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] h.*, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] FROM, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] ...", array(size 1)) at /mahara/docroot/api/xmlrpc/lib.php:744, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * get_peer_from_instanceid("4") at /mahara/docroot/view/view.php:191, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] , referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] [WAR] 79 (lib/dml.php:319) get_record_sql found more than one row. If you meant to retrieve more than one record, use get_records_*, otherwise check your code or database for inconsistencies, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] Call stack (most recent first):, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * get_record_sql("SELECT, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] h.*, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] FROM, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] ...", array(size 1)) at /mahara/docroot/api/xmlrpc/lib.php:744, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] * get_peer_from_instanceid("4") at /mahara/docroot/view/view.php:191, referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
[Wed Jan 13 16:37:09 2010] [error] [client 128.86.232.51] , referer: http://{MYSERVER}/mod/assignment/submissions.php?id=13555
Not sure what the duplications are.
14 January 2010, 17:45
Hi James,
Thanks very much for the error log. It looks to me like a bug - there's a query in there that seems to be joining on the wrong database column, and it will fail every time the moodle institution has more than one authentication plugin configured. I think you could work around this at the moment by removing all but the xmlrpc authentication plugin from the institution.
This is the patch I'll be applying to fix the query:
http://mahara.org/artefact/file/download.php?file=38490
R.
14 January 2010, 18:23
That last post wasn't quite right -- it should still work okay for institutions with multiple auth plugins configured, the problem is when there is more than one record in the host table with the same institution.
I think this can happen when you configure an xmlrpc auth instance, delete it, and then create another xmlrpc auth instance with a different wwwroot. It may also happen when you try to use the same wwwroot in two xmlrpc auth instances in two different institutions.
As a temporary fix you could go into the database and delete any host records that are not being used, and also make sure the 'institution' field is set correctly for any host records that are being used.
The patch linked to in the last post should also fix the problem.
15 January 2010, 14:16
Thanks Richard
We had changed the DNS sub-domain of Moodle and so there were two different entries for the same Moodle in the Mahara host table.
I deleted the old host entry and this is working fine now.
Yours
James