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

Survey response submitted event is fired twice for each survey submitted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.5, 3.1.1
    • 3.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

      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)

            sbourget Stephen Bourget
            sbourget Stephen Bourget
            Ryan Wyllie Ryan Wyllie
            Andrew Lyons Andrew Lyons
            Simey Lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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