Admin/Teacher View 1 Issued Certificate link - Error Reading From Database

Admin/Teacher View 1 Issued Certificate link - Error Reading From Database

by Phil Everist -
Number of replies: 2

Moodle 2.3
Certficate version 2.3 (2012081502)

I am setting up a new Moodle 2.3 installation and testing the certificate module.All is working OK except the following.

For non student roles there is a View 1 Issued Certificates link that gives the error below. I'm assuming it should provide a list report?

I've tested with the default settingsin the certificate module and have tried it with the save certificates option intially off then re-tested set to yes (no difference)

Any suggestions to reolve this?

Thanks
Phil

Debug info: SQLState: 42000<br>
Error Code: 102<br>
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'LIMIT'.<br>

SELECT u.*, ci.code, ci.timecreated
FROM mdl_user u
INNER JOIN mdl_certificate_issues ci
ON u.id = ci.userid
WHERE u.deleted = 0
AND ci.certificateid = '4'
ORDER BY CAST(firstname AS VARCHAR(255)) + CAST(' ' AS VARCHAR(255)) + CAST(lastname AS VARCHAR(255)) LIMIT 30 OFFSET 0
[array (
0 => '4',
)]
Error code: dmlreadexception
Stack trace:
  • line 407 of \lib\dml\moodle_database.php: dml_read_exception thrown
  • line 258 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
  • line 365 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
  • line 777 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
  • line 812 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
  • line 726 of \mod\certificate\lib.php: call to sqlsrv_native_moodle_database->get_records_sql()
  • line 77 of \mod\certificate\report.php: call to certificate_get_issues()
Average of ratings: -
In reply to Phil Everist

Re: Admin/Teacher View 1 Issued Certificate link - Error Reading From Database

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Phil,

Thanks for bringing this to my attention. Seems like an issue that only occurs when running Moodle on a SQL server. I am now aware of two issues I have to resolve for this database. I hope to get a test server set up shortly so I can test the module on a windows box running a SQL database.

In the meantime I have created a tracker issue - http://tracker.moodle.org/browse/CONTRIB-3881

Regards,

Mark

Average of ratings: Useful (1)