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
5
I need to use the PDF editor
8
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher
9
Given ghostscript is installed
10
And the following "courses" exists:
11
| fullname | shortname | category | groupmode |
12
| Course 1 | C1 | 0 | 1 |
13
And the following "users" exists:
14
| username | firstname | lastname | email |
15
| teacher1 | Teacher | 1 | teacher1@asd.com |
16
| student1 | Student | 1 | student1@asd.com |
17
And the following "course enrolments" exists:
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"
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 |
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"
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"