Moodle
  1. Moodle
  2. MDL-31643

If the user drags and drops more files than the forum allows to be attached to a discussion some of them are accepted while others are rejected

    Details

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

      Description

      Go into a forum and go to the screen used to create a new discussion.

      If the user drags in more files than than the maximum number of attachments (max attachments is in the forum settings) a random subset of files get attached. If I am a teacher and I have 2 documents (say, the exam location announcement and the practice exam) to distribute to my students but I'm only allowed 1 attachment its unlikely that I'll say "ah well, that'll have to do" when only 1 of those documents attach while the other vanishes. We're just forcing the user to then delete any files that did upload before starting over ie putting those files into a zip then uploading that or similar.

      We should either accept all of the files, or if we can't, then display an error and reject the whole lot.

        Issue Links

          Activity

          Hide
          Davo Smith added a comment -

          Agreed - I'll work on this

          Show
          Davo Smith added a comment - Agreed - I'll work on this
          Hide
          Michael de Raadt added a comment -

          Hi, Davo.

          I've just triaged this issue, but please continue working on it.

          Show
          Michael de Raadt added a comment - Hi, Davo. I've just triaged this issue, but please continue working on it.
          Hide
          Davo Smith added a comment -

          Small change to the code to reject an entire group of files if this would cause the total count to exceed the specified limit for the filemanager.

          A filepicker element will continue to work as before - uploading the first file in the group - as it is easy to drag and drop another file instead (it will replace the original, without having to stop and delete the file). A pop-up message would, that the user has to 'OK' would be more of an inconvenience in this case.

          Show
          Davo Smith added a comment - Small change to the code to reject an entire group of files if this would cause the total count to exceed the specified limit for the filemanager. A filepicker element will continue to work as before - uploading the first file in the group - as it is easy to drag and drop another file instead (it will replace the original, without having to stop and delete the file). A pop-up message would, that the user has to 'OK' would be more of an inconvenience in this case.
          Hide
          Dan Poltawski added a comment -

          Makes sense +1

          I'm a parenthesis lover so i'd add an extra one to make the two statements clearer but thats just my personal preference

          Show
          Dan Poltawski added a comment - Makes sense +1 I'm a parenthesis lover so i'd add an extra one to make the two statements clearer but thats just my personal preference
          Hide
          Davo Smith added a comment -

          @Dan - I've added 2 more sets of brackets (just to make it a bit clearer), if all is OK, could you put it forward for integration review?

          Show
          Davo Smith added a comment - @Dan - I've added 2 more sets of brackets (just to make it a bit clearer), if all is OK, could you put it forward for integration review?
          Hide
          Dan Poltawski added a comment -

          Heh, you put more than i'd have added too

          Show
          Dan Poltawski added a comment - Heh, you put more than i'd have added too
          Hide
          Davo Smith added a comment -

          Better safe than sorry... Thanks

          Show
          Davo Smith added a comment - Better safe than sorry... Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Davo Smith added a comment -

          Rebase done (without conflicts)

          Show
          Davo Smith added a comment - Rebase done (without conflicts)
          Hide
          Sam Hemelryk added a comment -

          Thanks Davo, this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Davo, this has been integrated now
          Hide
          Ankit Agarwal added a comment -

          This is working great!
          Passing
          Thanks

          Show
          Ankit Agarwal added a comment - This is working great! Passing Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!).

          icao_reverse('arreis olik rebemevon afla letoh ognat');
          

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!). icao_reverse('arreis olik rebemevon afla letoh ognat'); Closing, ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: