Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32476 Course page improvements for 2.3
  3. MDL-22504

Use HTML5 drag & drop file upload to add file resources

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.3
    • 2.0
    • JavaScript, Repositories
    • None
    • MOODLE_20_STABLE
    • MOODLE_23_STABLE
    • MDL-22504_drag_and_drop_upload_final
    • Hide

      This feature adds the ability to drag and drop files into a course while editing it and have then automatically added as activities.
      The following tests are loosely described:

      1. Log in as an admin
      2. Purge your caches (version bump for weekly release will remove the need for this)
      3. Enter a course and attempt to drag a file over a section. Make sure nothing happens.
      4. Turn on editing
      5. Try dragging again and this time make sure you see a notice at the top of the screen and a notice at the bottom of each section you drag over.
      6. Try dragging and dropping the following files over a section to make sure they work. Check the activity type that gets added makes sense:
        • .png image
        • .jpg image
        • .txt document
        • .pdf document
        • .csv file
        • .docx document
        • A file without an extension
        • A zip file (you should get an option about what to do, try both!)
        • An MBZ file
        • A url (highlight the URL in your browser and drag that over a section)
      7. Disable the upload repository and dragging a file, make sure nothing happens (because you can't upload)
      8. Re-enable the upload repository
      9. Disable the file, folder, page, and url activities
      10. Make sure you can't drag anything into the course to create an activity
      11. Renable all of them
      12. Repeat these in all supported browsers.

      Please note there are a couple of known issues, please see the linked issues.

      Show
      This feature adds the ability to drag and drop files into a course while editing it and have then automatically added as activities. The following tests are loosely described: Log in as an admin Purge your caches (version bump for weekly release will remove the need for this) Enter a course and attempt to drag a file over a section. Make sure nothing happens. Turn on editing Try dragging again and this time make sure you see a notice at the top of the screen and a notice at the bottom of each section you drag over. Try dragging and dropping the following files over a section to make sure they work. Check the activity type that gets added makes sense: .png image .jpg image .txt document .pdf document .csv file .docx document A file without an extension A zip file (you should get an option about what to do, try both!) An MBZ file A url (highlight the URL in your browser and drag that over a section) Disable the upload repository and dragging a file, make sure nothing happens (because you can't upload) Re-enable the upload repository Disable the file, folder, page, and url activities Make sure you can't drag anything into the course to create an activity Renable all of them Repeat these in all supported browsers. Please note there are a couple of known issues, please see the linked issues.

      Now that gmail has shown that it can be done (for recent versions of Firefox 3.6 / Chrome), it would be great if you could add files directly to a Moodle 2.0 course by dragging & dropping from the user's desktop, using some of the new features of HTML5.

      Even if it can't be done directly, would there be an API that could be left open to allow a 3rd-party plugin to add this functionality?

            davosmith Davo Smith
            davosmith Davo Smith
            Dan Poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            Frédéric Massart Frédéric Massart
            Votes:
            30 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved:

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