Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9.1
-
Fix Version/s: None
-
Component/s: Quiz
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
To reproduce:
1. Create a quiz with 30 or more questions.
2. Go to the Results/Overview report tab and select "All students". Leave the "Show / download marks for each question" preference set to "yes".
Expected: All the students should be listed. If there are attempts, selecting "Students with attempts" should display the attempts.
Result: The page reports "Nothing to Display", and no students/attempts are listed.
If you create a quiz with 29 questions or less, the report is displayed.
If you set "Show / download marks for each question" to "no", the results are displayed.
Investigating further, the code in mod/quiz/report/overview/report.php (line 346 in report.php,v 1.98.2.30) adds 2 table joins for each question if detailed marks is set. If there are more than 29 questions, the resulting query fails.
I printed out the query and ran it manually, and I get the following message:
ERROR 1116 (HY000): Too many tables; MySQL can only use 61 tables in a join
It looks like this is a limit in current versions of mysql (see http://dev.mysql.com/doc/refman/5.1/en/joins-limits.html). The query was rewritten for
MDL-14852.MDL-14852.