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

Fatal error: Call to a member function on a non-object in questiontype.php during quiz attempts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.7
    • Fix Version/s: 1.6.4, 1.7.1, 1.8
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      Apache 1.3.36 (Unix) - Perl 5.8.0 - mysql 4.1.21-standard - php 4.4.2 - Fire Fox 1.5.0.8
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

      Description

      Fatal error: Call to a member function on a non-object in /home/myservername/public_html/moodle/question/type/random/questiontype.php on line 242 occurs when a quiz including random questions is in Adaptive mode and then ONLY when at least one question has been submitted individually before the Submit All and Finish Button has been pressed.

      The quiz works fine as long as none of the questions are submitted individually. The error always occurs upon attempting to go to the next question after any of them has been submitted indivdiually. This prevents using the quiz module in adaptive mode as a review for a test!

      Settings that cause problem...
      Questions per page: 1
      Shuffle questions: Yes
      Shuffle within quesitons: Yes
      Attempts allowed: Unlimited attempts
      Each attempt builds on the last: No
      Grading method: Highest grade
      Adaptive mode: yes
      Apply penalties: yes
      Decimal digits: 2
      Students may view: Immediately after attempt: Responses, Scores, Feedback General Feedback
      Time delay: None
      Show quiz in secure window: No
      No Groups

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              cgkel Carl Keller
              Tester:
              Nobody
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/Jan/07