-
Bug
-
Resolution: Fixed
-
Blocker
-
1.9.14, 2.0.5, 2.1.2, 2.2
-
Moodle 2.1.1+, build 20110916, upgraded from 2.1.
Debian GNU/Linux 6.0.2 (squeeze); Apache/2.2.16 (Debian); PHP 5.3.3-7+squeeze3 with Suhosin-Patch; mysql Ver 14.14 Distrib 5.1.49.
-
MySQL
-
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
-
-
When ordering submitted assignments by status, an error is received:
"Error reading from database - Unknown column 'status' in 'order clause'"
Using the back button on this page causes the page which previously worked fine to fail with an identical error.
Full error:
Debug info: Unknown column 'status' in 'order clause'
|
SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email,
|
s.id AS submissionid, s.grade, s.submissioncomment,
|
s.timemodified, s.timemarked FROM mdl_user u LEFT JOIN mdl_assignment_submissions s ON u.id = s.userid
|
AND s.assignment = 591 WHERE u.id IN (631,868,2051,2057,2058,2070,2071,2087,2094,2095,2096,2097,2098,2099,2100,2102,2434,2436,2833,2836,2838,3112,3113,3115,3226,3373,3967,915,3930,4226) ORDER BY status ASC, lastname ASC
|
[array (
|
)]
|
Stack trace:
|
|
line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
line 795 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 1325 of /mod/assignment/lib.php: call to mysqli_native_moodle_database->get_records_sql()
|
line 649 of /mod/assignment/lib.php: call to assignment_base->display_submissions()
|
line 57 of /mod/assignment/submissions.php: call to assignment_base->submissions()
|
Replication steps:
- Click on an Assignment activity with submitted assignments.
- Click on the "View n submitted assignments" link. A summary table appears. Note that at this point, everything is fine. The URL is along the lines of: http://moodle.domain.com/mod/assignment/submissions.php?id=29526
- Click on the 'Status' column header, to sort the table by status. At this point, the above error is received. (This page uses the URL: http://moodle.comain.com/mod/assignment/submissions.php?id=29526¤tgroup=&tsort=status)
- Clicking the browser's back button to get to the previously working page (with the URL as in 2, above) also now results in this error and stack trace.
- Logging out and in again (clearing the user session?) appears to slightly fix the issue: at least the page in 2, above, can be reached again.
- is a regression caused by
-
MDL-27638 Assignment Module Submissions SQL overflow
- Closed