1 |
efrain |
1 |
@mod @mod_choice
|
|
|
2 |
Feature: A student can see how the results of the choice activity will be published
|
|
|
3 |
In order to put my mind at ease when it comes to answering a choice
|
|
|
4 |
As a student
|
|
|
5 |
I need to learn how my choice will be handled and published to the other course participants.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
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 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And I log in as "teacher1"
|
|
|
20 |
|
|
|
21 |
Scenario: Results will not be published to the students
|
|
|
22 |
Given the following "activities" exist:
|
|
|
23 |
| activity | name | intro | course | idnumber | option |
|
|
|
24 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
25 |
And I am on "Course 1" course homepage
|
|
|
26 |
And I follow "Choice 1"
|
|
|
27 |
And I navigate to "Settings" in current page administration
|
|
|
28 |
And I set the following fields to these values:
|
|
|
29 |
| Publish results | Do not publish results to students |
|
|
|
30 |
And I press "Save and return to course"
|
|
|
31 |
And I log out
|
|
|
32 |
And I log in as "student1"
|
|
|
33 |
And I am on "Course 1" course homepage
|
|
|
34 |
When I follow "Choice 1"
|
|
|
35 |
Then I should see "The results of this activity will not be published after you answer."
|
|
|
36 |
|
|
|
37 |
Scenario: Full results will be shown to the students after they answer
|
|
|
38 |
Given the following "activities" exist:
|
|
|
39 |
| activity | name | intro | course | idnumber | option |
|
|
|
40 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
41 |
And I am on "Course 1" course homepage
|
|
|
42 |
When I follow "Choice 1"
|
|
|
43 |
And I navigate to "Settings" in current page administration
|
|
|
44 |
And I set the following fields to these values:
|
|
|
45 |
| Publish results | Show results to students after they answer |
|
|
|
46 |
| Privacy of results | Publish full results, showing names and their choices |
|
|
|
47 |
And I press "Save and return to course"
|
|
|
48 |
And I log out
|
|
|
49 |
And I log in as "student1"
|
|
|
50 |
And I am on "Course 1" course homepage
|
|
|
51 |
When I follow "Choice 1"
|
|
|
52 |
Then I should see "Full results, showing everyone's choices, will be published after you answer."
|
|
|
53 |
|
|
|
54 |
Scenario: Anonymous results will be shown to students after they answer
|
|
|
55 |
Given the following "activities" exist:
|
|
|
56 |
| activity | name | intro | course | idnumber | option |
|
|
|
57 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
58 |
And I am on "Course 1" course homepage
|
|
|
59 |
When I follow "Choice 1"
|
|
|
60 |
And I navigate to "Settings" in current page administration
|
|
|
61 |
And I set the field "Publish results" to "Show results to students after they answer"
|
|
|
62 |
And I press "Save and return to course"
|
|
|
63 |
And I log out
|
|
|
64 |
And I log in as "student1"
|
|
|
65 |
And I am on "Course 1" course homepage
|
|
|
66 |
When I follow "Choice 1"
|
|
|
67 |
Then I should see "Anonymous results will be published after you answer."
|
|
|
68 |
|
|
|
69 |
Scenario: Full results will be shown to students only after the choice is closed
|
|
|
70 |
Given the following "activities" exist:
|
|
|
71 |
| activity | name | intro | course | idnumber | option |
|
|
|
72 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
73 |
And I am on "Course 1" course homepage
|
|
|
74 |
When I follow "Choice 1"
|
|
|
75 |
And I navigate to "Settings" in current page administration
|
|
|
76 |
And I set the field "Publish results" to "Show results to students only after the choice is closed"
|
|
|
77 |
And I set the field "Privacy of results" to "Publish full results, showing names and their choices"
|
|
|
78 |
And I press "Save and return to course"
|
|
|
79 |
And I log out
|
|
|
80 |
And I log in as "student1"
|
|
|
81 |
And I am on "Course 1" course homepage
|
|
|
82 |
When I follow "Choice 1"
|
|
|
83 |
Then I should see "Full results, showing everyone's choices, will be published after the activity is closed."
|
|
|
84 |
|
|
|
85 |
Scenario: Anonymous results will be shown to students only after the choice is closed
|
|
|
86 |
Given the following "activities" exist:
|
|
|
87 |
| activity | name | intro | course | idnumber | option |
|
|
|
88 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
89 |
And I am on "Course 1" course homepage
|
|
|
90 |
When I follow "Choice 1"
|
|
|
91 |
And I navigate to "Settings" in current page administration
|
|
|
92 |
And I set the field "Publish results" to "Show results to students only after the choice is closed"
|
|
|
93 |
And I press "Save and return to course"
|
|
|
94 |
And I log out
|
|
|
95 |
And I log in as "student1"
|
|
|
96 |
And I am on "Course 1" course homepage
|
|
|
97 |
When I follow "Choice 1"
|
|
|
98 |
Then I should see "Anonymous results will be published after the activity is closed."
|
|
|
99 |
|
|
|
100 |
Scenario: Results will always be shown to students
|
|
|
101 |
And the following "activities" exist:
|
|
|
102 |
| activity | name | intro | course | idnumber | option |
|
|
|
103 |
| choice | Choice 1 | Choice description | C1 | choice1 | Option 1, Option 2 |
|
|
|
104 |
And I am on "Course 1" course homepage
|
|
|
105 |
When I follow "Choice 1"
|
|
|
106 |
And I navigate to "Settings" in current page administration
|
|
|
107 |
And I set the field "Publish results" to "Always show results to students"
|
|
|
108 |
And I press "Save and return to course"
|
|
|
109 |
And I log out
|
|
|
110 |
And I log in as "student1"
|
|
|
111 |
And I am on "Course 1" course homepage
|
|
|
112 |
When I follow "Choice 1"
|
|
|
113 |
Then I should not see "Full results, showing everyone's choices, will be published after you answer."
|
|
|
114 |
And I should not see "Full results, showing everyone's choices, will be published after the activity is closed."
|
|
|
115 |
And I should not see "Anonymous results will be published after you answer."
|
|
|
116 |
And I should not see "Anonymous results will be published after the activity is closed."
|
|
|
117 |
And I should not see "The results of this activity will not be published after you answer."
|