MDL-47475 mod_assign: Copy files to other group members for editpdf
[moodle.git] / mod / assign / feedback / editpdf / tests / behat / group_annotations.feature
CommitLineData
9b65a080
AN
1@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
2Feature: 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 @javascript
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" 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 | student2 | Student | 2 | student2@example.com |
18 And the following "course enrolments" exist:
19 | user | course | role |
20 | teacher1 | C1 | editingteacher |
21 | student1 | C1 | student |
22 | student2 | C1 | student |
23 And the following "groups" exist:
24 | name | course | idnumber |
25 | G1 | C1 | G1 |
26 And the following "group members" exist:
27 | user | group |
28 | student1 | G1 |
29 | student2 | G1 |
30 And I log in as "teacher1"
31 And I follow "Course 1"
32 And I turn editing mode on
33 And I add a "Assignment" to section "1" and I fill the form with:
34 | Assignment name | Test assignment name |
35 | Description | Submit your PDF file |
36 | assignsubmission_file_enabled | 1 |
37 | Maximum number of uploaded files | 1 |
38 | Students submit in groups | Yes |
39 And I log out
40 And I log in as "student1"
41 And I follow "Course 1"
42 And I follow "Test assignment name"
43 And I press "Add submission"
44 And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager
45 And I press "Save changes"
46 And I should see "Submitted for grading"
47 And I should see "submission.pdf"
48 And I should see "Not graded"
49 And I log out
50 And I log in as "teacher1"
51 And I follow "Course 1"
52 And I follow "Test assignment name"
53 And I follow "View/grade all submissions"
54 And I click on "Grade" "link" in the "Submitted for grading" "table_row"
55 And I follow "Launch PDF editor..."
56 And I click on ".navigate-next-button" "css_element"
57 And I click on ".stampbutton" "css_element"
58 And I click on ".drawingcanvas" "css_element"
59 And I click on "Close" "button"
60 And I press "Save changes"
61 And I should see "The grade changes were saved"
62 And I log out
63 And I log in as "student1"
64 And I follow "Course 1"
65 And I follow "Test assignment name"
66 When I follow "View annotated PDF..."
67 Then I should see "Annotate PDF"
68 And I click on "Close" "button"
69 And I log out
70 And I log in as "student2"
71 And I follow "Course 1"
72 And I follow "Test assignment name"
73 And I follow "View annotated PDF..."
74 And I should see "Annotate PDF"