Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33048

Quiz with a close time causes a Fatal Error on MyMoodle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Dashboard (My home), Quiz
    • Labels:
      None
    • Environment:
      Apache2, php5, mysql5.5
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      You need a course with quizzes with closing time set but with the closing time not passed, and you need a student user enrolled in that course who has attempted some quizzes.

      Logged in as that student, go to the My Moodle page.

      Show
      You need a course with quizzes with closing time set but with the closing time not passed, and you need a student user enrolled in that course who has attempted some quizzes. Logged in as that student, go to the My Moodle page.
    • Workaround:
      Hide

      Disable the quiz close time, or hide the quiz from view

      Show
      Disable the quiz close time, or hide the quiz from view
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      An open quiz with a closing time set causes the following debug error on an enrolled student's MyMoodle page:

      Fatal error: Class 'quiz_attempt' not found in /var/www/moodle/mod/quiz/lib.php on line 496

      This prevents the page from rendering any blocks, so the student is unable to navigate, and can only log out.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            I was able to reproduce this in master.

            Show
            salvetore Michael de Raadt added a comment - I was able to reproduce this in master.
            Hide
            chadberg Chad Bergeron added a comment - - edited

            Adding the link to locallib also requires pulling in global $CFG on line 486

            But with that variable scoped in, the issue is resolved in my testing.

            Show
            chadberg Chad Bergeron added a comment - - edited Adding the link to locallib also requires pulling in global $CFG on line 486 But with that variable scoped in, the issue is resolved in my testing.
            Hide
            timhunt Tim Hunt added a comment -

            Doh! sorry. Tim === idiot. Commit amended.

            Show
            timhunt Tim Hunt added a comment - Doh! sorry. Tim === idiot. Commit amended.
            Hide
            poltawski Dan Poltawski added a comment -

            I've integrated this now

            Show
            poltawski Dan Poltawski added a comment - I've integrated this now
            Hide
            poltawski Dan Poltawski added a comment -

            And tested during the integration.

            (Note: I had to look at the code to work out what the quiz setup needed to be to reproduce the error before testing )

            Show
            poltawski Dan Poltawski added a comment - And tested during the integration. (Note: I had to look at the code to work out what the quiz setup needed to be to reproduce the error before testing )
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            U P S T R E A M I Z E D !

            Many thanks for the hard work, closing this as fixed.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Many thanks for the hard work, closing this as fixed. Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12