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_assign @assignfeedback @assignfeedback_editpdf @_file_upload
2
Feature: In an assignment, teacher can annotate PDF files during grading
3
  In order to provide visual report on a graded PDF
4
  As a teacher
5
  I need to use the PDF editor
6
 
7
  @javascript
8
  Scenario: Submit a PDF file as a student and annotate the PDF as a teacher then overwrite the submission as a student
9
    Given ghostscript is installed
10
    And the following "courses" exist:
11
      | fullname | shortname | category | groupmode |
12
      | Course 1 | C1 | 0 | 1 |
13
    And the following "users" exist:
14
      | username | firstname | lastname | email |
15
      | teacher1 | Teacher | 1 | teacher1@example.com |
16
      | student1 | Student | 1 | student1@example.com |
17
    And the following "course enrolments" exist:
18
      | user | course | role |
19
      | teacher1 | C1 | editingteacher |
20
      | student1 | C1 | student |
21
    And the following "activity" exists:
22
      | activity                            | assign                |
23
      | course                              | C1                    |
24
      | name                                | Test assignment name  |
25
      | assignfeedback_editpdf_enabled      | 1                     |
26
      | assignfeedback_comments_enabled     | 1                     |
27
      | assignsubmission_file_enabled       | 1                     |
28
      | assignsubmission_file_maxfiles      | 2                     |
29
      | assignsubmission_file_maxsizebytes  | 102400                |
30
      | maxfilessubmission                  | 2                     |
31
      | submissiondrafts                    | 0                     |
32
    And the following "mod_assign > submission" exists:
33
      | assign  | Test assignment name                                       |
34
      | user    | student1                                                   |
35
      | file    | mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf  |
36
 
37
    When I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 38
    And I change window size to "large"
39
    And I go to "Submitted for grading" "Test assignment name" activity advanced grading page
40
    And I change window size to "medium"
1 efrain 41
    Then I should see "Page 1 of 1"
42
    And I wait for the complete PDF to load
43
    And I click on ".linebutton" "css_element"
44
    And I draw on the pdf
45
    And I press "Save changes"
46
    And I should see "The changes to the grade and feedback were saved"
47
    And I am on the "Test assignment name" Activity page logged in as student1
48
    And I follow "View annotated PDF..."
49
    Then I should see "Page 1 of 1"
50
    And I click on ".closebutton" "css_element"
51
    And I press "Edit submission"
52
    And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager
53
    And I press "Save changes"
54
    And I follow "View annotated PDF..."
55
    Then I should see "Page 1 of 1"
56
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 57
    And I change window size to "large"
58
    And I go to "Submitted for grading" "Test assignment name" activity advanced grading page
59
    And I change window size to "medium"
1 efrain 60
    Then I should see "Page 1 of 3"
61
    And I wait for the complete PDF to load
62
    And I click on ".linebutton" "css_element"
63
    And I draw on the pdf
64
    And I press "Save changes"
65
    And I should see "The changes to the grade and feedback were saved"
66
    And I am on the "Test assignment name" Activity page logged in as student1
67
    And I follow "View annotated PDF..."
68
    Then I should see "Page 1 of 3"
69
 
70
  @javascript
71
  Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
72
    Given ghostscript is installed
73
    And the following "courses" exist:
74
      | fullname | shortname | category | groupmode |
75
      | Course 1 | C1 | 0 | 1 |
76
    And the following "users" exist:
77
      | username | firstname | lastname | email |
78
      | teacher1 | Teacher | 1 | teacher1@example.com |
79
      | student1 | Student | 1 | student1@example.com |
80
    And the following "course enrolments" exist:
81
      | user | course | role |
82
      | teacher1 | C1 | editingteacher |
83
      | student1 | C1 | student |
84
    And the following "activity" exists:
85
      | activity                            | assign                |
86
      | course                              | C1                    |
87
      | name                                | Test assignment name  |
88
      | assignfeedback_editpdf_enabled      | 1                     |
89
      | assignfeedback_comments_enabled     | 1                     |
90
      | assignsubmission_file_enabled       | 1                     |
91
      | assignsubmission_file_maxfiles      | 2                     |
92
      | assignsubmission_file_maxsizebytes  | 102400                |
93
      | maxfilessubmission                  | 2                     |
94
      | submissiondrafts                    | 0                     |
