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

Form double-submission protection does not work well with slow file uploads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.8
    • Antivirus, Forms Library
    • MOODLE_38_STABLE

      This is an unwanted side-effect of MDL-38555. Steps to reproduce:

      1. Go to an upload form (e.g. https://qa.moodledemo.net/question/import.php?courseid=2 logged in as teacher).
      2. Drag a large file into the file manager, and quickly click the "Import" button.
      3. The "This page is asking you to confirm that you want to leave - data you have entered may not be saved." pop-up appears.
      4. Click "Stay on page".
      5. Wait for file upload to complete.

      Expected result: you can now submit the form.

      Acutal result: the "Import button is disabled".

      As a developer, another way to reproduce this is to put a sleep(10) in lib/antivirus/clamav/classes/scanner.php. Saves constandly uploading large files.

            Unassigned Unassigned
            timhunt Tim Hunt
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

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