Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres error using report #4

Open
mchurchward opened this issue Oct 3, 2016 · 1 comment
Open

Postgres error using report #4

mchurchward opened this issue Oct 3, 2016 · 1 comment

Comments

@mchurchward
Copy link

The following error came up testing the report on Postgres:

Error reading from database

More information about this error
Debug info: ERROR: column "new" does not exist
LINE 11: AND s.status NOT IN ("new", "draft")
^
SELECT u.id AS userid, s.id AS entid, gi.id AS giid, u.firstname, u.lastname, u.idnumber, s.status,
gi.itemname, gg.finalgrade, s.timemodified AS timesubmitted, ag.timemodified AS timegraded, u.alternatename,
s.timemodified AS timecreated, gg.overridden, u.firstnamephonetic, u.lastnamephonetic, u.middlename
FROM mdlassign_submission s
INNER JOIN mdlassign a ON s.assignment = a.id
INNER JOIN mdlgrade_items gi ON gi.iteminstance = a.id
LEFT JOIN mdlgrade_grades gg ON gg.itemid = gi.id AND gg.userid = s.userid
LEFT JOIN mdlassign_grades ag ON ag.assignment = a.id AND ag.userid = s.userid
INNER JOIN mdluser u ON u.id = s.userid AND s.userid in (3)
WHERE a.course = $1
AND s.status NOT IN ("new", "draft")
AND s.userid != 0
AND gi.itemmodule = 'assign'
AND s.timemodified >= $2
AND s.timemodified <= $3
[array (
0 => 5,
1 => 1475467200,
2 => 1475553599,
)]
Error code: dmlreadexception
Stack trace:

line 474 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 753 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 1311 of /report/ncccscensus/lib.php: call to pgsql_native_moodle_database->get_recordset_sql()
line 716 of /report/ncccscensus/lib.php: call to report_ncccscensus_build_grades_array()
line 63 of /report/ncccscensus/index.php: call to report_ncccscensus_generate_report()
@mchurchward
Copy link
Author

This is another "double quote" error. This pull has a fix - PoetOS@0834ecd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant