Hi
Promising plugin, but we can't get it to work with Moodle 3.4.4 and PostgreSql. The debug is
Debug info: ERROR: syntax error at or near "'user'"
LINE 1: SELECT a.id, a.groupid as 'user', r.position, a.timecreated,...
^
SELECT
a.id, a.groupid as 'user', r.position, a.timecreated, CASE WHEN
EXISTS(SELECT 1 FROM mdl_treasurehunt_stages ri INNER JOIN
mdl_treasurehunt_attempts at ON at.stageid=ri.id WHERE
ri.position=r.position AND ri.roadid=r.roadid AND at.groupid=a.groupid
AND at.penalty=1) THEN 1 ELSE 0 end as withfailures, CASE WHEN
EXISTS(SELECT 1 FROM mdl_treasurehunt_stages ri INNER JOIN
mdl_treasurehunt_attempts at ON at.stageid=ri.id WHERE
ri.position=r.position AND ri.roadid=r.roadid AND at.groupid=a.groupid
AND at.success=1 AND (at.type='location' OR at.type='qr')) THEN 1 ELSE 0
end as success FROM mdl_treasurehunt_attempts a INNER JOIN
mdl_treasurehunt_stages r ON a.stageid=r.id INNER JOIN
mdl_treasurehunt_roads ro ON r.roadid=ro.id WHERE ro.treasurehuntid=$1
AND a.groupid != 0 order by r.position, 'user',a.id,r.roadid
[array (
0 => '2',
)]
Error code: dmlreadexception
And Stacktrace :
- line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
- line 778 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
- line 1446 of /mod/treasurehunt/locallib.php: call to pgsql_native_moodle_database->get_records_sql()
- line 2087 of /mod/treasurehunt/locallib.php: call to treasurehunt_get_list_participants_and_attempts_in_roads()
- line 123 of /mod/treasurehunt/view.php: call to treasurehunt_view_users_progress_table()