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

Comments can be deleted in frozen contexts

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6, 3.7
    • 3.8.5, 3.9.2
    • Comments
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-64525-m39
    • Hide

      Setup

      • Turn on context freezing (Site administration > Development > Experimental settings > Context freezing)
      • Create a Database activity (Activity 1)
        • Ensure it is configured to use the image bank preset
      • A user student is enrolled as a student on the course that Activity 1 is in

      Test

      1. Login as student
      2. Navigate to Activity 1
      3. Create a new entry
      4. Add two comments to the entry
      5. Pick one of the comments you added and press the delete button on it
      6. Verify that the comment disappears and no error messages are received
      7. Refresh the page
      8. Expand the comments
      9. Verify that the comment you deleted is still not displayed and the other comment is still displayed.
      10. Login as admin
      11. Navigate to the main page of Activity 1
      12. Open the Activity 1 action menu and select "Freeze this content"
      13. Press continue
      14. Login as student
      15. Navigate to Activity 1
      16. Open the entry you created in step 3
      17. Expand the comments
      18. Verify that you cannot see the delete button for the comment
      Show
      Setup Turn on context freezing (Site administration > Development > Experimental settings > Context freezing) Create a Database activity ( Activity 1 ) Ensure it is configured to use the image bank preset A user student is enrolled as a student on the course that Activity 1 is in Test Login as student Navigate to Activity 1 Create a new entry Add two comments to the entry Pick one of the comments you added and press the delete button on it Verify that the comment disappears and no error messages are received Refresh the page Expand the comments Verify that the comment you deleted is still not displayed and the other comment is still displayed. Login as admin Navigate to the main page of Activity 1 Open the Activity 1 action menu and select "Freeze this content" Press continue Login as student Navigate to Activity 1 Open the entry you created in step 3 Expand the comments Verify that you cannot see the delete button for the comment

    Description

      If an activity that uses comments is Frozen the comments that have been created can still be deleted by users.

      For example:

      1. As an administrator enable the content Freezing features.
      2. Create an database activity (Ensure Allow comments on entries is set to Yes)
      3. Use the image bank preset
      4. Add a new entry
      5. Create a comment on the new entry
      6. Freeze the database
      7. View the entry and expand the comments

      Actual result

      The comments appear with a delete button, that functions to delete the comment.

      Expected result

      The comments appear and have no delete button present.

      This also affects assignments (and presumably all plugins that use comments)

      Attachments

        Issue Links

          Activity

            People

              nmagill Neill Magill
              nmagill Neill Magill
              Andrew Lyons Andrew Lyons
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Janelle Barcega Janelle Barcega
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Sep/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 48 minutes
                  4h 48m