Commit | Line | Data |
---|---|---|
ef3bffde | 1 | @mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload |
9e103d6e JM |
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 | |
9 | Given ghostscript is installed | |
7019e15e | 10 | And the following "courses" exist: |
9e103d6e JM |
11 | | fullname | shortname | category | groupmode | |
12 | | Course 1 | C1 | 0 | 1 | | |
7019e15e | 13 | And the following "users" exist: |
9e103d6e | 14 | | username | firstname | lastname | email | |
0fe86bbd RT |
15 | | teacher1 | Teacher | 1 | teacher1@example.com | |
16 | | student1 | Student | 1 | student1@example.com | | |
7019e15e | 17 | And the following "course enrolments" exist: |
9e103d6e JM |
18 | | user | course | role | |
19 | | teacher1 | C1 | editingteacher | | |
20 | | student1 | C1 | student | | |
21 | And I log in as "admin" | |
22 | And I expand "Site administration" node | |
23 | And I expand "Plugins" node | |
24 | And I expand "Activity modules" node | |
25 | And I expand "Assignment" node | |
26 | And I expand "Feedback plugins" node | |
27 | And I follow "Annotate PDF" | |
28 | And I upload "pix/help.png" file to "" filemanager | |
29 | And I upload "pix/docs.png" file to "" filemanager | |
30 | When I press "Save changes" | |
31 | Then I should see "Changes saved" | |
32 | And I follow "Test ghostscript path" | |
33 | And I should see "The ghostscript path appears to be OK" | |
34 | And I log out | |
35 | And I log in as "teacher1" | |
36 | And I follow "Course 1" | |
37 | And I turn editing mode on | |
38 | And I add a "Assignment" to section "1" and I fill the form with: | |
39 | | Assignment name | Test assignment name | | |
40 | | Description | Submit your PDF file | | |
41 | | assignsubmission_file_enabled | 1 | | |
42 | | Maximum number of uploaded files | 2 | | |
43 | And I log out | |
44 | And I log in as "student1" | |
45 | And I follow "Course 1" | |
46 | And I follow "Test assignment name" | |
47 | And I press "Add submission" | |
48 | And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager | |
49 | And I upload "mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf" file to "File submissions" filemanager | |
50 | And I press "Save changes" | |
51 | And I should see "Submitted for grading" | |
52 | And I should see "submission.pdf" | |
53 | And I should see "Not graded" | |
54 | And I log out | |
55 | And I log in as "teacher1" | |
56 | And I follow "Course 1" | |
57 | And I follow "Test assignment name" | |
58 | And I follow "View/grade all submissions" | |
59 | And I click on "Grade" "link" in the "Submitted for grading" "table_row" | |
60 | And I follow "Launch PDF editor..." | |
61 | And I click on ".navigate-next-button" "css_element" | |
62 | And I click on ".stampbutton" "css_element" | |
63 | And I click on ".linebutton" "css_element" | |
64 | And I click on ".commentcolourbutton" "css_element" | |
65 | And I click on "//img[@alt=\"Blue\"]" "xpath_element" | |
66 | And I click on "Close" "button" | |
67 | And I press "Save changes" | |
68 | And I should see "The grade changes were saved" | |
506df250 DW |
69 | |
70 | @javascript | |
71 | Scenario: Submit a PDF file as a student in a team 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 | | |
0fe86bbd RT |
78 | | teacher1 | Teacher | 1 | teacher1@example.com | |
79 | | student1 | Student | 1 | student1@example.com | | |
80 | | student2 | Student | 2 | student2@example.com | | |
81 | | student3 | Student | 3 | student3@example.com | | |
82 | | student4 | Student | 4 | student4@example.com | | |
506df250 DW |
83 | And the following "course enrolments" exist: |
84 | | user | course | role | | |
85 | | teacher1 | C1 | editingteacher | | |
86 | | student1 | C1 | student | | |
87 | | student2 | C1 | student | | |
88 | | student3 | C1 | student | | |
89 | | student4 | C1 | student | | |
90 | And the following "groups" exist: | |
91 | | name | course | idnumber | | |
92 | | G1 | C1 | G1 | | |
93 | | G2 | C1 | G2 | | |
94 | And the following "groupings" exist: | |
95 | | name | course | idnumber | | |
96 | | G1 | C1 | G1 | | |
97 | And the following "group members" exist: | |
98 | | user | group | | |
99 | | student1 | G1 | | |
100 | | student2 | G1 | | |
101 | | student3 | G2 | | |
102 | | student4 | G2 | | |
103 | And the following "grouping groups" exist: | |
104 | | grouping | group | | |
105 | | G1 | G1 | | |
106 | | G1 | G2 | | |
107 | And I log in as "teacher1" | |
108 | And I follow "Course 1" | |
109 | And I turn editing mode on | |
110 | And I add a "Assignment" to section "1" and I fill the form with: | |
111 | | Assignment name | Test assignment name | | |
112 | | Description | Submit your PDF file | | |
113 | | assignsubmission_file_enabled | 1 | | |
114 | | Maximum number of uploaded files | 2 | | |
115 | | Students submit in groups | Yes | | |
116 | | Grouping for student groups | G1 | | |
117 | And I log out | |
118 | When I log in as "student1" | |
119 | And I follow "Course 1" | |
120 | And I follow "Test assignment name" | |
121 | And I press "Add submission" | |
122 | And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager | |
123 | And I press "Save changes" | |
124 | Then I should see "Submitted for grading" | |
125 | And I should see "submission.pdf" | |
126 | And I should see "Not graded" | |
127 | And I log out | |
128 | And I log in as "teacher1" | |
129 | And I follow "Course 1" | |
130 | And I follow "Test assignment name" | |
131 | And I follow "View/grade all submissions" | |
132 | And I click on "Grade" "link" in the "Student 2" "table_row" | |
133 | And I follow "Launch PDF editor..." | |
e9671116 | 134 | And I change window size to "large" |
47ff1cd9 FM |
135 | And I click on ".stampbutton" "css_element" |
136 | And I click on ".drawingcanvas" "css_element" | |
506df250 DW |
137 | And I click on "Close" "button" |
138 | And I press "Save changes" | |
139 | And I should see "The grade changes were saved" | |
140 | And I press "Continue" | |
0fe86bbd | 141 | And I should see "View annotated PDF..." in the "student1@example.com" "table_row" |