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

Error related to versionning in quiz when a question depends on a previous one

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.3
    • 4.3
    • Quiz
    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-79507_master
    • Hide

      Covered by behat tests in attempt_require_previous.feature

      Manual testing steps (copied from MDLQA-18172):

      1) As a teacher, create a quiz, setting up the behaviour to Immediate or Interactive.
      2) Add at least three questions.
      3) Preview the quiz and check you can move through all questions without needing to answer them.
      4) Click "Questions" to go to the quiz editing page and verify you see lock icons to the right of each question
      5) Click the lock icon next to Q2. Verify the icon changes appearance.
      6) Preview the quiz and verify you can move from Q1 to Q3 but you cannot access Q2.
      BEFORE FIX: Attempting to view Q2 would throw an exception.

      Show
      Covered by behat tests in attempt_require_previous.feature Manual testing steps (copied from MDLQA-18172 ): 1) As a teacher, create a quiz, setting up the behaviour to Immediate or Interactive. 2) Add at least three questions. 3) Preview the quiz and check you can move through all questions without needing to answer them. 4) Click "Questions" to go to the quiz editing page and verify you see lock icons to the right of each question 5) Click the lock icon next to Q2. Verify the icon changes appearance. 6) Preview the quiz and verify you can move from Q1 to Q3 but you cannot access Q2. BEFORE FIX: Attempting to view Q2 would throw an exception.

      Discovered by michelle@mylearningspace.com.au while testing MDLQA-18172.

      Following the testing instructions it fails on step 6 and the following exception is displayed:

      Exception - Cannot assign null to property core_question\output\question_version_info::$version of type int
       
      More information about this error
      Debug info:
      Error code: generalexceptionmessage
      Stack trace:
       
          line 62 of /question/classes/output/question_version_info.php: TypeError thrown
          line 150 of /question/engine/renderer.php: call to core_question\output\question_version_info->__construct()
          line 102 of /question/engine/renderer.php: call to core_question_renderer->info()
          line 113 of /question/behaviour/behaviourbase.php: call to core_question_renderer->question()
          line 912 of /question/engine/questionattempt.php: call to question_behaviour->render()
          line 1299 of /mod/quiz/classes/quiz_attempt.php: call to question_attempt->render()
          line 551 of /mod/quiz/classes/output/renderer.php: call to mod_quiz\quiz_attempt->render_question()
          line 488 of /mod/quiz/classes/output/renderer.php: call to mod_quiz\output\renderer->attempt_form()
          line 144 of /mod/quiz/attempt.php: call to mod_quiz\output\renderer->attempt_page()
      

        1. step7.png
          step7.png
          362 kB
        2. MDL-79507.png
          MDL-79507.png
          565 kB

            marxjohnson Mark Johnson
            lameze Simey Lameze
            Mihail Geshoski Mihail Geshoski
            Tim Hunt Tim Hunt
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 44 minutes
                1h 44m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.