Moodle
  1. Moodle
  2. MDL-26734

Problems showing results for a quiz preview

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Quiz
    • Labels:
    • Environment:
      Moodle 2.0.2+ (20110303)
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Create a new quiz.
      Preview quiz and submit all and finish, i get this error:
      PHP Fatal error: Call to undefined method quiz_attempt::get_attempt_state() in /data/web/moodle/mod/quiz/review.php on line 43

      but i can preview other other quiz that was created before update from Moodle 1.9

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Tim Hunt added a comment -

            Thanks. I'll try to look into this tomorrow.

            Show
            Tim Hunt added a comment - Thanks. I'll try to look into this tomorrow.
            Hide
            Christian Gutierrez added a comment -

            Thanks a lot Tim, did you can reproduce this error?.

            Show
            Christian Gutierrez added a comment - Thanks a lot Tim, did you can reproduce this error?.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Note: seems it was introduced by 79c6e3a0 (MDL-25122 - PULL-331). Sister PULL-330 for 19_STABLE doesn't seem to exhibit the problem.

            Show
            Eloy Lafuente (stronk7) added a comment - Note: seems it was introduced by 79c6e3a0 (MDL-25122 - PULL-331). Sister PULL-330 for 19_STABLE doesn't seem to exhibit the problem.
            Hide
            Tim Hunt added a comment -

            Very sorry for this regression. It was a stupid mistake by me.

            To trigger this error, you must Review options, Responses turned off in the quiz settings. Then when you try to review your own attempt (mostly you will not get a review link, but you get there immediately after submitting an attempt) you should get redirected back to the view page with an appropriate message.

            If you need a fix for this, and don't want to wait for the next weekly build, the required change to the code is very simple, and you could probably apply this fix manually.

            https://github.com/timhunt/moodle/compare/master...MDL-26734

            Show
            Tim Hunt added a comment - Very sorry for this regression. It was a stupid mistake by me. To trigger this error, you must Review options, Responses turned off in the quiz settings. Then when you try to review your own attempt (mostly you will not get a review link, but you get there immediately after submitting an attempt) you should get redirected back to the view page with an appropriate message. If you need a fix for this, and don't want to wait for the next weekly build, the required change to the code is very simple, and you could probably apply this fix manually. https://github.com/timhunt/moodle/compare/master...MDL-26734
            Hide
            Christian Gutierrez added a comment -

            Hi Tim.

            I have applied the changes to code. Now, when i review the same quiz, i get the following trace in one of the questions: (see http://pastebin.com/hfkP2XZh)

            In the php log i get: (see http://pastebin.com/5t54uJ8v)

            I also applied the patch from http://tracker.moodle.org/browse/MDL-26430 but it doesn't work for me.

            Show
            Christian Gutierrez added a comment - Hi Tim. I have applied the changes to code. Now, when i review the same quiz, i get the following trace in one of the questions: (see http://pastebin.com/hfkP2XZh ) In the php log i get: (see http://pastebin.com/5t54uJ8v ) I also applied the patch from http://tracker.moodle.org/browse/MDL-26430 but it doesn't work for me.
            Hide
            Christian Gutierrez added a comment -

            I'm having problems with random multichoice questions, is this a new issue?. Stack trace is showed in pastebin.

            Show
            Christian Gutierrez added a comment - I'm having problems with random multichoice questions, is this a new issue?. Stack trace is showed in pastebin.
            Hide
            Tim Hunt added a comment -

            It think the problem you are having is to do with the TeX filter. Something in this particular question must be triggering it, but it is not a quiz bug.

            Look at all the content in this question, and if it does not make sense, paste in the Mathematics tools forum http://moodle.org/mod/forum/view.php?id=752.

            Show
            Tim Hunt added a comment - It think the problem you are having is to do with the TeX filter. Something in this particular question must be triggering it, but it is not a quiz bug. Look at all the content in this question, and if it does not make sense, paste in the Mathematics tools forum http://moodle.org/mod/forum/view.php?id=752 .
            Hide
            Helen Foster added a comment -

            Thanks to Tim for fixing this issue. The fix is available in the latest 2.0.2+.

            Show
            Helen Foster added a comment - Thanks to Tim for fixing this issue. The fix is available in the latest 2.0.2+.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: