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

response_submitted event can be triggered even when the survey is already submitted

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.8, 2.9.2
    • 2.8.9, 2.9.3
    • Survey
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • Hide
      1. Create a new survey (the type doesn't mind)
      2. Using a student user submit the survey
      3. Just once you see the "Thanks for answering this survey,"message reload the page again (F5 or Cmd+R to submit the form again)
      4. You should see an error ('You have already submitted this survey')
      5. Go to the Activity logs and check that the "Survey response submitted" event does not appear two times in the log
      Show
      Create a new survey (the type doesn't mind) Using a student user submit the survey Just once you see the "Thanks for answering this survey,"message reload the page again (F5 or Cmd+R to submit the form again) You should see an error ('You have already submitted this survey') Go to the Activity logs and check that the "Survey response submitted" event does not appear two times in the log

    Description

      This was discovering while developing: MDL-51629

      The event triggering must be moved to the end of the code (before printing the thanks message)

      Attachments

        Issue Links

          Activity

            People

              jleyva Juan Leyva
              jleyva Juan Leyva
              Simey Lameze Simey Lameze
              Dan Poltawski Dan Poltawski
              Adrian Greeve Adrian Greeve
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/15