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

The mod_choice\event\answer_submitted(updated) events are incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.8.8, 2.9
    • Choice
    • MOODLE_28_STABLE, MOODLE_29_STABLE

      1. The objecttable is wrong. We are submitting an answer, not a choice activity. This also makes the description incorrect as it states we made a choice with id '$this->objectid' which just refers to the 'choice' table. The trigger for these events should be triggered after we either insert to or update the 'choice_answers' table.
      2. The 'optionid' is being passed as an array, so we can't map it when restoring - even if just one answer is selected. The event is triggered each time a choice is answered, where it may be possible to select multiple options, so the value is converted to an array, which is then passed to the event. This should be passed as an int (which will be fixed when addressing 1) so we can actually map it on a restore, currently we cannot.

            Unassigned Unassigned
            markn Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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