1 |
efrain |
1 |
@gradingform @gradingform_guide
|
|
|
2 |
Feature: Teacher can delete marking guide
|
|
|
3 |
As a teacher,
|
|
|
4 |
I should be able to delete a marking guide
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "users" exist:
|
|
|
8 |
| username | firstname | lastname | email |
|
|
|
9 |
| teacher1 | Teacher | One | teacher1@example.com |
|
11 |
efrain |
10 |
| student1 | Student | One | student1@example.com |
|
1 |
efrain |
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | topics |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
11 |
efrain |
17 |
| student1 | C1 | student |
|
1 |
efrain |
18 |
And the following "activities" exist:
|
|
|
19 |
| activity | course | name | advancedgradingmethod_submissions |
|
|
|
20 |
| assign | C1 | Assign 1 | guide |
|
|
|
21 |
And I am on the "Course 1" course page logged in as teacher1
|
|
|
22 |
And I go to "Assign 1" advanced grading definition page
|
|
|
23 |
And I set the following fields to these values:
|
|
|
24 |
| Name | Marking guide 1 |
|
|
|
25 |
And I define the following marking guide:
|
|
|
26 |
| Criterion name | Description for students | Description for markers | Maximum score |
|
|
|
27 |
| Criterion 1 | Criterion 1 description for student | Criterion 1 description for markers | 100 |
|
|
|
28 |
And I press "Save marking guide and make it ready"
|
|
|
29 |
|
11 |
efrain |
30 |
@javascript
|
1 |
efrain |
31 |
Scenario: Delete a marking guide
|
11 |
efrain |
32 |
Given I am on the "Assign 1" "assign activity" page
|
|
|
33 |
And I go to "Student One" "Assign 1" activity advanced grading page
|
|
|
34 |
And I grade by filling the marking guide with:
|
|
|
35 |
| Criterion 1 | 70 | Well done! |
|
|
|
36 |
And I press "Save changes"
|
1 |
efrain |
37 |
And I go to "Assign 1" advanced grading page
|
|
|
38 |
When I click on "Delete the currently defined form" "link"
|
11 |
efrain |
39 |
Then I should see "You are going to delete the grading form 'Marking guide 1' and all the associated information from 'Assign 1 (Submissions)'"
|
1 |
efrain |
40 |
And I press "Cancel"
|
|
|
41 |
# Confirm that marking guide was not deleted if Cancel is pressed
|
11 |
efrain |
42 |
And I should see "Marking guide 1 Ready for use"
|
1 |
efrain |
43 |
And I should see "Criterion 1"
|
|
|
44 |
And I click on "Delete the currently defined form" "link"
|
|
|
45 |
And I press "Continue"
|
|
|
46 |
# Confirm that marking guide was deleted successfully if Continue is pressed
|
|
|
47 |
And I should see "Please note: the advanced grading form is not ready at the moment. Simple grading method will be used until the form has a valid status."
|
|
|
48 |
And I should not see "Marking guide 1 Ready for use"
|
|
|
49 |
And I should not see "Criterion 1"
|
11 |
efrain |
50 |
And I am on the "Course 1" "grades > Grader report > View" page
|
|
|
51 |
And the following should exist in the "user-grades" table:
|
|
|
52 |
| -1- | -2- | -3- |
|
|
|
53 |
| Student One | student1@example.com | 70 |
|