95
    And the following "mod_assign > submission" exists:
96
      | assign  | Test assignment name                                                                                              |
97
      | user    | student1                                                                                                          |
98
      | file    | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf, mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf  |
99
    And I log in as "admin"
100
    And I am on site homepage
101
    And I navigate to "Plugins > Activity modules > Assignment > Feedback plugins > Annotate PDF" in site administration
1441 ariadna 102
    And I upload "pix/moodlelogo.png" file to "" filemanager
103
    And I upload "pix/i/test.png" file to "" filemanager
1 efrain 104
    And I press "Save changes"
105
    And I should see "Changes saved"
106
    And I follow "Test ghostscript path"
107
    And I should see "The ghostscript path appears to be OK"
108
    And I am on site homepage
109
    And I log out
110
 
111
    When I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 112
    And I change window size to "large"
113
    And I go to "Submitted for grading" "Test assignment name" activity advanced grading page
114
    And I change window size to "medium"
1 efrain 115
    Then I should see "Page 1 of 3"
116
    And I click on ".navigate-next-button" "css_element"
117
    And I should see "Page 2 of 3"
118
    And I click on ".stampbutton" "css_element"
119
    And I click on ".linebutton" "css_element"
120
    And I click on ".commentcolourbutton" "css_element"
121
    And I click on "//img[@alt=\"Blue\"]/parent::button" "xpath_element"
122
    And I wait until the page is ready
123
    And I press "Save changes"
124
    And I wait until the page is ready
125
    And I should see "The changes to the grade and feedback were saved"
126
 
127
  @javascript
128
  Scenario: Submit a PDF file as a student in a team and annotate the PDF as a teacher
129
    Given ghostscript is installed
130
    And the following "courses" exist:
131
      | fullname | shortname | category | groupmode |
132
      | Course 1 | C1 | 0 | 1 |
133
    And the following "users" exist:
134
      | username | firstname | lastname | email |
135
      | teacher1 | Teacher | 1 | teacher1@example.com |
136
      | student1 | Student | 1 | student1@example.com |
137
      | student2 | Student | 2 | student2@example.com |
138
      | student3 | Student | 3 | student3@example.com |
139
      | student4 | Student | 4 | student4@example.com |
140
    And the following "course enrolments" exist:
141
      | user | course | role |
142
      | teacher1 | C1 | editingteacher |
143
      | student1 | C1 | student |
144
      | student2 | C1 | student |
145
      | student3 | C1 | student |
146
      | student4 | C1 | student |
147
    And the following "groups" exist:
148
      | name | course | idnumber |
149
      | G1 | C1 | G1 |
150
      | G2 | C1 | G2 |
151
    And the following "groupings" exist:
152
      | name | course | idnumber |
153
      | G1   | C1     | G1       |
154
    And the following "group members" exist:
155
      | user        | group |
156
      | student1    | G1  |
157
      | student2    | G1  |
158
      | student3    | G2  |
159
      | student4    | G2  |
160
    And the following "grouping groups" exist:
161
      | grouping | group |
162
      | G1       | G1    |
163
      | G1       | G2    |
164
    And the following "activity" exists:
165
      | activity                            | assign                |
166
      | course                              | C1                    |
167
      | name                                | Test assignment name  |
168
      | assignfeedback_comments_enabled     | 1                     |
169
      | assignfeedback_editpdf_enabled      | 1                     |
170
      | assignsubmission_file_enabled       | 1                     |
171
      | assignsubmission_file_maxfiles      | 2                     |
172
      | assignsubmission_file_maxsizebytes  | 102400                |
173
      | maxfilessubmission                  | 2                     |
174
      | teamsubmission                      | 1                     |
175
      | grouping                            | G1                    |
176
      | submissiondrafts                    | 0                     |
177
    And the following "mod_assign > submission" exists:
178
      | assign  | Test assignment name                                       |
179
      | user    | student1                                                   |
180
      | file    | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf  |
181
 
182
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 183
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 184
    And I wait for the complete PDF to load
185
    And I click on ".linebutton" "css_element"
186
    And I draw on the pdf
187
    And I press "Save changes"
188
    And I should see "The changes to the grade and feedback were saved"
189
    And I follow "View all submissions"
190
    And I should see "View annotated PDF..." in the "student2@example.com" "table_row"