Moodle

Quiz overview report won't display if there are more than 29 questions

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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.

Activity

Hide
Ann Adamcik added a comment -

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.

Show
Ann Adamcik added a comment - 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.
Hide
Jamie Pratt added a comment -

Darn, thanks for the bug report Ann. Will fix this as soon as testing Tuesday (http://docs.moodle.org/en/Development:Weekly_Code_Review) is over.

Show
Jamie Pratt added a comment - Darn, thanks for the bug report Ann. Will fix this as soon as testing Tuesday (http://docs.moodle.org/en/Development:Weekly_Code_Review) is over.
Hide
Jamie Pratt added a comment -

Fixed this in 1.9 and HEAD. Still using JOINS for sorting but table only sorts on a maximum of two columns. Now we have a (single) seperate query for getting the question grades.

Show
Jamie Pratt added a comment - Fixed this in 1.9 and HEAD. Still using JOINS for sorting but table only sorts on a maximum of two columns. Now we have a (single) seperate query for getting the question grades.
Hide
Tami Hochgesang added a comment -

We are new to using Moodle so I am not familiar with how this all works. We are seeing this issue. How do I get the fix. We have this version of Moodle: 1.9.1+ Build (20080604).

Show
Tami Hochgesang added a comment - We are new to using Moodle so I am not familiar with how this all works. We are seeing this issue. How do I get the fix. We have this version of Moodle: 1.9.1+ Build (20080604).
Hide
Michael Spall added a comment -
Show
Michael Spall added a comment - Upgrade to the latest 1.9 stable weekly build: MOODLE_19_WEEKLY See: http://docs.moodle.org/en/Upgrading_Moodle http://docs.moodle.org/en/CVS_for_Administrators http://download.moodle.org/
Hide
Jamie Pratt added a comment - - edited

I would recommend using the stable weekly release too. The fix for this is in Moodle 1.9.2 though if you choose to download that.

Show
Jamie Pratt added a comment - - edited I would recommend using the stable weekly release too. The fix for this is in Moodle 1.9.2 though if you choose to download that.

People

Vote (2)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: