-
Functional Test
-
Minor
-
Moodle 3.7
This is an exploratory test of a new feature, so please feel free to try anything you like and not just the test steps!
This test requires admin access. If you would like to use the QA testing site for running it, please see the QA testing guide for details of how to request admin access. Begin just after the hourly reset to give yourself plenty of time to complete the test!
- Log in as admin and go to Site administration / Users / Permissions / Define roles.
- Edit the Authenticated user role and search for the capability moodle/category:viewcourselist then remove it by unticking the Allow box, then save changes.
- Edit the Guest role and search for the capability moodle/category:viewcourselist and then remove it by unticking the Allow box, then save changes.
- Click the 'Add a new role', use no role as archetype, name the role 'Course list viewer', tick Category as context type where the role may be assigned, search for the capability moodle/category:viewcourselist and allow it, then save changes.
- Go to the site home page and add the Courses block.
- Go to Site administration / Front page settings / Edit settings and enable all kinds of course listings on the site home page.
- Go to Site administration / Courses / Manage courses and categories and create some course categories and some courses.
- For some of these courses enable self enrolment and for others, enable guest access.
- For some of the categories created, assign the 'Course list viewer' role to a user via the 'Assign roles' option in the category cog menu.
- Log in as a user and verify that you are not able to view the list of courses in the Courses block or on the site home page.
- Verify that you can view the courses you are enrolled in.
- Log in as a guest and verify that you are not able to view the list of courses in the Courses block or on the site home page.
- Log in as the user with the 'Course list viewer' role and check the Courses block and the site home page.
- Verify that you can browse only the categories for which you have the 'Course list viewer' role.
- Verify that you can self-enrol in any course in these categories which allows self enrolment.
- Switch to Classic theme and make sure that only available/enrolled courses appear in the navigation block and navigation items expand properly when you navigate inside the course, inside the section and inside the activity.