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

Restricted Grouping access by Topic not working in Course layout = one section per page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.3
    • Fix Version/s: STABLE backlog
    • Component/s: Course
    • Labels:
    • Workaround:
      Hide

      Changing Course layout to 'Show all sections on one page' works as expected and hides sections (topics) not available for this grouping.

      Show
      Changing Course layout to 'Show all sections on one page' works as expected and hides sections (topics) not available for this grouping.
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      Replication steps:

      1. Log in as admin
      2. Navigate to Site admin > Development > Experimental > Experimental settings
      3. Check "Enable group members" (onlyenablegroupmembersonly)
      4. Navigate to Site admin > Advanced features
      5. Check "Enable conditional" (accessenableavailability)
      6. Navigate to a course
      7. Navigate to Course admin > Users > Groups
      8. Place some users in groups
      9. Click the Groupings tab
      10. Create some Groupings with one or more groups in each
      11. Navigate to Cours admin > Edit settings
      12. Set Format = 'Topics format' and Course layout = 'Show one section per page'
      13. Save settings
      14. Edit a section (topic) somewhere in the middle of the course
      15. Under "Restrict access" set "Grouping access" to a grouping
      16. Log in as student who is not in the grouping with access to the section
      17. If viewing a single section, click "Return to main course page"
      18. Note that the Course page shows the correct list of sections (without grouping restricted section)
      19. Note that the Navigation shows the correct list of sections (without grouping restricted section)
      20. Click on the section before the grouping restricted section
      21. Note that you can see a link to the grouping restricted section
      22. Click on the link - an error is shown

      Sorry, but you do not currently have permissions to do that (View hidden sections)
       
      More information about this error
       
      Debug info: 
      Error code: nopermissions
      Stack trace:
      line 704 of \lib\accesslib.php: required_capability_exception thrown
      line 112 of \course\view.php: call to require_capability()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  2 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: