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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.6.5, 4.4.5, 4.5, 5.0
    • Questions
    • MOODLE_36_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE, MOODLE_500_STABLE
    • MDL-66095-404
    • MDL-66095-405
    •  MDL-66095-main
    • 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.
    • Hide

      Code verified against automated checks.

      Checked MDL-66095 using repository: https://github.com/StudiUM/moodle

      More information about this report

      Built on: Mon Apr 7 21:38:32 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-66095 using repository: https://github.com/StudiUM/moodle MOODLE_404_STABLE (0 errors / 0 warnings) [branch: MDL-66095-404 | CI Job ] MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-66095-405 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-66095-main | CI Job ] More information about this report Built on: Mon Apr 7 21:38:32 UTC 2025

      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.

            binhdv83 Van Binh Dang
            dvdcastro David Castro
            Kevin Percy Kevin Percy
            Votes:
            15 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 36 minutes
                4h 36m

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