1 |
efrain |
1 |
@mod @mod_forum @forumreport @forumreport_summary
|
|
|
2 |
Feature: forum report shows post/reply/word counts correctly
|
|
|
3 |
In order to gather data on users' forum activities
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to view accurate forum summary report when students have more than 1 enrolment
|
|
|
6 |
|
|
|
7 |
Scenario: Add discussions and replies with attached files
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
| student1 | Student | 1 | student1@example.com |
|
|
|
12 |
| student2 | Student | 2 | student1@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Course 1 | C1 | 0 |
|
|
|
16 |
| Course 2 | C2 | 0 |
|
|
|
17 |
And the following "course enrolments" exist:
|
|
|
18 |
| user | course | role | enrol |
|
|
|
19 |
| teacher1 | C1 | editingteacher | manual |
|
|
|
20 |
| student1 | C1 | student | manual |
|
|
|
21 |
| student1 | C1 | student | self |
|
|
|
22 |
| student2 | C1 | student | manual |
|
|
|
23 |
| student2 | C1 | student | self |
|
|
|
24 |
| teacher1 | C2 | editingteacher | manual |
|
|
|
25 |
And the following "activities" exist:
|
|
|
26 |
| activity | name | course | idnumber |
|
|
|
27 |
| forum | forum1 | C1 | forum1 |
|
|
|
28 |
| forum | forum2 | C1 | forum2 |
|
|
|
29 |
| forum | forum1 | C2 | forum1 |
|
|
|
30 |
And the following forum discussions exist in course "Course 1":
|
|
|
31 |
| user | forum | name | message | attachments | inlineattachments |
|
|
|
32 |
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
|
|
|
33 |
| teacher1 | forum2 | discussion2 | message2 | att3.jpg | in1.jpg |
|
|
|
34 |
| student1 | forum1 | discussion3 | my message3 | att4.jpg | in2.jpg |
|
|
|
35 |
| student2 | forum1 | discussion4 | my message4 | | |
|
|
|
36 |
And the following forum replies exist in course "Course 1":
|
|
|
37 |
| user | forum | discussion | message | attachments | inlineattachments |
|
|
|
38 |
| teacher1 | forum1 | discussion1 | reply1 | att5.jpg | in3.txt |
|
|
|
39 |
| teacher1 | forum1 | discussion1 | reply2 | att5.jpg | in3.txt |
|
|
|
40 |
| teacher1 | forum2 | discussion2 | reply2 | att6.jpg | |
|
|
|
41 |
| student1 | forum1 | discussion3 | my reply3 | att7.jpg, att8.jpg | in2.jpg |
|
|
|
42 |
| student2 | forum1 | discussion4 | my reply4 | | |
|
|
|
43 |
| student2 | forum1 | discussion4 | my reply5 | | |
|
|
|
44 |
And the following forum discussions exist in course "Course 2":
|
|
|
45 |
| user | forum | name | message | attachments | inlineattachments |
|
|
|
46 |
| teacher1 | forum1 | discussion1 | message1 | att1.jpg, att2.txt | |
|
|
|
47 |
When I am on the "Course 1" course page logged in as teacher1
|
|
|
48 |
And I follow "forum1"
|
|
|
49 |
And I navigate to "Reports" in current page administration
|
|
|
50 |
Then "Teacher 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "6"
|
|
|
51 |
And "Student 1" row "Number of attachments" column of "forumreport_summary_table" table should contain "5"
|
|
|
52 |
And "Student 1" row "Word count" column of "forumreport_summary_table" table should contain "4"
|
|
|
53 |
And "Student 1" row "Character count" column of "forumreport_summary_table" table should contain "18"
|
|
|
54 |
And "Student 1" row "Number of discussions posted" column of "forumreport_summary_table" table should contain "1"
|
|
|
55 |
And "Student 1" row "Number of replies posted" column of "forumreport_summary_table" table should contain "1"
|
|
|
56 |
And "Student 2" row "Number of attachments" column of "forumreport_summary_table" table should contain "0"
|
|
|
57 |
And "Student 2" row "Word count" column of "forumreport_summary_table" table should contain "6"
|
|
|
58 |
And "Student 2" row "Character count" column of "forumreport_summary_table" table should contain "26"
|
|
|
59 |
And "Student 2" row "Number of discussions posted" column of "forumreport_summary_table" table should contain "1"
|
|
|
60 |
And "Student 2" row "Number of replies posted" column of "forumreport_summary_table" table should contain "2"
|