1 |
efrain |
1 |
@mod @mod_assign
|
|
|
2 |
Feature: Submissions are unlocked when a new attempt is given
|
|
|
3 |
In order to allow students to reattempt a locked submission
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to use quick grading to grant a new submission
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
|
|
|
20 |
@javascript
|
|
|
21 |
Scenario: A locked submission should unlock when a new attempt is automatically given.
|
|
|
22 |
Given the following "activity" exists:
|
|
|
23 |
| activity | assign |
|
|
|
24 |
| course | C1 |
|
|
|
25 |
| name | Test assignment name |
|
|
|
26 |
| submissiondrafts | 0 |
|
|
|
27 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
28 |
| attemptreopenmethod | untilpass |
|
|
|
29 |
| gradepass | 50 |
|
|
|
30 |
| submissiondrafts | 0 |
|
|
|
31 |
And the following "mod_assign > submissions" exist:
|
|
|
32 |
| assign | user | onlinetext |
|
|
|
33 |
| Test assignment name | student1 | I'm the student1 submission |
|
|
|
34 |
|
|
|
35 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
36 |
And I follow "View all submissions"
|
|
|
37 |
And I open the action menu in "Student 1" "table_row"
|
|
|
38 |
And I follow "Prevent submission changes"
|
|
|
39 |
And I should see "Submission changes not allowed"
|
|
|
40 |
And I click on "Quick grading" "checkbox"
|
|
|
41 |
And I set the field "User grade" to "49.0"
|
|
|
42 |
And I press "Save all quick grading changes"
|
|
|
43 |
And I should see "The grade changes were saved"
|
|
|
44 |
And I press "Continue"
|
|
|
45 |
Then I should see "Reopened"
|
|
|
46 |
And I should not see "Submission changes not allowed"
|
|
|
47 |
|
|
|
48 |
@javascript
|
|
|
49 |
Scenario: A locked submission should unlock when a new attempt is manually given.
|
|
|
50 |
Given the following "activity" exists:
|
|
|
51 |
| activity | assign |
|
|
|
52 |
| course | C1 |
|
|
|
53 |
| name | Test assignment name |
|
|
|
54 |
| submissiondrafts | 0 |
|
|
|
55 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
56 |
| attemptreopenmethod | manual |
|
|
|
57 |
And the following "mod_assign > submissions" exist:
|
|
|
58 |
| assign | user | onlinetext |
|
|
|
59 |
| Test assignment name | student1 | I'm the student1 submission |
|
|
|
60 |
|
|
|
61 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
62 |
And I follow "View all submissions"
|
|
|
63 |
When I open the action menu in "Student 1" "table_row"
|
|
|
64 |
And I follow "Prevent submission changes"
|
|
|
65 |
Then I should see "Submission changes not allowed"
|
|
|
66 |
And I open the action menu in "Student 1" "table_row"
|
|
|
67 |
And I follow "Allow another attempt"
|
|
|
68 |
And I should see "Reopened"
|
|
|
69 |
And I should not see "Submission changes not allowed"
|