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

accessbileChange event firing twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.9.2
    • Accessibility, Assignment
    • None
    • MOODLE_39_STABLE

      Must use Boost theme.

      Open an assignment with submissions.

      Click View Submissions.

      On the top of the page, Click the drop down box labeled: "Grading actions"

      Click "Download all submissions"

       

      The download box will show twice.

       

      I traced it down to the accessibleChange custom event found here (lib\templates\url_select.mustache)

       

      {{#js}}
              require(['jquery', 'core/custom_interaction_events'], function($, CustomEvents) {
                  CustomEvents.define('#{{id}}', [CustomEvents.events.accessibleChange]);
                  $('#{{id}}').on(CustomEvents.events.accessibleChange, function() {
                      if (!$(this).val()) {
                          return false;
                      }
                      $('#{{formid}}').submit();
                  });
              });
          {{/js}}
      

      if I add $('#id').unbind("click"); before the .on() it fires only once, However, this is not a complete fix.  It requires a click outside the select box to fire.

            Unassigned Unassigned
            syxton Matthew Davidson
            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.