Skip to content

Course index will not render - Access restrictions applied to sub-sections #250

@TC-UK

Description

@TC-UK

Describe the bug
When some but not all access restrictions applied to sub-sections within a course are met, the course index fails to render properly. This is only visible to users with roles that cannot see course contents without completing access restrictions.

This is not the case when switching to custom sections format which then renders the course index correctly. Switching back to Grid re-introduces the problem.

A topic contains two sub-sections. Each sub-section has an access restriction based on completion of an activity.

Sub-section 1 is restricted based on completion of activity A

Sub-section 2 is restricted based on completion of activity B

The course index renders when neither A or B have been completed.

The course index does not render when either A or B has been completed.

The course index renders when both A and B have been completed.

To Reproduce
Steps to reproduce the behaviour:

  1. Create two page activities on a course title A and B
  2. Create a topic and within that two sub-topics labelled 1 and 2
  3. Apply access restriction to sub-section 1 based on completion of activity A
  4. Apply access restriction to sub-section 2 based on completion of activity B
  5. Using a student user account on the course (Not switch role to student) complete activity A
  6. Look at course index and confirm not rendering items.

Expected behaviour
Course index should still render even if a sub-section has a different restriction. This behaviour is already the case with activities within a section under the same conditions.

Screenshots

Image

Versions (please complete the following information):

  • Moodle: 4.5.8
  • Grid version: 405.1.4

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions