1 |
efrain |
1 |
@report @report_outline
|
|
|
2 |
Feature: Filter an outline report
|
|
|
3 |
In order to ensure the outline report works as expected
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to log in as a teacher and view the outline report with various filters in place
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | format |
|
|
|
10 |
| Course 1 | C1 | topics |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com |
|
|
|
15 |
| student2 | Student | 2 | student2@example.com |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
And the following "activities" exist:
|
|
|
22 |
| activity | name | course | idnumber | section |
|
|
|
23 |
| forum | Forum name | C1 | FORUM01 | 1 |
|
|
|
24 |
| book | Book name | C1 | BOOK01 | 1 |
|
|
|
25 |
When I am on the "Course 1" course page logged in as admin
|
|
|
26 |
|
|
|
27 |
Scenario: Filter the outline report by start date
|
|
|
28 |
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
|
|
|
29 |
And "Disable" "link" should exist in the "Standard log" "table_row"
|
|
|
30 |
And I am on the "Forum name" "forum activity" page logged in as student1
|
|
|
31 |
And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00"
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
And I follow "Book name"
|
|
|
34 |
And the log timestamp for "student1" and "BOOK01" is set to "10 June 2017 14:01:00"
|
|
|
35 |
And I am on the "Book name" "book activity" page logged in as student2
|
|
|
36 |
And the log timestamp for "student2" and "BOOK01" is set to "14 June 2017 11:02:00"
|
|
|
37 |
And I am on the "Course 1" course page logged in as admin
|
|
|
38 |
And I navigate to "Reports" in current page administration
|
|
|
39 |
And I click on "Activity report" "link"
|
|
|
40 |
And I should see "2 views by 2 users" in the "Book name" "table_row"
|
|
|
41 |
And I should see "1 views by 1 users" in the "Forum name" "table_row"
|
|
|
42 |
When I set the following fields to these values:
|
|
|
43 |
| filterstartdate[enabled] | 1 |
|
|
|
44 |
| filterstartdate[day] | 12 |
|
|
|
45 |
| filterstartdate[month] | June |
|
|
|
46 |
| filterstartdate[year] | 2017 |
|
|
|
47 |
And I click on "Filter" "button" in the "#fgroup_id_buttonar" "css_element"
|
|
|
48 |
Then I should see "1 views by 1 users" in the "Book name" "table_row"
|
|
|
49 |
And I should see "1 views by 1 users" in the "Forum name" "table_row"
|
|
|
50 |
|
|
|
51 |
Scenario: Filter the outline report by end date
|
|
|
52 |
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
|
|
|
53 |
And "Disable" "link" should exist in the "Standard log" "table_row"
|
|
|
54 |
And I am on the "Forum name" "forum activity" page logged in as student1
|
|
|
55 |
And the log timestamp for "student1" and "FORUM01" is set to "12 June 2017 12:49:00"
|
|
|
56 |
And I am on "Course 1" course homepage
|
|
|
57 |
And I follow "Book name"
|
|
|
58 |
And the log timestamp for "student1" and "BOOK01" is set to "10 June 2017 14:01:00"
|
|
|
59 |
And I am on the "Book name" "book activity" page logged in as student2
|
|
|
60 |
And the log timestamp for "student2" and "BOOK01" is set to "14 June 2017 11:02:00"
|
|
|
61 |
And I am on the "Course 1" course page logged in as admin
|
|
|
62 |
And I navigate to "Reports" in current page administration
|
|
|
63 |
And I click on "Activity report" "link"
|
|
|
64 |
And I should see "2 views by 2 users" in the "Book name" "table_row"
|
|
|
65 |
And I should see "1 views by 1 users" in the "Forum name" "table_row"
|
|
|
66 |
When I set the following fields to these values:
|
|
|
67 |
| filterenddate[enabled] | 1 |
|
|
|
68 |
| filterenddate[day] | 11 |
|
|
|
69 |
| filterenddate[month] | June |
|
|
|
70 |
| filterenddate[year] | 2017 |
|
|
|
71 |
And I click on "Filter" "button" in the "#fgroup_id_buttonar" "css_element"
|
|
|
72 |
Then I should see "1 views by 1 users" in the "Book name" "table_row"
|
|
|
73 |
And I should not see "views by" in the "Forum name" "table_row"
|