Show
Setup
Create a course with 1 teacher (teacher1), and 2 students (student1 and student2) enrolled. Also create a student (student3) who is not enrolled in the course.
Create a forum activity in the course.
Log into the course as student1
Create 1 discussion, then log out.
Log into the course as teacher1.
Reply to student1's discussion, then create 2 new discussions.
Log out.
Test 1 - capability required to view any report
Log in as student1.
Navigate to the forum.
In the actions menu, CONFIRM the 'Forum summary report' option is not visible.
Log out, and log in as site admin.
Assign the student role the ' forumreport/summary:accessreport ' capability.
Log out, and log back in as student1.
Navigate to the forum.
In the actions menu, CONFIRM the 'Forum summary report' option is visible.
Select the 'Forum summary report' option.
CONFIRM the forum summary report loads the general page contents as expected (header, navigation, footer, breadcrumbs).
CONFIRM The heading above the summary table is in the format Forum summary report - {forum name} .
CONFIRM The summary report data loads only student1's details, including the following columns: Firstname/surname, number of discussions posted, number of replies posted.
CONFIRM The number of discussions posted is 1, and CONFIRM the number of replies posted is 0.
In a separate browser, or incognito session, log into the site as admin (while remaining logged in as the student in the other session).
Navigate to Site Administration > Users > Permissions > Define roles, then select the 'edit' cog on the Student row.
Uncheck the forumreport/summary:accessreport capability and click 'save changes'.
Return to the window containing your student session (with the report open) and refresh the page.
CONFIRM you are redirected back to the forum homepage.
Open the actions menu and CONFIRM the 'Forum summary report' option is no longer visible.
Log out.
Test 2 - additional capability required to view all enrolled users report
Log in as teacher1.
Navigate to the forum.
In the actions menu, CONFIRM the 'Forum summary report' option is visible.
Select the 'Forum summary report' option.
CONFIRM the forum summary report loads the general page contents as expected (header, navigation, footer, breadcrumbs).
CONFIRM The summary report data loads data for all users, ie teacher1, student1 and student2, including Firstname/surname, as well as the following:
Student1: 1 discussions posted, 0 replies posted
Student2: 0 discussions posted, 0 replies posted
Teacher1: 2 discussions posted, 1 replies posted
CONFIRM Student 3 does not appear in the report.
Click on the table heading 'Number of discussions posted'.
CONFIRM the rows are correctly sorted (ascending order).
Again, click on the table heading 'Number of discussions posted'.
CONFIRM the rows are correctly sorted (descending order).
Click 'Reset table preferences' and CONFIRM the sorting returns back to the default view.
Test 3 - pagination
While still logged in as teacher1, update the report page URL to include &perpage=1 at the end.
CONFIRM only one row is now visible in the table.
CONFIRM pagination is now showing 3 pages.
Click the page 3 option and CONFIRM a different user's data is displayed.
Update the URL to include &page=5 at the end.
CONFIRM 'Nothing to display' is displayed instead of the table.