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

Errors (including breaking quiz cron) if drag-drop onto image questions edited after being attempted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.6.5
    • Fix Version/s: 3.6.6, 3.7.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide
      1. As an instructor, Create a quiz which uses a qtype_ddimageortext question having at least 3 choices and has several more questions. Set the time limit of the quiz to between 3 to 5 minutes to get attempts expired quickly and also so you can do the next steps with enough time. Also set the new page setting to "every question" to ensure the attempt will have multiple pages.
      2. As a student, attempt the quiz solving the 3 choice qtype_ddimageortext question but not finishing the attempt, for example, if the other questions are in another page, just change the page, and close the window.
      3. As an instructor, modify the quiz question by removing 1 of the choices.
      4. Expected result: As a student, revisit the quiz attempt and revisit also the qtype_ddimageortext question, the deleted choice should be marked as [Deleted choice]
      5. Expected result: As a student, wait until the quiz expires (1 minute of wait should be enough). There should be no errors or warnings thrown when the quiz auto submits when the time expires.
      Show
      As an instructor, Create a quiz which uses a qtype_ddimageortext question having at least 3 choices and has several more questions. Set the time limit of the quiz to between 3 to 5 minutes to get attempts expired quickly and also so you can do the next steps with enough time. Also set the new page setting to "every question" to ensure the attempt will have multiple pages. As a student, attempt the quiz solving the 3 choice qtype_ddimageortext question but not finishing the attempt, for example, if the other questions are in another page, just change the page, and close the window. As an instructor, modify the quiz question by removing 1 of the choices. Expected result: As a student, revisit the quiz attempt and revisit also the qtype_ddimageortext question, the deleted choice should be marked as [Deleted choice] Expected result: As a student, wait until the quiz expires (1 minute of wait should be enough). There should be no errors or warnings thrown when the quiz auto submits when the time expires.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull from Repository:
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
       MDL-66095_37
    • Pull Master Branch:
       MDL-66095_master

      Description

      Hello,

      We are having the issues described here:

      https://moodle.org/mod/forum/discuss.php?d=361846

       
      Execute scheduled task: Legacy cron processing for plugins (core\task\legacy_plugin_cron_task)
      ... started 22:22:44. Current memory use 7.6MB.
      Running auth crons if required...
      Running cron for auth/mnet...
      Running enrol crons if required...
      Starting activity modules
      Processing module function quiz_cron ...
       
        Looking for quiz overdue quiz attempts...
      !!! Exception - Call to a member function summarise() on null !!!
      !!
      Error code: generalexceptionmessage !!
      !! Stack trace: * line 65 of /question/type/ddimageortext/questionbase.php: Error thrown
      * line 113 of /question/behaviour/deferredfeedback/behaviour.php: call to qtype_ddtoimage_question_base->summarise_response()
      * line 57 of /question/behaviour/deferredfeedback/behaviour.php: call to qbehaviour_deferredfeedback->process_finish()
      * line 1266 of /question/engine/questionattempt.php: call to qbehaviour_deferredfeedback->process_action()
      * line 1304 of /question/engine/questionattempt.php: call to question_attempt->process_action()
      * line 840 of /question/engine/questionusage.php: call to question_attempt->finish()
      * line 1952 of /mod/quiz/attemptlib.php: call to question_usage_by_activity->finish_all_questions()
      * line 1794 of /mod/quiz/attemptlib.php: call to quiz_attempt->process_finish()
      * line 88 of /mod/quiz/cronlib.php: call to quiz_attempt->handle_if_time_expired()
      * line 598 of /mod/quiz/lib.php: call to mod_quiz_overdue_attempt_updater->update_overdue_attempts()
      * line 93 of /lib/classes/task/legacy_plugin_cron_task.php: call to quiz_cron()
      * line 105 of /lib/cronlib.php: call to core\task\legacy_plugin_cron_task->execute()
      * line 67 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
      * line 61 of /admin/cli/cron.php: call to cron_run()
       !!
      

      Most likely due to instructors changing choices for this kind of question type after learners have already attempted.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dvdcastro David Castro
                Reporter:
                dvdcastro David Castro
                Peer reviewer:
                Tim Hunt
                Participants:
                Component watchers:
                Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                5 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Fix Release Date:
                  9/Sep/19