Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_url @core_completion
2
Feature: View activity completion information in the URL resource
3
  In order to have visibility of URL completion requirements
4
  As a student
5
  I need to be able to view my URL completion progress
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                |
10
      | student1 | Vinnie    | Student1 | student1@example.com |
11
      | teacher1 | Darrell   | Teacher1 | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category | enablecompletion | showcompletionconditions |
14
      | Course 1 | C1        | 0        | 1                | 1                        |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | student1 | C1     | student        |
18
      | teacher1 | C1     | editingteacher |
19
    And the following config values are set as admin:
20
      | displayoptions | 0,1,2,3,4,5,6 | url |
21
 
1441 ariadna 22
  Scenario: URL resource module displays completion conditions to teachers
1 efrain 23
    Given the following "activity" exists:
24
      | activity       | url                 |
25
      | course         | C1                  |
26
      | idnumber       | Music history       |
27
      | name           | Music history       |
28
      | intro          | URL description     |
29
      | externalurl    | https://moodle.org/ |
30
      | completion     | 2                   |
31
      | completionview | 1                   |
32
      | display        | 0                   |
33
    When I am on the "Music history" "url activity" page logged in as teacher1
34
    Then "Music history" "link" should exist
35
    And I should see "Click on Music history to open the resource."
36
    And "Music history" should have the "View" completion condition
37
 
1441 ariadna 38
  Scenario: A student can complete a URL activity by viewing it
1 efrain 39
    Given the following "activity" exists:
40
      | activity       | url                 |
41
      | course         | C1                  |
42
      | idnumber       | Music history       |
43
      | name           | Music history       |
44
      | intro          | URL description     |
45
      | externalurl    | https://moodle.org/ |
46
      | completion     | 2                   |
47
      | completionview | 1                   |
48
      | display        | 0                   |
49
    When I am on the "Music history" "url activity" page logged in as student1
50
    Then the "View" completion condition of "Music history" is displayed as "done"
51
 
1441 ariadna 52
  Scenario: A teacher can view a URL activity completion conditions in embed display mode
1 efrain 53
    Given the following "activity" exists:
54
      | activity       | url                 |
55
      | course         | C1                  |
56
      | idnumber       | Music history       |
57
      | name           | Music history       |
58
      | intro          | URL description     |
59
      | externalurl    | https://moodle.org/ |
60
      | completion     | 2                   |
61
      | completionview | 1                   |
62
      | display        | 1                   |
63
    When I am on the "Music history" "url activity" page logged in as teacher1
64
    Then "Music history" should have the "View" completion condition
65
 
1441 ariadna 66
  Scenario: A student can complete a url resource by viewing it in embed display mode
1 efrain 67
    Given the following "activity" exists:
68
      | activity       | url                 |
69
      | course         | C1                  |
70
      | idnumber       | Music history       |
71
      | name           | Music history       |
72
      | intro          | URL description     |
73
      | externalurl    | https://moodle.org/ |
74
      | completion     | 2                   |
75
      | completionview | 1                   |
76
      | display        | 1                   |
77
    When I am on the "Music history" "url activity" page logged in as student1
78
    Then the "View" completion condition of "Music history" is displayed as "done"
79
 
80
  @javascript
1441 ariadna 81
  Scenario: A teacher can view url resource automatic completion items in open display mode as teacher
1 efrain 82
    Given the following "activity" exists:
83
      | activity       | url                 |
84
      | course         | C1                  |
85
      | idnumber       | Music history       |
86
      | name           | Music history       |
87
      | intro          | URL description     |
88
      | externalurl    | https://moodle.org/ |
89
      | completion     | 2                   |
90
      | completionview | 1                   |
91
      | display        | 5                   |
92
    When I am on the "Music history" "url activity" page logged in as teacher1
93
    And I am on the "Course 1" course page
94
    Then "Music history" should have the "View" completion condition
95
 
96
  @javascript
1441 ariadna 97
  Scenario: A student can view url resource automatic completion items in open display mode
1 efrain 98
    Given the following "activity" exists:
99
      | activity       | url                 |
100
      | course         | C1                  |
101
      | idnumber       | Music history       |
102
      | name           | Music history       |
103
      | intro          | URL description     |
104
      | externalurl    | https://moodle.org/ |
105
      | completion     | 2                   |
106
      | completionview | 1                   |
107
      | display        | 5                   |
108
    When I am on the "Music history" "url activity" page logged in as student1
109
    And I am on the "Course 1" course page
110
    Then the "View" completion condition of "Music history" is displayed as "done"
111
 
1441 ariadna 112
  Scenario: An URL resource shows automatic completion conditions in pop-up display mode as teacher
