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

Support freezing of categories, courses, activities contexts and their content

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create some sample data. You will need:
        1. Course categories, and nested course categories
        2. Courses
        3. Users
        4. Blocks in a course category
        5. Blocks in a course
      2. Login as admin
      3. Turn editing on
      4. For a course, category, and a block:
        1. Open the dropdown cog
        2. Confirm that there is no option to "Freeze this context"
      5. Navigate to Site administration => Development => Experimental settings
      6. Enable "Context freezing" and save changes
      7. For a course, category, and a block:
        1. Open the dropdown cog
        2. Confirm that there is now an option to "Freeze this context"
      8. Open the top course category
      9. Open the dropdown cog
      10. Open the Freeze this context page and freeze the context
        1. Confirm that you can still see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
      11. Open a sub-category
        1. Confirm that you cannot see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
      12. Open a course within the category
        1. Confirm that you cannot see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
      13. Open a forum within the course
        1. Confirm that you cannot see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
        5. Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions*
      14. Navigate back the original category
      15. Unlock the category from within the menu
      16. Navigate to the course
      17. Lock the course
        1. Confirm that you can still see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
      18. Open a forum within the course
        1. Confirm that you cannot see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
        5. Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions*
        6. Confirm that all edit actions have been removed from the dropdown
        7. Confirm editing has been disabled
        8. Confirm that you cannot turn editing on
      19. Navigate to a different course
        1. Confirm that you can still see the "Freeze this context" entry in the menu
        2. Confirm that you can still edit the course and activities within it
      20. Navigate back to the original course and unfreeze it
      21. Open the forum and lock it
        1. Confirm that you can still see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
        3. Confirm editing has been disabled
        4. Confirm that you cannot turn editing on
        5. Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions*
        6. Confirm that all edit actions have been removed from the dropdown
        7. Confirm editing has been disabled
        8. Confirm that you cannot turn editing on
      22. Navigate back to the forum and unfreeze it
      23. Open the course
      24. Open the dropdown menu for a block and freeze that block
        1. Confirm that you can still see the "Freeze this context" entry in the menu
        2. Confirm that all edit actions have been removed from the dropdown
      Show
      Create some sample data. You will need: Course categories, and nested course categories Courses Users Blocks in a course category Blocks in a course Login as admin Turn editing on For a course, category, and a block: Open the dropdown cog Confirm that there is no option to "Freeze this context" Navigate to Site administration => Development => Experimental settings Enable " Context freezing " and save changes For a course, category, and a block: Open the dropdown cog Confirm that there is now an option to " Freeze this context " Open the top course category Open the dropdown cog Open the Freeze this context page and freeze the context Confirm that you can still see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Open a sub-category Confirm that you cannot see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Open a course within the category Confirm that you cannot see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Open a forum within the course Confirm that you cannot see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions* Navigate back the original category Unlock the category from within the menu Navigate to the course Lock the course Confirm that you can still see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Open a forum within the course Confirm that you cannot see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions* Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Navigate to a different course Confirm that you can still see the " Freeze this context " entry in the menu Confirm that you can still edit the course and activities within it Navigate back to the original course and unfreeze it Open the forum and lock it Confirm that you can still see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Confirm that you cannot edit, delete, create, or reply to any posts (note: You can still manage your subscriptions* Confirm that all edit actions have been removed from the dropdown Confirm editing has been disabled Confirm that you cannot turn editing on Navigate back to the forum and unfreeze it Open the course Open the dropdown menu for a block and freeze that block Confirm that you can still see the " Freeze this context " entry in the menu Confirm that all edit actions have been removed from the dropdown
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE
    • Pull Master Branch:
      MDL-53566-master

      Description

      As discussed at the 2015 Australian Moot, a feature was discussed whereby it is possible to 'freeze' or 'lock' a context and all content in that context.

      The implementation proposed at the moot was to:

      1. add a new field to the context table to indicate that a context is frozen;
      2. when that context, or any parent context, is frozen the has_capability() function will return false for all write capabilities

      A new capability is introduced to control locking of a context, and a further capability to control unlocking of the context. The person who locks a context may not be the same one able to unlock it.

      The capability required to unlock the context must be a 'read' context to ensure that it is not denied by the capability itself.

        Attachments

        1. 1.PNG
          1.PNG
          145 kB
        2. 2.PNG
          2.PNG
          50 kB
        3. Capture1.PNG
          Capture1.PNG
          130 kB
        4. Capture2.PNG
          Capture2.PNG
          53 kB
        5. dropdown - managelocking.png
          dropdown - managelocking.png
          478 kB
        6. locking - confirmation.png
          locking - confirmation.png
          425 kB
        7. locking - setup.png
          locking - setup.png
          299 kB
        8. MDL-53566_1.PNG
          MDL-53566_1.PNG
          227 kB
        9. MDL-53566_2.PNG
          MDL-53566_2.PNG
          118 kB

          Issue Links

            Activity

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h