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

Filepicker: Lost the uploading file when user press Submit before upload process has done

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62712-master
    • Hide

      Form file picker test case

      1. Create an assignment in a course allowing file submissions
      2. Now, as a student in the course, go to the assignment page
      3. Open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item near the right side. Set this to '3G' or the like, preferable as slow as you can set it.
      4. Now, drag a 1MB image file (or thereabouts in size) from your local filesystem to the submission area. Don't use the file selector dialog. You should see a grey bar appear representing upload progress. We'll need this upload to take some time, so make sure the file is at least 1MB, but not much larger.
        Note: The next steps require an upload to be in-progress, so please make sure that you can see the gray bar before clicking any buttons/links, otherwise, the test will be invalid.
      5. Now, while the grey bar is still present (while the upload is being processed at 3G or slower speeds preferably), try to submit the form.
      6. Verify that your presented with a prompt asking you to confirm leaving the page. The text here varies between browsers, so don't worry too much about that aspect of the dialog.
      7. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading.
      8. Repeat the above test steps for the 'Cancel' action.
      9. Verify that your presented with an prompt asking you to confirm leaving the page.
      10. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading.
      11. Repeat the above test this time clicking a link in the nav drawer instead.
      12. Verify that your presented with an prompt asking you to confirm leaving the page.
      13. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading.
      14. Now, wait for the file upload to complete. You should see the file icon in the submission area and the grey bar will disappear.
      15. Now, click a link in the navdrawer.
      16. Verify that you're prompted to leave the page.
      17. Click 'stay on page'
      18. Now, click the "Submit" button and Verify you are not prompted and that the form submits without error.
      19. Edit your submission again and Verify you see the file present in the submission area.
      20. Remember to unset the network throttling!

      Course drag and drop test case

      1. As an admin, go to the course and make sure editing is enabled.
      2. As before, open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item. Set this to '3G' or something slow like that.
      3. Now, drag the same file you used before onto the course page and drop it when you see the 'Add files here' text appear. You should see a loading spinner and again a grey bar.
      4. Now, while the grey bar is still present, click a link in the nav drawer or another activity in the course.
      5. Verify that you are prompted to leave the page.
      6. Click 'stay on page' and wait for the upload to complete. Wait until you see the icon and the loading spinner disappears.
      7. Now, again, click a link in the nav or another activity name, and Verify you are redirected without any prompt.
      8. Remember to unset the network throttling!
      Show
      Form file picker test case Create an assignment in a course allowing file submissions Now, as a student in the course, go to the assignment page Open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item near the right side. Set this to '3G' or the like, preferable as slow as you can set it. Now, drag a 1MB image file (or thereabouts in size) from your local filesystem to the submission area. Don't use the file selector dialog. You should see a grey bar appear representing upload progress. We'll need this upload to take some time, so make sure the file is at least 1MB, but not much larger. Note: The next steps require an upload to be in-progress, so please make sure that you can see the gray bar before clicking any buttons/links, otherwise, the test will be invalid. Now, while the grey bar is still present (while the upload is being processed at 3G or slower speeds preferably), try to submit the form. Verify that your presented with a prompt asking you to confirm leaving the page. The text here varies between browsers, so don't worry too much about that aspect of the dialog. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading. Repeat the above test steps for the 'Cancel' action. Verify that your presented with an prompt asking you to confirm leaving the page. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading. Repeat the above test this time clicking a link in the nav drawer instead. Verify that your presented with an prompt asking you to confirm leaving the page. Click 'stay on page' or the like option, and Verify you remain on the page and that the file continues uploading. Now, wait for the file upload to complete. You should see the file icon in the submission area and the grey bar will disappear. Now, click a link in the navdrawer. Verify that you're prompted to leave the page. Click 'stay on page' Now, click the "Submit" button and Verify you are not prompted and that the form submits without error. Edit your submission again and Verify you see the file present in the submission area. Remember to unset the network throttling! Course drag and drop test case As an admin, go to the course and make sure editing is enabled. As before, open your browser's dev tools and in the network tab (chrome and firefox have this), you'll see a 'throttling' menu item. Set this to '3G' or something slow like that. Now, drag the same file you used before onto the course page and drop it when you see the 'Add files here' text appear. You should see a loading spinner and again a grey bar. Now, while the grey bar is still present, click a link in the nav drawer or another activity in the course. Verify that you are prompted to leave the page. Click 'stay on page' and wait for the upload to complete. Wait until you see the icon and the loading spinner disappears. Now, again, click a link in the nav or another activity name, and Verify you are redirected without any prompt. Remember to unset the network throttling!

      When user select multiple files to upload or with a large file. During the upload process, if user press Submit (Save & Display), Moodle save the current information on the form but lost the uploading files

      We need to notify for user to know about that, like the Editor, when user typing and the Editor not yet auto-save, it will notify to user when they navigate away

        1. 1.PNG
          1.PNG
          118 kB
        2. 2.PNG
          2.PNG
          57 kB
        3. image-2021-02-17-16-31-34-245.png
          image-2021-02-17-16-31-34-245.png
          76 kB
        4. upload_moodle_edge.mp4.mp4
          6.86 MB

            HuongNV Huong Nguyen
            HuongNV Huong Nguyen
            Adrian Greeve Adrian Greeve
            Jake Dallimore Jake Dallimore
            Janelle Barcega Janelle Barcega
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 47 minutes
                47m

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