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

Drag and drop should fire 'notifyFilterContentUpdated' event when adding element to the DOM

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.4, 3.2.1
    • Fix Version/s: 3.1.5, 3.2.2
    • Component/s: Course, JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      1. Make sure videojs player is enabled on your site
      2. Create a new label resource and add media to it via atto. Select an mp4 from your filesystem and confirm.
      3. Save the label and view the course home page.
      4. Confirm that you see the video and can play it.
      5. Now, drag and drop the same mp4 video from your filesystem into the course and select the first option when prompted. This will embed the file in a label.
      6. Confirm that:
        • The video is added
        • You can play the video and
        • The media player controls are the same as the first video (uses videojs)
      7. Refresh the page
      8. Confirm that both videos look the same and can be played.
      Show
      Make sure videojs player is enabled on your site Create a new label resource and add media to it via atto. Select an mp4 from your filesystem and confirm. Save the label and view the course home page. Confirm that you see the video and can play it. Now, drag and drop the same mp4 video from your filesystem into the course and select the first option when prompted. This will embed the file in a label. Confirm that : The video is added You can play the video and The media player controls are the same as the first video (uses videojs) Refresh the page Confirm that both videos look the same and can be played.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57480-master

      Description

      Noticed this missing when I was testing MDL-57187. Basically, if you enable the media player 'videojs' and then drag and drop an mp4 into the course and select the first option (add as a label, not a file), then the file is added, but the setup code for videojs is never called so the video is rendered in the browser default player. On page refresh this is resolved, and the videojs player is used, but it's not a nice thing to see when dropping a file in this way. Audio files are also affected by this.

      I think the solution is to fire the 'notifyFilterContentUpdated' event, as videojs already listens for this (see here)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jaked Jake Dallimore
                Reporter:
                jaked Jake Dallimore
                Peer reviewer:
                Mark Nelson
                Integrator:
                Dan Poltawski
                Tester:
                Ryan Wyllie
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Mar/17