1 |
efrain |
1 |
@mod @mod_choice
|
|
|
2 |
Feature: A teacher can choose whether to publish choice activity results anonymously or showing names
|
|
|
3 |
In order to keep students privacy or to give more info to students
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to select whether I want other students to know who selected what option
|
|
|
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 |
| student2 | Student | 2 | student2@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Course 1 | C1 | 0 |
|
|
|
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 I log in as "teacher1"
|
|
|
22 |
|
|
|
23 |
Scenario: Publish anonymous results
|
|
|
24 |
Given the following "activities" exist:
|
|
|
25 |
| activity | name | intro | course | idnumber | option | section |
|
|
|
26 |
| choice | Choice 1 | Choice Description | C1 | choice1 | Option 1, Option 2 | 1 |
|
|
|
27 |
And I am on "Course 1" course homepage
|
|
|
28 |
And I follow "Choice 1"
|
|
|
29 |
And I navigate to "Settings" in current page administration
|
|
|
30 |
And I set the following fields to these values:
|
|
|
31 |
| Publish results | Always show results to students |
|
|
|
32 |
| Privacy of results | Publish anonymous results, do not show student names |
|
|
|
33 |
And I press "Save and return to course"
|
|
|
34 |
And I log out
|
|
|
35 |
And I log in as "student1"
|
|
|
36 |
And I am on "Course 1" course homepage
|
|
|
37 |
And I choose "Option 1" from "Choice 1" choice activity
|
|
|
38 |
And I log out
|
|
|
39 |
When I log in as "student2"
|
|
|
40 |
And I am on "Course 1" course homepage
|
|
|
41 |
And I follow "Choice 1"
|
|
|
42 |
Then I should not see "Student 1"
|
|
|
43 |
And I should not see "Users who chose this option"
|
|
|
44 |
|
|
|
45 |
Scenario: Publish full results
|
|
|
46 |
Given the following "activities" exist:
|
|
|
47 |
| activity | name | intro | course | idnumber | option | section |
|
|
|
48 |
| choice | Choice 1 | Choice Description | C1 | choice1 | Option 1, Option 2 | 1 |
|
|
|
49 |
And I am on "Course 1" course homepage
|
|
|
50 |
And I follow "Choice 1"
|
|
|
51 |
And I navigate to "Settings" in current page administration
|
|
|
52 |
And I set the following fields to these values:
|
|
|
53 |
| Publish results | Always show results to students |
|
|
|
54 |
| Privacy of results | Publish full results, showing names and their choices |
|
|
|
55 |
And I press "Save and return to course"
|
|
|
56 |
And I log out
|
|
|
57 |
And I log in as "student1"
|
|
|
58 |
And I am on "Course 1" course homepage
|
|
|
59 |
And I choose "Option 1" from "Choice 1" choice activity
|
|
|
60 |
And I log out
|
|
|
61 |
When I log in as "student2"
|
|
|
62 |
And I am on "Course 1" course homepage
|
|
|
63 |
And I follow "Choice 1"
|
|
|
64 |
Then I should see "Student 1"
|
|
|
65 |
And I should see "Users who chose this option"
|