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

Implement drag and drop option for sections and activities in the course index

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Manual testing:

      1. Login as admin and create a topic format course with some activities and sections.
      2. Access the course with edition disabled
      3. Display the course index and wait for the content to be loaded (you probably need to close the standard drawer before)
      4. Check the course index sections and activities are not draggable.
      5. Enable edition.
      6. Check that section general (default name "General") has no drag icon displayed when the mouse is over it.
      7. Drag a section
        1. Check that while you drag over other course index element some black lines appears as placeholders.
        2. Drop the section into another location and wait for the action to be performed
          1. Check the section in the course index moves to the new location
          2. Check the course content also changes
      8. Drag and activity from the course index
        1. Check that while you drag over other course index element some black lines appears as placeholders.
        2. Check that when you drag the element over a section name in the course index a black dotted box appears around the section name
        3. Drop the activity in a different course position in the course index
          1. Check the section in the course index moves to the new location
          2. Check the course content also changes
      Show
      Manual testing: Login as admin and create a topic format course with some activities and sections. Access the course with edition disabled Display the course index and wait for the content to be loaded (you probably need to close the standard drawer before) Check the course index sections and activities are not draggable. Enable edition. Check that section general (default name "General") has no drag icon displayed when the mouse is over it. Drag a section Check that while you drag over other course index element some black lines appears as placeholders. Drop the section into another location and wait for the action to be performed Check the section in the course index moves to the new location Check the course content also changes Drag and activity from the course index Check that while you drag over other course index element some black lines appears as placeholders. Check that when you drag the element over a section name in the course index a black dotted box appears around the section name Drop the activity in a different course position in the course index Check the section in the course index moves to the new location Check the course content also changes
    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
      MDL-71228-master-v02
    • Sprint:
      Moppies Kanban, Moppies Kanban, Moppies Kanban

      Description

      As a teacher
      I want to be able to move an existing activity or section to another position in the same course
      so I can order course content

       

      Designs:

      https://www.figma.com/file/OfCvqK069Oz6Fvqq2xcZWI/Create-a-course?node-id=5279%3A0

      ☝️ Note that the CI header is sticky (would be same with blocks header) as per the screenshot 

       

      Also added a desktop screenshot for the in-situ view of the CI.

       

       

      Acceptance criteria:

      1. When dragging an activity or section it will only be droppable in the course index, not in the course main area. 
      2. The visibility of an activity could change when moving to a different section based on the visibility of the source and destination sections.
        1. Moving from visible to hidden section: 'Show on course page' -> 'Available but not shown on course page'
        2. Moving form hidden to visible section: 'Available but not shown on course page' -> 'Show on course page'.
      3. As per current behavior, no notification will be shown once the action has been completed.

       

      Technical tasks:

      • New drag and drop component
      • Add drag and drop to the course index

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              amaia Amaia Anabitarte
              Peer reviewer:
              Ilya Tregubov Ilya Tregubov
              Integrator:
              Jun Pataleta Jun Pataleta
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Huong Nguyen, Barbara Ramiro, Bas Brands, Mathew May
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Dec/21

                  Time Tracking

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