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

Survey response submitted event is fired twice for each survey submitted

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.1
    • 3.0.5, 3.1.1
    • Survey
    • MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-54935_m32v1
    • Easy
    • 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

    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

              sbourget Stephen Bourget
              sbourget Stephen Bourget
              Ryan Wyllie Ryan Wyllie
              Andrew Lyons Andrew Lyons
              Simey Lameze Simey Lameze
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Jul/16