-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
1.9.13, 2.0.5, 2.1.2
-
None
-
Debian testing (with Moodle from moodle.org, not Debian package)
-
MySQL
-
MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
The problem described in MDL-10846 appears again in Moodle 1.9 (tested with 1.9.13+ (Build: 20110921)), with exactly the same cause:
When looking at the list of assignments (by "View ... submitted assignments"), press "status" column title to sort by status. All records disappear. Reason: SQL query generated is invalid, it contains "order by status" but the status field doesn't exist.
It seems that the fix for MDL-10846 no longer exists in 1.9.x source code. It seems that a fix exists in the latest 2.x source code, although I didn't check does it actually work. So I'm sure this bug affects 1.9.x branch, and I do not know if it affects 2.0.x or 2.1.x.
I'm attaching a patch that fixes it simply by adding back the status field, but this patch may be suitable only for some databases (like MySQL), for other databases it may break MDL-8164 ("MS SQL cannot return Boolean data type in query results, any code using this returns no results when using Sql 2005").
- duplicates
-
MDL-29529 Error reading from database - Unknown column 'status' in 'order clause'
- Closed
- has a non-specific relationship to
-
MDL-29851 assignment submissions.php throws db error when using visible groups mode
- Closed
- is a regression caused by
-
MDL-27638 Assignment Module Submissions SQL overflow
- Closed