Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Linux
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_15_STABLE

      Description

      Quiz Report Disappears after upgrade to 1.5.3 from instructor view in all courses. After clicking on Report tab, message says Nothing to display, even though under attemps it shows students have completed the quiz. Also old quiz reports are gone.

        Gliffy Diagrams

        1. bug10.html
          28 kB
          and73exa0
        2. bug11.html
          40 kB
          and73exa0
        3. bug12.html
          21 kB
          and73exa0
        4. bug4.html
          17 kB
          bok70amo0
        5. bug5.html
          17 kB
          bok70amo0
        6. bug6.html
          41 kB
          bok70amo0

          Activity

          Hide
          dougiamas Martin Dougiamas added a comment -

          From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 02:08 AM:

          The problem appear to be the changes done to solve MDL-4303

          From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 03:04 AM:

          The problem is in the reference to the guestemail field in queries : there is no such field in the quiz attempts table

          From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 03:19 AM:

          Suppressing guestmail stuff resolve the problem

          From (penny at catalyst.net.nz) Saturday, 19 November 2005, 05:05 AM:

          gah, I'm really sorry, this is my fault - we have a local field called guestemail and when I was fixing MDL-4303 it got into moodle.org code.

          I've just removed it and committed to stable and head. please upgrade to 1.5.3+ latest (you'll need to wait for the next build or for anonymous cvs to catch up)

          From Miki Lewinger (mikilewinger at gmail.com) Wednesday, 23 November 2005, 02:58 PM:

          Hi, it seems this has not been comitted to the stable/stable+ branches ?

          From (penny at catalyst.net.nz) Wednesday, 23 November 2005, 04:25 PM:

          yup, it definitely has:

          http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/mod/quiz/report/overview/report.php?r1=1.27.2.10&r2=1.27.2.11

          From (andreev.artem at gmail.com) Thursday, 22 December 2005, 08:56 PM:

          Today I download Latest Stable Branch and have mod/quiz/report/overview/report.php version 1.27.2.11, but it not work for me!

          At this moment i use mod/quiz/report/overview/report.php version 1.27.2.5 and it work...

          Moodle: 1.5.3+

          OS: Linux 2.6.13.4

          Webserver: Apache 1.3.33

          Database server: MySql 3.23.58

          PHP 4.4.1

          You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14' at line 1

          SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14

          You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14' at line 1

          SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14

          You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14 ORDER BY uniqueid LIMIT 0,10' at line 1

          SELECT CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ) AS uniqueid, qa.id AS attempt, u.id AS userid, u.firstname, u.lastname, u.picture, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14 ORDER BY uniqueid LIMIT 0,10

          Nothing to display

          From (penny at catalyst.net.nz) Friday, 23 December 2005, 04:00 AM:

          Hi,

          Can you please try the following query:

          SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u INNER JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14

          and let me know how that works?

          According to mysql 3.23 manual, we don't get a join condition just using JOIN, only using INNER JOIN, which is pretty braindead as JOIN implies INNER JOIN anyway.

          http://www.slac.stanford.edu/exp/glast/ground/software/extDoc/mysql/3.23.58/manual.html#JOIN

          From (andreev.artem at gmail.com) Friday, 23 December 2005, 09:54 PM:

          This query works...

          From Roger Moore (rwmoore1 at gmail.com) Tuesday, 31 January 2006, 04:15 AM:

          I've fixed this with my own hack. Edit the files:

          moodle/mod/quiz/report/overview/report.php

          moodle/mod/quiz/report/analysis/report.php

          and replace all occurances of simply JOIN with LEFT JOIN which is what was used in the earlier 1.5.2 version. Since I did that I've had no further problems.

          From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 7 February 2006, 04:28 AM:

          Hi Penny, what is the status of this bug?

          From (penny at catalyst.net.nz) Tuesday, 7 February 2006, 04:29 AM:

          ah! I need to change JOIN to INNER JOIN. Replacing with LEFT JOIN as suggested will change functionality...

          From (penny at catalyst.net.nz) Tuesday, 7 February 2006, 04:30 AM:

          (note that this will not need to be merged necessarily as bumped mysql requirements for 1.6 mean that it will work fine, therefore this only needs to be fixed in stable)

          From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 7 February 2006, 04:39 AM:

          I noticed something else that appears to have gone wrong during the merge. Take a look at http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/mod/quiz/report/overview/report.php?r1=1.38&r2=1.35

          which shows the net effect of your changes. The search for qa.uniqueid as attemptuniqueid. You will find it on the left hand side (the original) but not the right hand side. Was this intentional?

          From Gustav Delius (gwd2 at york.ac.uk) Monday, 20 March 2006, 04:15 AM:

          Penny, I am closing this because as far as I can remember you fixed all those things a long time ago. Thanks again.

          Show
          dougiamas Martin Dougiamas added a comment - From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 02:08 AM: The problem appear to be the changes done to solve MDL-4303 From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 03:04 AM: The problem is in the reference to the guestemail field in queries : there is no such field in the quiz attempts table From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Saturday, 19 November 2005, 03:19 AM: Suppressing guestmail stuff resolve the problem From (penny at catalyst.net.nz) Saturday, 19 November 2005, 05:05 AM: gah, I'm really sorry, this is my fault - we have a local field called guestemail and when I was fixing MDL-4303 it got into moodle.org code. I've just removed it and committed to stable and head. please upgrade to 1.5.3+ latest (you'll need to wait for the next build or for anonymous cvs to catch up) From Miki Lewinger (mikilewinger at gmail.com) Wednesday, 23 November 2005, 02:58 PM: Hi, it seems this has not been comitted to the stable/stable+ branches ? From (penny at catalyst.net.nz) Wednesday, 23 November 2005, 04:25 PM: yup, it definitely has: http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/mod/quiz/report/overview/report.php?r1=1.27.2.10&r2=1.27.2.11 From (andreev.artem at gmail.com) Thursday, 22 December 2005, 08:56 PM: Today I download Latest Stable Branch and have mod/quiz/report/overview/report.php version 1.27.2.11, but it not work for me! At this moment i use mod/quiz/report/overview/report.php version 1.27.2.5 and it work... Moodle: 1.5.3+ OS: Linux 2.6.13.4 Webserver: Apache 1.3.33 Database server: MySql 3.23.58 PHP 4.4.1 You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14' at line 1 SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14 You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14' at line 1 SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14 You have an error in your SQL syntax near 'ON u.id = qa.userid WHERE qa.quiz = 14 ORDER BY uniqueid LIMIT 0,10' at line 1 SELECT CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ) AS uniqueid, qa.id AS attempt, u.id AS userid, u.firstname, u.lastname, u.picture, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration FROM mdl_user u JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14 ORDER BY uniqueid LIMIT 0,10 Nothing to display From (penny at catalyst.net.nz) Friday, 23 December 2005, 04:00 AM: Hi, Can you please try the following query: SELECT COUNT(DISTINCT(CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ))) FROM mdl_user u INNER JOIN mdl_quiz_attempts qa ON u.id = qa.userid WHERE qa.quiz = 14 and let me know how that works? According to mysql 3.23 manual, we don't get a join condition just using JOIN, only using INNER JOIN, which is pretty braindead as JOIN implies INNER JOIN anyway. http://www.slac.stanford.edu/exp/glast/ground/software/extDoc/mysql/3.23.58/manual.html#JOIN From (andreev.artem at gmail.com) Friday, 23 December 2005, 09:54 PM: This query works... From Roger Moore (rwmoore1 at gmail.com) Tuesday, 31 January 2006, 04:15 AM: I've fixed this with my own hack. Edit the files: moodle/mod/quiz/report/overview/report.php moodle/mod/quiz/report/analysis/report.php and replace all occurances of simply JOIN with LEFT JOIN which is what was used in the earlier 1.5.2 version. Since I did that I've had no further problems. From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 7 February 2006, 04:28 AM: Hi Penny, what is the status of this bug? From (penny at catalyst.net.nz) Tuesday, 7 February 2006, 04:29 AM: ah! I need to change JOIN to INNER JOIN. Replacing with LEFT JOIN as suggested will change functionality... From (penny at catalyst.net.nz) Tuesday, 7 February 2006, 04:30 AM: (note that this will not need to be merged necessarily as bumped mysql requirements for 1.6 mean that it will work fine, therefore this only needs to be fixed in stable) From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 7 February 2006, 04:39 AM: I noticed something else that appears to have gone wrong during the merge. Take a look at http://cvs.sourceforge.net/viewcvs.py/moodle/moodle/mod/quiz/report/overview/report.php?r1=1.38&r2=1.35 which shows the net effect of your changes. The search for qa.uniqueid as attemptuniqueid. You will find it on the left hand side (the original) but not the right hand side. Was this intentional? From Gustav Delius (gwd2 at york.ac.uk) Monday, 20 March 2006, 04:15 AM: Penny, I am closing this because as far as I can remember you fixed all those things a long time ago. Thanks again.
          Hide
          and73exa0 and73exa0 added a comment -

          bugs

          Show
          and73exa0 and73exa0 added a comment - bugs
          Hide
          bok70amo0 bok70amo0 added a comment -

          bugs

          Show
          bok70amo0 bok70amo0 added a comment - bugs

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: