1 |
efrain |
1 |
@report @report_outline
|
|
|
2 |
Feature: View 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
|
|
|
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 |
|
|
|
23 |
| forum | Forum name | C1 | forum1 |
|
|
|
24 |
| book | Book name | C1 | book1 |
|
|
|
25 |
When I am on the "Course 1" course page logged in as admin
|
|
|
26 |
|
|
|
27 |
Scenario: View the outline report when only the standard log reader is enabled
|
|
|
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 "Course 1" course page logged in as student1
|
|
|
31 |
And I follow "Forum name"
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
And I follow "Book name"
|
|
|
34 |
And I am on the "Course 1" course page logged in as student2
|
|
|
35 |
And I follow "Book name"
|
|
|
36 |
And I am on the "Course 1" course page logged in as admin
|
|
|
37 |
When I navigate to "Reports" in current page administration
|
|
|
38 |
And I click on "Activity report" "link"
|
|
|
39 |
Then I should see "2 views by 2 users" in the "Book name" "table_row"
|
|
|
40 |
And I should see "1 views by 1 users" in the "Forum name" "table_row"
|
|
|
41 |
|
|
|
42 |
Scenario: View the outline report when no log reader is enabled
|
|
|
43 |
Given I navigate to "Plugins > Logging > Manage log stores" in site administration
|
|
|
44 |
And I click on "Disable" "link" in the "Standard log" "table_row"
|
|
|
45 |
And I am on "Course 1" course homepage
|
|
|
46 |
When I navigate to "Reports" in current page administration
|
|
|
47 |
And I click on "Activity report" "link"
|
|
|
48 |
Then I should see "No log reader enabled"
|
|
|
49 |
|
|
|
50 |
Scenario: Multiple views from a single user are identified as not distinct
|
|
|
51 |
Given I am on the "Course 1" course page logged in as student1
|
|
|
52 |
And I follow "Forum name"
|
|
|
53 |
And I am on "Course 1" course homepage
|
|
|
54 |
And I follow "Forum name"
|
|
|
55 |
And I am on "Course 1" course homepage
|
|
|
56 |
And I follow "Forum name"
|
|
|
57 |
And I am on site homepage
|
|
|
58 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
59 |
And I navigate to "Reports" in current page administration
|
|
|
60 |
And I click on "Activity report" "link"
|
|
|
61 |
Then I should see "3 views by 1 users" in the "Forum name" "table_row"
|
|
|
62 |
And I should see "-" in the "Book name" "table_row"
|
|
|
63 |
|
|
|
64 |
Scenario: Multiple views from multiple users are identified as not distinct
|
|
|
65 |
Given I am on the "Course 1" course page logged in as student1
|
|
|
66 |
And I follow "Forum name"
|
|
|
67 |
And I am on "Course 1" course homepage
|
|
|
68 |
And I follow "Forum name"
|
|
|
69 |
And I am on "Course 1" course homepage
|
|
|
70 |
And I follow "Forum name"
|
|
|
71 |
And I am on site homepage
|
|
|
72 |
Given I am on the "Course 1" course page logged in as student2
|
|
|
73 |
And I follow "Forum name"
|
|
|
74 |
And I am on "Course 1" course homepage
|
|
|
75 |
And I follow "Forum name"
|
|
|
76 |
And I am on "Course 1" course homepage
|
|
|
77 |
And I follow "Forum name"
|
|
|
78 |
And I am on site homepage
|
|
|
79 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
80 |
And I navigate to "Reports" in current page administration
|
|
|
81 |
And I click on "Activity report" "link"
|
|
|
82 |
Then I should see "6 views by 2 users" in the "Forum name" "table_row"
|
|
|
83 |
And I should see "-" in the "Book name" "table_row"
|
|
|
84 |
|
|
|
85 |
Scenario: No views from any users
|
|
|
86 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
87 |
And I navigate to "Reports" in current page administration
|
|
|
88 |
And I click on "Activity report" "link"
|
|
|
89 |
Then I should see "-" in the "Forum name" "table_row"
|
|
|
90 |
And I should see "-" in the "Book name" "table_row"
|