1 |
efrain |
1 |
@mod @mod_workshop
|
|
|
2 |
Feature: Setting grades to pass via workshop editing form
|
|
|
3 |
In order to define grades to pass
|
|
|
4 |
As a teacher
|
|
|
5 |
I can set them in the workshop settings form, without the need to go to the gradebook
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course1 | c1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | c1 | editingteacher |
|
|
|
17 |
|
|
|
18 |
Scenario: Adding a new workshop with grade to pass field set
|
|
|
19 |
Given the following "activities" exist:
|
|
|
20 |
| activity | name | course | idnumber |
|
|
|
21 |
| workshop | Awesome workshop | c1 | workshop1 |
|
|
|
22 |
When I am on the "Awesome workshop" "workshop activity editing" page logged in as teacher1
|
|
|
23 |
And I set the field "Submission grade to pass" to "45"
|
|
|
24 |
And I set the field "Assessment grade to pass" to "10.5"
|
|
|
25 |
And I press "Save and return to course"
|
|
|
26 |
And I am on the "Awesome workshop" "workshop activity editing" page
|
|
|
27 |
Then the field "Submission grade to pass" matches value "45.00"
|
|
|
28 |
And the field "Assessment grade to pass" matches value "10.50"
|
|
|
29 |
|
|
|
30 |
@javascript
|
|
|
31 |
Scenario: Grade to pass kept even with submission types without online text (MDL-64862)
|
|
|
32 |
Given the following "activities" exist:
|
|
|
33 |
| activity | course | name | submissiongradepass | gradinggradepass | submissiontypetextavailable |
|
|
|
34 |
| workshop | c1 | Another workshop | 42 | 10.1 | 0 |
|
|
|
35 |
When I am on the "Course1" course page logged in as teacher1
|
|
|
36 |
Then I should not see "New Workshop"
|
|
|
37 |
And I am on the "Another workshop" "workshop activity editing" page
|
|
|
38 |
And the field "Submission grade to pass" matches value "42.00"
|
|
|
39 |
And the field "Assessment grade to pass" matches value "10.10"
|
|
|
40 |
|
|
|
41 |
Scenario: Adding a new workshop with grade to pass fields left empty
|
|
|
42 |
Given the following "activities" exist:
|
|
|
43 |
| activity | name | course | idnumber |
|
|
|
44 |
| workshop | Another awesome workshop | c1 | workshop1 |
|
|
|
45 |
When I am on the "Another awesome workshop" "workshop activity editing" page logged in as teacher1
|
|
|
46 |
Then the field "Submission grade to pass" matches value "0.00"
|
|
|
47 |
And the field "Assessment grade to pass" matches value "0.00"
|
|
|
48 |
|
|
|
49 |
Scenario: Adding a new workshop with non-numeric value of a grade to pass
|
|
|
50 |
Given the following "activities" exist:
|
|
|
51 |
| activity | name | course | idnumber | section |
|
|
|
52 |
| workshop | Another awesome workshop | c1 | workshop1 | 1 |
|
|
|
53 |
When I am on the "Another awesome workshop" "workshop activity editing" page logged in as teacher1
|
|
|
54 |
And I set the field "Assessment grade to pass" to "You shall not pass!"
|
|
|
55 |
And I press "Save and return to course"
|
|
|
56 |
Then I should see "Edit settings"
|
|
|
57 |
And I should see "You must enter a number here"
|
|
|
58 |
|
|
|
59 |
Scenario: Adding a new workshop with invalid value of a grade to pass
|
|
|
60 |
Given the following "activities" exist:
|
|
|
61 |
| activity | name | course | idnumber | section |
|
|
|
62 |
| workshop | Almost awesome workshop | c1 | workshop1 | 1 |
|
|
|
63 |
When I am on the "Almost awesome workshop" "workshop activity editing" page logged in as teacher1
|
|
|
64 |
And I set the field "Assessment grade to pass" to "10000000"
|
|
|
65 |
And I press "Save and return to course"
|
|
|
66 |
Then I should see "Edit settings"
|
|
|
67 |
And I should see "The grade to pass can not be greater than the maximum possible grade"
|
|
|
68 |
|
|
|
69 |
Scenario: Emptying grades to pass fields sets them to zero
|
|
|
70 |
Given the following "activities" exist:
|
|
|
71 |
| activity | name | course | idnumber | section |
|
|
|
72 |
| workshop | Super awesome workshop | c1 | workshop1 | 1 |
|
|
|
73 |
When I am on the "Super awesome workshop" "workshop activity editing" page logged in as teacher1
|
|
|
74 |
And I set the field "Submission grade to pass" to "59.99"
|
|
|
75 |
And I set the field "Assessment grade to pass" to "0.000"
|
|
|
76 |
And I press "Save and return to course"
|
|
|
77 |
And I should not see "Edit settings"
|
|
|
78 |
And I am on the "Super awesome workshop" "workshop activity editing" page
|
|
|
79 |
And the field "Submission grade to pass" matches value "59.99"
|
|
|
80 |
And the field "Assessment grade to pass" matches value "0.00"
|
|
|
81 |
When I set the field "Submission grade to pass" to ""
|
|
|
82 |
And I set the field "Assessment grade to pass" to ""
|
|
|
83 |
And I press "Save and display"
|
|
|
84 |
Then I should not see "New Workshop"
|
|
|
85 |
And I am on the "Super awesome workshop" "workshop activity editing" page
|
|
|
86 |
And the field "Submission grade to pass" matches value "0.00"
|
|
|
87 |
And the field "Assessment grade to pass" matches value "0.00"
|