Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7, 1.7.1, 1.8
-
Component/s: Database SQL/XMLDB
-
Labels:None
-
Environment:Solaris 10,
Oracle 10g,
Firefox 2.0.0.2
-
Database:Oracle
-
URL:/mod/assignment/submissions.php?id=x
-
Affected Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
-
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Description
Some of our students have uploaded files, but neither teachers nor admins can view these files...
(/mod/assignment/submissions.php?id=x)
The following ORA error (see screenshot) is displayed, if developer-messages is switched on.
ORA-00918: Spalte nicht eindeutig definiert (column ambiguously defined)
SELECT u.id, u.id, u.firstname, u.lastname, u.picture,
s.id AS submissionid, s.grade, s.submissioncomment,
s.timemodified, s.timemarked FROM m_user u LEFT JOIN m_assignment_submissions s ON u.id = s.userid
AND s.assignment = 1 WHERE u.id IN (4,5) ORDER BY lastname ASC
- line 677 of lib/dmllib.php: call to debugging()
- line 918 of lib/dmllib.php: call to get_recordset_sql()
- line 1116 of mod/assignment/lib.php: call to get_records_sql()
- line 560 of mod/assignment/lib.php: call to assignment_base->display_submissions()
- line 43 of mod/assignment/submissions.php: call to assignment_base->submissions()
Hi Dennis,
I've executed the SQL above against one Oracle10g box and it runs perfectly for me!
Also, all columns in the query have their table prefix ("u" for m_user and "s" for m_assignment_submissions). The only one not having that is the "lastname" used in the ORDER BY clause, but it shouldn't be a problem at all, because such column name is only present in the m_user table.
Uhm... can you confirm that your m_assignment_submissions table haven't such lastname column? Also, just to try it, could you take out one of the "u.id" columns at the beginning of the query? It shouldn't cause any problem (works here) but... with Oracle... who knows...
Thanks!