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

Feedback multiple concurrent submissions causes error

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.9.11, 4.0
    • Feedback
    • MOODLE_39_STABLE, MOODLE_400_STABLE
    • MDL-72956-404
    • MDL-72956-405
    • Hide

      Setup

      1. Log in as admin
      2. Create user
      3. Create course
      4. Enrol user as student on course
      5. Navigate to course
      6. Add a Feedback activity
      7. Edit feedback questions, add following:
        • Q1. Short text answer
        • Page break
        • Q2. Short text answer
      8. Navigate back to course
      9. Add another Feedback activity
      10. Edit second feedback questions, add following:
        • Q3. Short answer text
        • Page break
        • Q4. Short answer text

      Test

      1. Open two browser tabs
      2. In the first tab open Feedback activity 1 and press Answer the questions
      3. In the second tab open Feedback activity 2 and press Answer the questions
      4. In the first tab, answer Q1 and press Next page
      5. In the second tab, answer Q3 and press Next page
      6. In the first tab, answer Q2 and press Submit your answers
      7. In the second tab, answer Q4 and press Submit your answers
      8. Confirm you were able to submit both sets of answers
      9. Log out
      10. Log in as admin
      11. Navigate to Feedback activity 1
      12. Press Responses
      13. Press Response number: 1
      14. Confirm you see the previously entered response for Q1 & Q2
      15. Navigate to Feedback activity 2
      16. Press Responses
      17. Press Response number: 1
      18. Confirm you see the previously entered response for Q3 & Q4
      Show
      Setup Log in as admin Create user Create course Enrol user as student on course Navigate to course Add a Feedback activity Edit feedback questions, add following: Q1. Short text answer Page break Q2. Short text answer Navigate back to course Add another Feedback activity Edit second feedback questions, add following: Q3. Short answer text Page break Q4. Short answer text Test Open two browser tabs In the first tab open Feedback activity 1 and press Answer the questions In the second tab open Feedback activity 2 and press Answer the questions In the first tab, answer Q1 and press Next page In the second tab, answer Q3 and press Next page In the first tab, answer Q2 and press Submit your answers In the second tab, answer Q4 and press Submit your answers Confirm you were able to submit both sets of answers Log out Log in as admin Navigate to Feedback activity 1 Press Responses Press Response number: 1 Confirm you see the previously entered response for Q1 & Q2 Navigate to Feedback activity 2 Press Responses Press Response number: 1 Confirm you see the previously entered response for Q3 & Q4
    • Hide

      Code verified against automated checks.

      Checked MDL-72956 using repository: https://github.com/paulholden/moodle/

      More information about this report

      Built on: Wed Jan 15 11:04:51 AM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-72956 using repository: https://github.com/paulholden/moodle/ MOODLE_404_STABLE (0 errors / 0 warnings) [branch: MDL-72956-404 | CI Job ] MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-72956-405 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-72956 | CI Job ] More information about this report Built on: Wed Jan 15 11:04:51 AM UTC 2025

      If you start two survey submissions at the same time, the second one you submit will cause an error.

      To replicate

      As teacher
      Create Feedback A
      Add any question type
      Create Feedback B
      Add any question type

      As student
      In one tab, open Feedback A - make a selection BUT DO NOT SUBMIT
      In another tab, open survey B - make a selection BUT DO NOT SUBMIT
      Go back to the first tab and submit Feedback A
      Go to the second tab and submit Feedback B

      Expectation:
      Both feedback submit without issues

      Actual:
      Feedback A submits but Feedback B shows an error message

      TECHNICAL REASON FOR THIS BUG:
      The reason for this bug is because of this session variable:

      $SESSION->feedback->is_started

      The variable tracks the status of feedback indiscriminately - i.e. it applies to ALL feedback interactions when it should only apply to an individual feedback interaction.

      To fix it I'd go with something like this:

      $SESSION->feedback->is_started[$cmid]

            pholden Paul Holden
            brudinie guy thomas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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