Skip to content

Attempting to get the HTML report leads to an error #1

@mudrd8mz

Description

@mudrd8mz

Testing the report on a course running on a PostgreSQL site seems to lead to a notice:

Notice: Use of undefined constant EXCLUDE_GROUP_MEMBERS - assumed 'EXCLUDE_GROUP_MEMBERS' in report/ncccscensus/lib.php on line 1069
Call Stack
#   Time    Memory  Function    Location
1   0.0002  267984  {main}( )   ../index.php:0
2   0.1887  10863984    report_ncccscensus_generate_report( )   ../index.php:63
3   0.1887  10864536    report_ncccscensus_get_users( ) ../lib.php:714

followed by a DB error:

Error reading from database

More information about this error

Debug info: ERROR: operator does not exist: character varying = bigint
LINE 13: AND gi.itemmodule = "forum"
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
SELECT u.id AS userid, fp.id AS postid, gi.id AS giid, u.firstname, u.lastname, u.idnumber, gg.overridden,
fp.message, gi.itemname, gg.finalgrade, fp.created AS timesubmitted, fp.modified AS timecreated,
u.firstnamephonetic, u.lastnamephonetic, u.middlename, u.alternatename
FROM mdl_forum_posts fp
INNER JOIN mdl_forum_discussions fd ON fd.id = fp.discussion
INNER JOIN mdl_forum f ON f.id = fd.forum
INNER JOIN mdl_grade_items gi ON gi.iteminstance = fd.forum
LEFT JOIN mdl_grade_grades gg ON gg.itemid = gi.id AND gg.userid = fp.userid
INNER JOIN mdl_user u ON u.id = fp.userid AND fp.userid in (105,110,103,108,104,106,112,107,111,109,3)
WHERE fd.course = $1
AND f.assessed > 0
AND fp.userid != 0
AND gi.itemmodule = "forum"
AND fp.created >= $2
AND fp.created <= $3
GROUP BY fp.userid, u.id, fp.id, gi.id, u.firstname, u.lastname, u.idnumber, fp.message, gi.itemname, gg.finalgrade,
fp.created
ORDER BY fp.created ASC, u.lastname ASC, u.firstname ASC
[array (
0 => 3,
1 => 1454108400,
2 => 1475272799,
)]
Error code: dmlreadexception

Stack trace:
line 443 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 744 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 1192 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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions