-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
2.5.6, 2.6.3, 2.7
-
2014011500
-
PostgreSQL
-
MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
CONTRIB-5091-master
This error seems to relate to an issue PostgreSQL has with prepared statements where there's a parameter with an unspecified data type in a "SELECT ? AS whatever" statement, and is triggered (under the right conditions - see below) when hiding or showing a checklist item in the 'Edit checklist' tab. As far as I can tell only PostgreSQL is affected, although I haven't tested this.
The error only occurs under a very specific set of conditions which seem to include linking the checklist to other course modules which themselves have completion tracking enabled, and also restricting the checklist access to members of a specific grouping. I really struggled to reproduce this in my dev environment, to the point where just I ended up restoring a backup of the affected course from our production instance. I can attach this backup if necessary to reproduce.
The fix simply removes the troublesome first parameter, which as it turns out doesn't seem to be needed anyway.