Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.4.4, 2.5
-
Database:PostgreSQL
-
Testing Instructions:
-
Difficulty:Easy
-
Affected Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
-
Fixed Branches:MOODLE_24_STABLE, MOODLE_25_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
When using the log report (Site pages / ► Reports / ► Logs), and picking a course to report logs on, if you then use the activity drop down, but choose a section heading in there (i.e. '-- Topic 1 --') you get a fatal db error on postgres.
Debug info: ERROR: invalid input syntax for integer: "section1"
|
SELECT COUNT(*)
|
FROM mdl_log l
|
WHERE l.cmid = $1 AND l.time > $2 AND l.time < $3
|
[array (
|
0 => 'section1',
|
1 => 1372946400,
|
2 => 1373032800,
|
)]
|
Given the underlying code only deals with a single modid being passed from this form, I believe the topic headings should instead be optgroups that aren't actually meant to be selectable.
It appears mysql silently doesn't care that you're trying to compare a string on an int field... The error doesn't come up on mysql, but the results displayed are incorrect (you'd expect to maybe see all the logs for that topic, you dont).