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

Lock activities and sections when a course state mutation is ongoing

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.0
    • Component/s: Course
    • Testing Instructions:
      Hide

      1- Create a course with some activities and sections (more than 5 each if possible).

      2- Login as admin and go to the course

      3- Turn edit ON.

      4- Wait until the page is fully loaded. Then display the course index and uncollapse all sections (you probably need to close the drawer for it).

      5- Edit your config.php and add the following code:

      if (defined('AJAX_SCRIPT')) {
        sleep(10);
      }
      

      (Note this will make everything go slower if you navigate through the page)

      6- Drag one activity on another position (on the content or on the course index, it does not matter). While the action is executing do the following checks (if you don't have enough time to do the checking, simply repeat the action and continue with the next check):

      6.1 - Check the element get has a pulse animation (goes from darker to lighter in a loop) in both course index and course content.

      6.2 - Check that both course index and course content element are not draggable.

      6.3- Check that clicking in the name in both content and course index has no effect.

      7- Now drag one section on a different course position and repeat the same checks as before step 6.

      Show
      1- Create a course with some activities and sections (more than 5 each if possible). 2- Login as admin and go to the course 3- Turn edit ON. 4- Wait until the page is fully loaded. Then display the course index and uncollapse all sections (you probably need to close the drawer for it). 5- Edit your config.php and add the following code: if (defined( 'AJAX_SCRIPT' )) { sleep( 10 ); } (Note this will make everything go slower if you navigate through the page) 6- Drag one activity on another position (on the content or on the course index, it does not matter). While the action is executing do the following checks (if you don't have enough time to do the checking, simply repeat the action and continue with the next check): 6.1 - Check the element get has a pulse animation (goes from darker to lighter in a loop) in both course index and course content. 6.2 - Check  that both course index and course content element are not draggable. 6.3- Check that clicking in the name in both content and course index has no effect. 7- Now drag one section on a different course position and repeat the same checks as before step 6.
    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
      MDL-71834-master-v02
    • Sprint:
      Moppies Kanban

      Description

      The UI components of the course should be locked while a mutation is affecting it. The user should not be able to manipulate an element while it is mutating.

      This will be implemented as a new "locked" attribute in the cm and section state. Components can watch this attribute to enable or disable the element actions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              tusefomal Ferran Recio
              Peer reviewer:
              Ilya Tregubov Ilya Tregubov
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

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

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 1 minute
                  1w 1d 1m