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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              timhunt Tim Hunt
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: