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

Capability "viewhiddenactivities" and "viewhiddensections" should have captype "read"

    XMLWordPrintable

Details

    • MOODLE_37_STABLE
    • MOODLE_38_STABLE
    • master_MDL-68054
    • Hide

      Replication steps...

      1. Turn on context freezing (Site admin > Development > Experimental features)
      2. Create a category with a course in it
      3. Include some hidden course activities in visible sections
      4. Hide a section with content in it
      5. Enrol a teacher
      6. Freeze the category (Site admin > Manage courses and categories > cog next to category)
      7. Create another course outside the frozen category with a mix of hidden and visible activities and sections.
      8. Log in as the teacher and navigate to the course in the frozen category.
      9. Attempt to view and edit content, including hidden content.
      10. Go to a course outside the frozen category using the teacher
      11. Attempt to view and edit content, including hidden content.

      Expected result

      • Teacher should be able to see, but not edit content in the frozen course, including the hidden activities and section.
      • Teacher should be able to see and edit/delete/etc contents of the the course outside the frozen category.
      Show
      Replication steps... Turn on context freezing (Site admin > Development > Experimental features) Create a category with a course in it Include some hidden course activities in visible sections Hide a section with content in it Enrol a teacher Freeze the category (Site admin > Manage courses and categories > cog next to category) Create another course outside the frozen category with a mix of hidden and visible activities and sections. Log in as the teacher and navigate to the course in the frozen category. Attempt to view and edit content, including hidden content. Go to a course outside the frozen category using the teacher Attempt to view and edit content, including hidden content. Expected result Teacher should be able to see, but not edit content in the frozen course, including the hidden activities and section. Teacher should be able to see and edit/delete/etc contents of the the course outside the frozen category.

    Description

      This capability prevents/allows people to see hidden activities in a course. It doesn't control whether they can alter them.

      As this is a 'write' capability, it is overridden in frozen contexts and prevents users with legitimate access from seeing hidden activities/resources.

      Changing the captype of the capability in the DB is a workaround, but I don't know if there are wider implications.

      Replication steps...

      1. Turn on context freezing (Site admin > Developement > Experimental features)
      2. Create a category with a course in it (including some hidden course activities) and enrol a teacher
      3. Freeze the category (Site admin > Manage courses and categories > cog next to category)
      4. Go to a course outside the frozen category using the teacher

      Expected result

      • Teacher should be able to see (if not edit/delete/etc) the activity.

      Actual result

      • Hidden activities/resources are not visible to the teacher.

       

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              salvetore Michael de Raadt
              Simey Lameze Simey Lameze
              Andrew Lyons Andrew Lyons
              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:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Jul/20

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m