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

Coding error: $seq out of range while reviewing individual steps from question response history

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Quiz
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      1. Create a quiz in adaptive behaviour
      2. Attempt the quiz as a student, submitting several different answers as adaptive behaviour allows
      3. Finish the attempt
      4. Switch back to teacher role
      5. Go to the review attempt page
      6. In the history table under the question, click on step 1 to review the question in that state.

      Show
      1. Create a quiz in adaptive behaviour 2. Attempt the quiz as a student, submitting several different answers as adaptive behaviour allows 3. Finish the attempt 4. Switch back to teacher role 5. Go to the review attempt page 6. In the history table under the question, click on step 1 to review the question in that state.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Reviewing attempt steps fails with the following error:

      Coding error detected, it must be fixed by a programmer: $seq out of range

      Enabling PHP errors reveals the following details:

      Notice: Undefined variable: seq in /home/anttix/products/moodle/2.1+/question/engine/questionattempt.php on line 1204 Call Stack: 0.0001 623680 1.

      {main}

      () /home/anttix/products/moodle/2.1+/mod/quiz/reviewquestion.php:0 0.1193 6124912 2. mod_quiz_renderer->review_question_page() /home/anttix/products/moodle/2.1+/mod/quiz/reviewquestion.php:104 0.1659 8530520 3. quiz_attempt->render_question_at_step() /home/anttix/products/moodle/2.1+/mod/quiz/renderer.php:80 0.1660 8530600 4. question_usage_by_activity->render_question_at_step() /home/anttix/products/moodle/2.1+/mod/quiz/attemptlib.php:968 0.1660 8530600 5. question_attempt->render_at_step() /home/anttix/products/moodle/2.1+/question/engine/questionusage.php:375 0.1661 8533704 6. question_attempt->render() /home/anttix/products/moodle/2.1+/question/engine/questionattempt.php:732 0.1668 8546856 7. question_behaviour->render() /home/anttix/products/moodle/2.1+/question/engine/questionattempt.php:702 0.1674 8559760 8. core_question_renderer->question() /home/anttix/products/moodle/2.1+/question/behaviour/behaviourbase.php:127 0.2399 8650240 9. core_question_renderer->response_history() /home/anttix/products/moodle/2.1+/question/engine/renderer.php:92 0.2424 8665024 10. question_attempt_with_restricted_history->__construct() /home/anttix/products/moodle/2.1+/question/engine/renderer.php:387

      Coding error detected, it must be fixed by a programmer: $seq out of range

      More information about this error
      Stack trace:

      line 1204 of /question/engine/questionattempt.php: coding_exception thrown
      line 387 of /question/engine/renderer.php: call to question_attempt_with_restricted_history->__construct()
      line 92 of /question/engine/renderer.php: call to core_question_renderer->response_history()
      line 127 of /question/behaviour/behaviourbase.php: call to core_question_renderer->question()
      line 702 of /question/engine/questionattempt.php: call to question_behaviour->render()
      line 732 of /question/engine/questionattempt.php: call to question_attempt->render()
      line 375 of /question/engine/questionusage.php: call to question_attempt->render_at_step()
      line 968 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->render_question_at_step()
      line 80 of /mod/quiz/renderer.php: call to quiz_attempt->render_question_at_step()
      line 104 of /mod/quiz/reviewquestion.php: call to mod_quiz_renderer->review_question_page()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11