1 |
efrain |
1 |
@report @report_participation
|
|
|
2 |
Feature: Use the participation report to message groups of students
|
|
|
3 |
In order to engage with students based on participation
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to message students who have not participated in an activity
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname |
|
|
|
13 |
| teacher1 | Teacher | 1 |
|
|
|
14 |
| student1 | Student | 1 |
|
|
|
15 |
| student2 | Student | 2 |
|
|
|
16 |
| student3 | Student | 3 |
|
|
|
17 |
And the following "course enrolments" exist:
|
|
|
18 |
| user | course | role |
|
|
|
19 |
| teacher1 | C1 | editingteacher |
|
|
|
20 |
| student1 | C1 | student |
|
|
|
21 |
| student2 | C1 | student |
|
|
|
22 |
| student3 | C1 | student |
|
|
|
23 |
And the following "activity" exists:
|
|
|
24 |
| course | C1 |
|
|
|
25 |
| activity | book |
|
|
|
26 |
| name | Test book name |
|
|
|
27 |
| idnumber | Test book name |
|
|
|
28 |
| idnumber | book1 |
|
|
|
29 |
And I am on the "Test book name" "book activity" page logged in as student1
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Message all students from the participation report
|
|
|
33 |
Given I am on the "Course 1" course page logged in as teacher1
|
|
|
34 |
And I navigate to "Reports" in current page administration
|
|
|
35 |
And I click on "Course participation" "link"
|
|
|
36 |
And I set the field "instanceid" to "Test book name"
|
|
|
37 |
And I set the field "roleid" to "Student"
|
|
|
38 |
And I press "Go"
|
|
|
39 |
When I click on "select-all-participants" "checkbox"
|
|
|
40 |
And I choose "Send a message" from the participants page bulk action menu
|
|
|
41 |
Then "Send message to 3 people" "dialogue" should exist
|
|
|
42 |
And I set the field "Message" to "Hi there"
|
|
|
43 |
And I press "Send message to 3 people"
|
|
|
44 |
And I should see "Message sent to 3 people"
|
|
|
45 |
|
|
|
46 |
@javascript
|
|
|
47 |
Scenario: Message students who have not participated in book
|
|
|
48 |
Given I am on the "Course 1" course page logged in as teacher1
|
|
|
49 |
And I navigate to "Reports" in current page administration
|
|
|
50 |
And I click on "Course participation" "link"
|
|
|
51 |
And I set the field "instanceid" to "Test book name"
|
|
|
52 |
And I set the field "roleid" to "Student"
|
|
|
53 |
And I press "Go"
|
|
|
54 |
And I should see "Yes (1)" in the "Student 1" "table_row"
|
|
|
55 |
And I should see "No" in the "Student 2" "table_row"
|
|
|
56 |
And I should see "No" in the "Student 3" "table_row"
|
|
|
57 |
When I press "Select all 'No'"
|
|
|
58 |
And I choose "Send a message" from the participants page bulk action menu
|
|
|
59 |
Then "Send message to 2 people" "dialogue" should exist
|
|
|
60 |
And I set the field "Message" to "Hi there"
|
|
|
61 |
And I press "Send message to 2 people"
|
|
|
62 |
And I should see "Message sent to 2 people"
|
|
|
63 |
|
|
|
64 |
Scenario: When messaging is disabled no message options should be displayed
|
|
|
65 |
Given the following config values are set as admin:
|
|
|
66 |
| messaging | 0 |
|
|
|
67 |
And I am on the "Course 1" course page logged in as teacher1
|
|
|
68 |
And I navigate to "Reports" in current page administration
|
|
|
69 |
And I click on "Course participation" "link"
|
|
|
70 |
When I set the field "instanceid" to "Test book name"
|
|
|
71 |
And I set the field "roleid" to "Student"
|
|
|
72 |
And I press "Go"
|
|
|
73 |
Then I should not see "With selected users..."
|
|
|
74 |
And "select-all-participants" "checkbox" should not exist
|