1 |
efrain |
1 |
@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
|
|
|
2 |
Feature: In an assignment, teacher can view the feedback for a previous attempt.
|
|
|
3 |
In order to see the history of attempts
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to see the previous annotations.
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher, allowing another attempt
|
|
|
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 |
| maxattempts | 0 |
|
|
|
26 |
| assignsubmission_file_enabled | 1 |
|
|
|
27 |
| assignsubmission_file_maxfiles | 2 |
|
|
|
28 |
| assignsubmission_file_maxsizebytes | 102400 |
|
|
|
29 |
| assignfeedback_editpdf_enabled | 1 |
|
|
|
30 |
| submissiondrafts | 0 |
|
|
|
31 |
| attemptreopenmethod | manual |
|
|
|
32 |
And the following "mod_assign > submission" exists:
|
|
|
33 |
| assign | Test assignment name |
|
|
|
34 |
| user | student1 |
|
|
|
35 |
| file | mod/assign/feedback/editpdf/tests/fixtures/submission.pdf, mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf |
|
|
|
36 |
|
|
|
37 |
When I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
38 |
And I follow "View all submissions"
|
|
|
39 |
And I click on "Grade" "link" in the "Submitted for grading" "table_row"
|
|
|
40 |
Then I should see "Page 1 of 3"
|
|
|
41 |
And I click on ".navigate-next-button" "css_element"
|
|
|
42 |
And I should see "Page 2 of 3"
|
|
|
43 |
And I click on ".stampbutton" "css_element"
|
|
|
44 |
And I draw on the pdf
|
|
|
45 |
And I wait until the page is ready
|
|
|
46 |
And I set the field "Allow another attempt" to "Yes"
|
|
|
47 |
And I press "Save changes"
|
|
|
48 |
And I wait until the page is ready
|
|
|
49 |
And I should see "The changes to the grade and feedback were saved"
|
|
|
50 |
And I follow "View a different attempt"
|
|
|
51 |
And I click on "Attempt 1" "radio" in the "View a different attempt" "dialogue"
|
|
|
52 |
And I press "View"
|
|
|
53 |
And I wait until the page is ready
|
|
|
54 |
And I should see "You are editing the feedback for a previous attempt. This is attempt 1 out of 2."
|
|
|
55 |
And I should see "Page 1 of 3"
|