__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@gradereport @gradereport_grader
Feature: grader report pagination
In order to consume the content of the report better
As a teacher
I need the report to be paginated
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Default is used when teachers have no preference yet
Given "41" "users" exist with the following data:
| username | student[count] |
| firstname | Student |
| lastname | [count] |
| email | student[count]@example.com |
And "41" "course enrolments" exist with the following data:
| user | student[count] |
| course | C1 |
| role |student |
When I am on the "Course 1" "Course" page logged in as "teacher1"
And I navigate to "View > Grader report" in the course gradebook
Then the field "perpage" matches value "20"
# Add 3 to the expected number because there are 2 header and 1 footer rows.
And I should see "23" node occurrences of type "tr" in the "user-grades" "table"
And I should see "3" in the ".stickyfooter .pagination" "css_element"
And I should not see "4" in the ".stickyfooter .pagination" "css_element"
@javascript
Scenario: Teachers can have their preference for the number of students
Given the following "courses" exist:
| fullname | shortname |
| Course 2 | C2 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C2 | editingteacher |
When I am on the "Course 1" "Course" page logged in as "teacher1"
And I navigate to "View > Grader report" in the course gradebook
And I set the field "perpage" to "100"
And I am on the "Course 2" "Course" page
And I navigate to "View > Grader report" in the course gradebook
Then the field "perpage" matches value "100"
@javascript
Scenario: Teachers can change the number of students shown on the report
Given "101" "users" exist with the following data:
| username | student[count] |
| firstname | Student |
| lastname | [count] |
| email | student[count]@example.com |
And "101" "course enrolments" exist with the following data:
| user | student[count] |
| course | C1 |
| role |student |
When I am on the "Course 1" "Course" page logged in as "teacher1"
And I navigate to "View > Grader report" in the course gradebook
And I set the field "perpage" to "100"
# Add 3 to the expected number because there are 2 header and 1 footer rows.
Then I should see "103" node occurrences of type "tr" in the "user-grades" "table"
And I should see "2" in the ".stickyfooter .pagination" "css_element"
And I should not see "3" in the ".stickyfooter .pagination" "css_element"
And the url should match "/grade/report/grader/index\.php\?id=[0-9]+&report=grader&perpage=100$"
@javascript
Scenario: The pagination bar is only displayed when there is more than one page
Given "21" "users" exist with the following data:
| username | student[count] |
| firstname | Student |
| lastname | [count] |
| email | student[count]@example.com |
And "21" "course enrolments" exist with the following data:
| user | student[count] |
| course | C1 |
| role |student |
When I am on the "Course 1" "Course" page logged in as "teacher1"
And I navigate to "View > Grader report" in the course gradebook
# By default, we have 20 students per page.
Then ".stickyfooter .pagination" "css_element" should exist
And I set the field "perpage" to "100"
Then ".stickyfooter .pagination" "css_element" should not exist
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| behat_gradereport_grader.php | File | 4.75 KB | 0777 |
|
| behat_gradereport_grader_deprecated.php | File | 10.7 KB | 0777 |
|
| column_collapsing.feature | File | 17.74 KB | 0777 |
|
| groupsearch.feature | File | 6.05 KB | 0777 |
|
| locking.feature | File | 3.13 KB | 0777 |
|
| pagination.feature | File | 4.16 KB | 0777 |
|
| sort_gradeitems_user_fields.feature | File | 4.5 KB | 0777 |
|
| switch_views.feature | File | 6.25 KB | 0777 |
|
| tertiary_name_filter.feature | File | 10.78 KB | 0777 |
|
| tertiary_navigation_searching.feature | File | 21.57 KB | 0777 |
|