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

Survey response submitted event is fired twice for each survey submitted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.0.5, 3.1.1
    • Component/s: Survey
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a new survey
      2. Complete / submit the survey activity
      3. Verify that there is a single log entry for submitting the survey (Survey response submitted)
      4. Run behat for mod_survey

      Show
      1. Create a new survey 2. Complete / submit the survey activity 3. Verify that there is a single log entry for submitting the survey (Survey response submitted) 4. Run behat for mod_survey
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54935_m32v1

      Description

      The response_submitted event is called twice when submitting a survey.
      The first time is part of the survey_save_answers() function on line 69 of save.php
      https://github.com/moodle/moodle/blob/master/mod/survey/save.php#L69
      Which triggers the event here:
      https://github.com/moodle/moodle/blob/master/mod/survey/lib.php#L1016

      The second time is 7 lines later in save.php (The next 7 lines are setting up the event trigger)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sbourget Stephen Bourget
                Reporter:
                sbourget Stephen Bourget
                Peer reviewer:
                Ryan Wyllie
                Integrator:
                Andrew Nicols
                Tester:
                Simey Lameze
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Jul/16