Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_survey
2
Feature: Viewing response reports by group
3
  In order to view reponse reports on a large course
4
  As a teacher
5
  I need to filter the users on the response reports by group
6
 
7
  Background:
8
    And the following "courses" exist:
9
      | fullname      | shortname |
10
      | Test Course 1 | C1        |
11
    And the following "groups" exist:
12
      | name    | course | idnumber | participation |
13
      | Group 1 | C1     | G1       | 1             |
14
      | Group 2 | C1     | G2       | 1             |
15
      | Group 3 | C1     | G3       | 0             |
16
    And the following "users" exist:
17
      | username   | firstname     | lastname | email                  |
18
      | teacher1   | TeacherG1     | 1        | teacher1@example.com   |
19
      | noneditor1 | NoneditorG1   | 1        | noneditor1@example.com |
20
      | noneditor2 | NoneditorNone | 2        | noneditor2@example.com |
21
      | user1      | User1G1       | 1        | user1@example.com      |
22
      | user2      | User2G2       | 2        | user2@example.com      |
23
      | user3      | User3None     | 3        | user3@example.com      |
24
      | user4      | User4NPgroup  | 4        | user4@example.com      |
25
    And the following "course enrolments" exist:
26
      | user       | course | role           |
27
      | teacher1   | C1     | editingteacher |
28
      | noneditor1 | C1     | teacher        |
29
      | noneditor2 | C1     | teacher        |
30
      | user1      | C1     | student        |
31
      | user2      | C1     | student        |
32
      | user3      | C1     | student        |
33
      | user4      | C1     | student        |
34
    And the following "group members" exist:
35
      | user       | group |
36
      | teacher1   | G1    |
37
      | noneditor1 | G1    |
38
      | user1      | G1    |
39
      | user2      | G2    |
40
      | user4      | G3    |
41
    And I enable "survey" "mod" plugin
42
    And the following "activities" exist:
43
      | activity   | name            | intro                       | course | idnumber   | groupmode | template |
44
      | survey     | Separate survey | survey with separate groups | C1     | survey1    | 1         | 5        |
45
      | survey     | Visible survey  | survey with visible groups  | C1     | survey2    | 2         | 5        |
46
    And I am on the "Separate survey" "survey activity" page logged in as user1
47
    And I press "Submit"
48
    And I am on the "Separate survey" "survey activity" page logged in as user2
49
    And I press "Submit"
50
    And I am on the "Separate survey" "survey activity" page logged in as user3
51
    And I press "Submit"
52
    And I am on the "Separate survey" "survey activity" page logged in as user4
53
    And I press "Submit"
54
    And I am on the "Visible survey" "survey activity" page logged in as user1
55
    And I press "Submit"
56
    And I am on the "Visible survey" "survey activity" page logged in as user2
57
    And I press "Submit"
58
    And I am on the "Visible survey" "survey activity" page logged in as user3
59
    And I press "Submit"
60
    And I am on the "Visible survey" "survey activity" page logged in as user4
61
    And I press "Submit"
62
 
63
  Scenario Outline: Editing teachers should see all groups on the Results page. Non-editing teachers should see just their own
64
    groups in Separate groups mode, all groups in Visible groups mode.
65
    Given I am on the "<survey>" "survey activity" page logged in as "<user>"
66
    And I follow "Response reports"
67
    Then I <all> see "All participants"
68
    And I <G1> see "Group 1"
69
    And I <G2> see "Group 2"
70
    And I should not see "Group 3"
71
    And I <user1> see "User1G1"
72
    And I <user2> see "User2G2"
73
    And I <user3> see "User3None"
74
    And I <user4> see "User4NPgroup"
75
 
76
    Examples:
77
      | survey  | user       | all        | G1         | G2         | user1  | user2      | user3      | user4      |
78
      | survey1 | teacher1   | should     | should     | should     | should | should     | should     | should     |
79
      | survey1 | noneditor1 | should not | should     | should not | should | should not | should not | should not |
80
      | survey2 | teacher1   | should     | should     | should     | should | should     | should     | should     |
81
      | survey2 | noneditor1 | should     | should     | should     | should | should not | should not | should not |
82
      | survey2 | noneditor2 | should     | should     | should     | should | should not | should not | should not |
83
 
84
  Scenario: Non-editing teacher without access to any groups should not see survey results in separate groups mode
85
    Given I am on the "survey1" "survey activity" page logged in as "noneditor2"
86
    Then I should not see "Response reports"