1 |
efrain |
1 |
@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
|
|
|
2 |
Feature: In a group assignment, teacher can annotate PDF files for all users
|
|
|
3 |
In order to provide visual report on a graded PDF for all users
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to use the PDF editor for a group assignment
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given ghostscript is installed
|
|
|
9 |
And the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | groupmode |
|
|
|
11 |
| Course 1 | C1 | 0 | 1 |
|
|
|
12 |
And the following "users" exist:
|
|
|
13 |
| username | firstname | lastname | email |
|
|
|
14 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
15 |
| student1 | Student | 1 | student1@example.com |
|
|
|
16 |
| student2 | Student | 2 | student2@example.com |
|
|
|
17 |
And the following "course enrolments" exist:
|
|
|
18 |
| user | course | role |
|
|
|
19 |
| teacher1 | C1 | editingteacher |
|
|
|
20 |
| student1 | C1 | student |
|
|
|
21 |
| student2 | C1 | student |
|
|
|
22 |
And the following "groups" exist:
|
|
|
23 |
| name | course | idnumber |
|
|
|
24 |
| G1 | C1 | G1 |
|
|
|
25 |
And the following "group members" exist:
|
|
|
26 |
| user | group |
|
|
|
27 |
| student1 | G1 |
|
|
|
28 |
| student2 | G1 |
|
|
|
29 |
And the following "activity" exists:
|
|
|
30 |
| activity | assign |
|
|
|
31 |
| course | C1 |
|
|
|
32 |
| name | Test assignment name |
|
|
|
33 |
| assignsubmission_file_enabled | 1 |
|
|
|
34 |
| assignsubmission_file_maxfiles | 1 |
|
|
|
35 |
| assignsubmission_file_maxsizebytes | 102400 |
|
|
|
36 |
| assignfeedback_editpdf_enabled | 1 |
|
|
|
37 |
| submissiondrafts | 0 |
|
|
|
38 |
| teamsubmission | 1 |
|
|
|
39 |
And the following "mod_assign > submission" exists:
|
|
|
40 |
| assign | Test assignment name |
|
|
|
41 |
| user | student1 |
|
|
|
42 |
| file | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf |
|
|
|
43 |
|
|
|
44 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
45 |
And I follow "View all submissions"
|
|
|
46 |
And I click on "Grade" "link" in the "Submitted for grading" "table_row"
|
|
|
47 |
And I wait for the complete PDF to load
|
|
|
48 |
And I click on ".navigate-next-button" "css_element"
|
|
|
49 |
And I wait until the page is ready
|
|
|
50 |
And I click on ".stampbutton" "css_element"
|
|
|
51 |
And I draw on the pdf
|
|
|
52 |
And I wait until the page is ready
|
|
|
53 |
|
|
|
54 |
@javascript
|
|
|
55 |
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
|
|
|
56 |
Given I set the field "applytoall" to "0"
|
|
|
57 |
And I press "Save changes"
|
|
|
58 |
And I should see "The changes to the grade and feedback were saved"
|
|
|
59 |
And I click on "Edit settings" "link"
|
|
|
60 |
And I log out
|
|
|
61 |
And I am on the "Test assignment name" Activity page logged in as student1
|
|
|
62 |
When I follow "View annotated PDF..."
|
|
|
63 |
Then I should see "Annotate PDF"
|
|
|
64 |
And I wait until the page is ready
|
|
|
65 |
And I click on "Close" "button" in the "Annotate PDF" "dialogue"
|
|
|
66 |
And I log out
|
|
|
67 |
And I am on the "Test assignment name" Activity page logged in as student2
|
|
|
68 |
And I should not see "View annotated PDF..."
|
|
|
69 |
|
|
|
70 |
@javascript
|
|
|
71 |
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher and all students in the group get a copy of the annotated PDF.
|
|
|
72 |
Given I press "Save changes"
|
|
|
73 |
And I should see "The changes to the grade and feedback were saved"
|
|
|
74 |
And I am on the "Test assignment name" Activity page
|
|
|
75 |
And I log out
|
|
|
76 |
And I am on the "Test assignment name" Activity page logged in as student1
|
|
|
77 |
When I follow "View annotated PDF..."
|
|
|
78 |
And I change window size to "large"
|
|
|
79 |
Then I should see "Annotate PDF"
|
|
|
80 |
And I change window size to "medium"
|
|
|
81 |
And I wait until the page is ready
|
|
|
82 |
And I click on "Close" "button" in the "Annotate PDF" "dialogue"
|
|
|
83 |
And I log out
|
|
|
84 |
|
|
|
85 |
And I am on the "Test assignment name" Activity page logged in as student2
|
|
|
86 |
And I should see "View annotated PDF..."
|