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

Course editor: migrate Drag and drop files into the course/course-index to the new editor

    XMLWordPrintable

Details

    • MOODLE_402_STABLE
    • MDL-76432-master-v02
    • Hide

      Tests prerequisites

      1. Download the attached files:
      2. Open your file browser with the download folder where you download the files
      3. Create a course in topic format with at least 2 topics.
      4. Set the "Administration -> Security -> Site security settings -> Maximum uploaded file size" setting (called "maxbytes") to 1MB.

      Admin test

      1. Log in as an admin and go to the course with edit mode on
      2. Select all files in the file browser and drag them into section 1
        1. Check a modal asking what to do with the first H5P file that appears
        2. Check the default selected option is "Create file resource"
        3. Select "Create an H5P activity" and submit
      3. A second modal appears for the second H5P file
        1. Check the default selected option is "Create an H5P activity"
        2. Submit the modal
      4. Check a process monitor appears a few seconds in the bottom right part of the page.
      5. Check there are 4 new activities in section 2: 3 resources and 1 H5P activity.

      Teacher test

      1. Log in as a teacher and go to the course with edit mode on
      2. Select all files in the file browser and drag them into section 1
        1. Check a modal asking what to do with the first H5P shows
        2. Check the default selected option is "Create file resource"
        3. Select "Create an H5P activity" and submit
      3. A second modal appears for the second H5P file
        1. Check the default selected option is "Create an H5P activity"
        2. Submit the modal
      4. Check a process monitor appears in the bottom right part of the page.
      5. Check there are 3 new activities in section 2: 2 resources and 1 H5P activity.
      6. After a10 seconds:
        1. Check the process monitor keeps open with only the error process displayed
        2. Check the process in the monitor displays a "The file is too large"
      7. Click the "X" icon (close) in the process with an error
        1. Check the monitor disappears.

       

      Show
      Tests prerequisites Download the attached files: Open your file browser with the download folder where you download the files Create a course in topic format with at least 2 topics. Set the "Administration -> Security -> Site security settings -> Maximum uploaded file size" setting (called "maxbytes") to 1MB. Admin test Log in as an admin and go to the course with edit mode on Select all files in the file browser and drag them into section 1 Check a modal asking what to do with the first H5P file that appears Check the default selected option is "Create file resource" Select "Create an H5P activity" and submit A second modal appears for the second H5P file Check the default selected option is "Create an H5P activity" Submit the modal Check a process monitor appears a few seconds in the bottom right part of the page. Check there are 4 new activities in section 2: 3 resources and 1 H5P activity. Teacher test Log in as a teacher and go to the course with edit mode on Select all files in the file browser and drag them into section 1 Check a modal asking what to do with the first H5P shows Check the default selected option is "Create file resource" Select "Create an H5P activity" and submit A second modal appears for the second H5P file Check the default selected option is "Create an H5P activity" Submit the modal Check a process monitor appears in the bottom right part of the page. Check there are 3 new activities in section 2: 2 resources and 1 H5P activity. After a10 seconds: Check the process monitor keeps open with only the error process displayed Check the process in the monitor displays a "The file is too large" Click the "X" icon (close) in the process with an error Check the monitor disappears.  
    • 5
    • HQ Sprint 1.3 Moppies

    Description

      Since Moodle 4.0 the course editor frontend part uses two main modules to handle the edition tools:

      • core_course/actions: responsible for handling all non-reactive tools and the legacy formats
      • core_courseformat/courseeditor: the new reactive library that updates the course index and the course content

      However, the file drag and drop is handled by the ancient course/dndupload.js which does not follow the current coding style and it is not even minimized.

      In this issue, a new drag and drop library will be implemented if the course format is compatible with components. The new library will be compatible part of the current reactive library so it can be reused in the future in other parts of the system.

      Another important part of the new drag and drop will be the implementation of a reactive upload monitor which will provide a visualization of the uploading process.

      There's a proof of concept of the code in this commit:

      https://github.com/ferranrecio/moodle/commit/28f1e80bd1617677e2ebd310e82b58aee1a9bf96

       

      Attachments

        1. first.h5p
          530 kB
        2. fourth.patata
          2.01 MB
        3. MDL-76487_018.png
          MDL-76487_018.png
          105 kB
        4. MDL-76487_019.png
          MDL-76487_019.png
          108 kB
        5. potato.jpg
          potato.jpg
          23 kB
        6. second.h5p
          721 kB
        7. third.txt
          0.0 kB

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              tusefomal Ferran Recio
              Carlos Escobedo Carlos Escobedo
              Jun Pataleta Jun Pataleta
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 4 days, 2 hours, 6 minutes
                  1w 4d 2h 6m