academic-moodle-cooperation / moodle-mod_publication

Online texts and files can be collected and published via the Student Folder activity and thus made available to everyone in a Moodle course. Submissions can be made directly by uploading or alternatively can be taken over by teachers from an assignment activity.
https://academic-moodle-cooperation.org/mod_publication/
12 stars 21 forks source link

Ambiguous column name 'email'. #55

Closed mrkskwsnck closed 2 years ago

mrkskwsnck commented 2 years ago

I am maintaining Moodle v3.9.11 running mod_publication v3.9.0 based on SQL Server (MSSQL) database.

A teacher gets the following error by entering the student folder activity → Ambiguous column name 'email'.

image

I figured out, the problem results from the doubled u.name column (with aliased table prefix) addressed within the SELECT statement. Because of that the ORDER BY statement can′t decide which one to order by, because the email column lacks its aliased table prefix.

mrkskwsnck commented 2 years ago

I created the PR https://github.com/academic-moodle-cooperation/moodle-mod_publication/pull/57 with a hacky fix

goggo24 commented 2 years ago

included in v.3.11.2 - thanks for the PR