Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_choice
2
Feature: Include responses from inactive users
3
  In order to view responses from inactive or suspended users in choice results
4
  As a teacher
5
  I need to enable the choice include inactive 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
      | student3 | Student | 3 | student3@example.com |
14
    And the following "courses" exist:
15
      | fullname | shortname | category |
16
      | Course 1 | C1 | 0 |
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
 
24
  Scenario: Enable the choice include inactive option and check that responses from inactive students are visible
25
    Given the following "activity" exists:
26
      | activity        | choice                       |
27
      | course          | C1                           |
28
      | idnumber        | choice1                      |
29
      | name            | Choice name                  |
30
      | intro           | Choice Description           |
31
      | section         | 1                            |
32
      | option          | Option 1, Option 2, Option 3 |
33
      | includeinactive | 1                            |
34
    And I log in as "student1"
35
    And I am on "Course 1" course homepage
36
    And I choose "Option 1" from "Choice name" choice activity
37
    And I log out
38
    And I log in as "student2"
39
    And I am on "Course 1" course homepage
40
    And I choose "Option 2" from "Choice name" choice activity
41
    And I log out
42
    And I log in as "student3"
43
    And I am on "Course 1" course homepage
44
    And I choose "Option 3" from "Choice name" choice activity
45
    And I log out
46
    And the following "course enrolments" exist:
47
      | user | course | role | status |
48
      | student1 | C1 | student | 1 |
49
    When I log in as "teacher1"
50
    And I am on "Course 1" course homepage
51
    And I click on "Choice name" "link" in the "region-main" "region"
52
    And I navigate to "Responses" in current page administration
53
    Then I should see "Student 1"
54
    And I should see "Student 2"
55
    And I should see "Student 3"
56
    And I log out
57
    And the following "course enrolments" exist:
58
      | user | course | role | timestart |
59
      | student2 | C1 | student | 2145830400 |
60
    When I log in as "teacher1"
61
    And I am on "Course 1" course homepage
62
    And I click on "Choice name" "link" in the "region-main" "region"
63
    Then I navigate to "Responses" in current page administration
64
    And I should see "Student 1"
65
    And I should see "Student 2"
66
    And I should see "Student 3"
67
    And I log out
68
    And the following "course enrolments" exist:
69
      | user | course | role | timeend |
70
      | student3 | C1 | student | 1425168000 |
71
    When I log in as "teacher1"
72
    And I am on "Course 1" course homepage
73
    And I click on "Choice name" "link" in the "region-main" "region"
74
    Then I navigate to "Responses" in current page administration
75
    And I should see "Student 1"
76
    And I should see "Student 2"
77
    And I should see "Student 3"
78
    And I log out
79
 
80
  Scenario: Disable the choice include inactive option and check that responses from inactive students are not visible
81
    Given the following "activity" exists:
82
      | activity        | choice                       |
83
      | course          | C1                           |
84
      | idnumber        | choice1                      |
85
      | name            | Choice name                  |
86
      | intro           | Choice Description           |
87
      | section         | 1                            |
88
      | option          | Option 1, Option 2, Option 3 |
89
      | includeinactive | 0                            |
90
    And I log in as "student1"
91
    And I am on "Course 1" course homepage
92
    And I choose "Option 1" from "Choice name" choice activity
93
    And I log out
94
    And I log in as "student2"
95
    And I am on "Course 1" course homepage
96
    And I choose "Option 2" from "Choice name" choice activity
97
    And I log out
98
    And I log in as "student3"
99
    And I am on "Course 1" course homepage
100
    And I choose "Option 3" from "Choice name" choice activity
101
    And I log out
102
    And the following "course enrolments" exist:
103
      | user | course | role | status |
104
      | student1 | C1 | student | 1 |
105
    When I log in as "teacher1"
106
    And I am on "Course 1" course homepage
107
    And I click on "Choice name" "link" in the "region-main" "region"
108
    Then I navigate to "Responses" in current page administration
109
    And I should not see "Student 1"
110
    And I should see "Student 2"
111
    And I should see "Student 3"
112
    And I log out
113
    And the following "course enrolments" exist:
114
      | user | course | role | timestart |
115
      | student2 | C1 | student | 2145830400 |
116
    When I log in as "teacher1"
117
    And I am on "Course 1" course homepage
118
    And I click on "Choice name" "link" in the "region-main" "region"
119
    Then I navigate to "Responses" in current page administration
120
    And I should not see "Student 1"
121
    And I should not see "Student 2"
122
    And I should see "Student 3"
123
    And I log out
124
    And the following "course enrolments" exist:
125
      | user | course | role | timeend |
126
      | student3 | C1 | student | 1425168000 |
127
    When I log in as "teacher1"
128
    And I am on "Course 1" course homepage
129
    And I click on "Choice name" "link" in the "region-main" "region"
130
    Then I navigate to "Responses" in current page administration
131
    And I should not see "Student 1"
132
    And I should not see "Student 2"
133
    And I should not see "Student 3"
134
    And I log out