-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
1.9.13
-
None
-
PostgreSQL 8.1
-
PostgreSQL
-
-
MOODLE_19_STABLE
When clicking Submission Inbox in turnitintool we got this error:
"Could not get assignment part data (lib.php | 1477)"
We managed to get rid of this error by adding "AS" in lib.php line 1476: 'min(dtstart) AS dtstart'.
Apparently in MySQL "AS" is optional for column aliases, but for PostgreSQL < 8.4, it is mandatory.
http://sql-info.de/postgresql/postgres-gotchas.html#1_1
http://www.postgresql.org/docs/8.3/static/sql-select.html
http://www.postgresql.org/docs/8.4/static/sql-select.html
http://docs.moodle.org/dev/XMLDB_problems#Table_and_column_aliases_-_the_AS_keyword
I checked turnitintool's code and found there are many more queries of the same kind.
For example, in calls to "turnitintool_get_record_select", column aliases are mostly written without using "AS".
Could you please fix and test this with PostgreSQL 8.3 or lower to make sure turnitintool works with all Moodle-supported databases?
Thank you.