1 efrain 113
    Given the following "activity" exists:
114
      | activity       | url                 |
115
      | course         | C1                  |
116
      | idnumber       | Music history       |
117
      | name           | Music history       |
118
      | intro          | URL description     |
119
      | externalurl    | https://moodle.org/ |
120
      | completion     | 2                   |
121
      | completionview | 1                   |
122
      | display        | 6                   |
123
      | popupwidth     | 620                 |
124
      | popupheight    | 450                 |
125
    When I am on the "Music history" "url activity" page logged in as student1
126
    Then "Music history" should have the "View" completion condition
127
 
1441 ariadna 128
  Scenario: View url resource automatic completion conditions in pop-up display mode as student
1 efrain 129
    Given the following "activity" exists:
130
      | activity       | url                 |
131
      | course         | C1                  |
132
      | idnumber       | Music history       |
133
      | name           | Music history       |
134
      | intro          | URL description     |
135
      | externalurl    | https://moodle.org/ |
136
      | completion     | 2                   |
137
      | completionview | 1                   |
138
      | display        | 6                   |
139
      | popupwidth     | 620                 |
140
      | popupheight    | 450                 |
141
    When I am on the "Music history" "url activity" page logged in as student1
142
    Then the "View" completion condition of "Music history" is displayed as "done"
143
 
144
  @javascript
1441 ariadna 145
  Scenario: A teacher cannot manually mark the url activity as done
1 efrain 146
    Given the following "activity" exists:
147
      | activity       | url                 |
148
      | course         | C1                  |
149
      | idnumber       | Music history       |
150
      | name           | Music history       |
151
      | intro          | URL description     |
152
      | externalurl    | https://moodle.org/ |
153
      | completion     | 1                   |
154
      | completionview | 1                   |
155
      | display        | 0                   |
156
    When I am on the "Music history" "url activity" page logged in as teacher1
157
    Then the manual completion button for "Music history" should be disabled
158
 
159
  @javascript
1441 ariadna 160
  Scenario: A student can manually mark the url activity as done
1 efrain 161
    Given the following "activity" exists:
162
      | activity       | url                 |
163
      | course         | C1                  |
164
      | idnumber       | Music history       |
165
      | name           | Music history       |
166
      | intro          | URL description     |
167
      | externalurl    | https://moodle.org/ |
168
      | completion     | 1                   |
169
      | completionview | 1                   |
170
      | display        | 0                   |
171
    When I am on the "Course 1" course page logged in as student1
172
    Then the manual completion button of "Music history" is displayed as "Mark as done"
173
    And I toggle the manual completion state of "Music history"
174
    And the manual completion button of "Music history" is displayed as "Done"
175
 
176
  @javascript
177
  Scenario Outline: The Mark as done completion condition will be shown on the course page for Open, In pop-up and New window display mode if the Show activity completion conditions is set to No as teacher
178
    Given the following "activity" exists:
179
      | activity       | url                 |
180
      | course         | C1                  |
181
      | idnumber       | Music history       |
182
      | name           | Music history       |
183
      | intro          | URL description     |
184
      | externalurl    | https://moodle.org/ |
185
      | completion     | 1                   |
186
      | completionview | 1                   |
187
      | display        | <display>           |
188
      | popupwidth     | 620                 |
189
      | popupheight    | 450                 |
190
    When I am on the "Course 1" course page logged in as teacher1
191
    Then "Music history" should have the "Mark as done" completion condition
192
 
193
    Examples:
194
      | display | description |
195
      | 0       | Auto        |
196
      | 6       | Popup       |
197
      | 3       | New         |
198
 
199
  @javascript
200
  Scenario Outline: The manual completion button will be shown on the course page for Open, In pop-up and New window display mode if the Show activity completion conditions is set to No as student
201
    Given the following "activity" exists:
202
      | activity       | url                 |
203
      | course         | C1                  |
204
      | idnumber       | Music history       |
205
      | name           | Music history       |
206
      | intro          | URL description     |
207
      | externalurl    | https://moodle.org/ |
208
      | completion     | 1                   |
209
      | completionview | 1                   |
210
      | display        | <display>           |
211
      | popupwidth     | 620                 |
212
      | popupheight    | 450                 |
213
    When I am on the "Course 1" course page logged in as student1
214
    Then the manual completion button for "Music history" should exist
215
    And the manual completion button of "Music history" is displayed as "Mark as done"
216
    And I toggle the manual completion state of "Music history"
217
    And the manual completion button of "Music history" is displayed as "Done"
218
 
219
    Examples:
220
      | display | description |
221
      | 0       | Auto        |
222
      | 6       | Popup       |
223
      | 3       | New         |