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

Drag and drop upload breaks if multiple filemanager/filepicker elements present

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide

      I'm not sure if there is a standard form with multiple filemanager elements in it, so the first thing to do is to open up 'mod/forum/post_form.php', duplicate the line '$mform->addElement('filemanager' ... =>FILE_INTERNAL));' and change the name from 'attachments' => 'attachments2'.
      If you try to post a message to a forum it should now have 2 filemanager elements.
      Drag and drop a file onto each of the filemanager elements in turn.
      They should both accept a file and upload it correctly
      (Note: only the top filemanager contents will appear in the post when the form is submitted, as the forum code is not written to handle the file uploaded via 'attachments2')

      Show
      I'm not sure if there is a standard form with multiple filemanager elements in it, so the first thing to do is to open up 'mod/forum/post_form.php', duplicate the line '$mform->addElement('filemanager' ... =>FILE_INTERNAL));' and change the name from 'attachments' => 'attachments2'. If you try to post a message to a forum it should now have 2 filemanager elements. Drag and drop a file onto each of the filemanager elements in turn. They should both accept a file and upload it correctly (Note: only the top filemanager contents will appear in the post when the form is submitted, as the forum code is not written to handle the file uploaded via 'attachments2')
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31321_dndupload_multiple_elements

      Description

      Find a page with multiple filemanager or filepicker elements on a page (I adjusted the code of the forum post form to get this - I can't think of a standard Moodle page that has this, at the moment).

      Try to drag & drop some files onto the first file element on the page - they will be uploaded to the 2nd element instead.

        Attachments

          Activity

            People

            Assignee:
            davosmith Davo Smith
            Reporter:
            davosmith Davo Smith
            Peer reviewer:
            Dan Poltawski
            Integrator:
            Aparup Banerjee
            Tester:
            Gerard Caulfield
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Jun/12