1441 |
ariadna |
1 |
@core @core_completion @javascript
|
|
|
2 |
Feature: Check activity grading settings when requiring grading completion
|
|
|
3 |
In order to confirm the activity completion values are fine
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to be informed about the wrong settings.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | enablecompletion | numsections |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | First | teacher1@example.com |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activity" exists:
|
|
|
18 |
| activity | forum |
|
|
|
19 |
| course | C1 |
|
|
|
20 |
| name | Test forum |
|
|
|
21 |
| completion | 0 |
|
|
|
22 |
|
|
|
23 |
Scenario: Require any grade for multiple grading items activities
|
|
|
24 |
Given I am on the "Test forum" "forum activity editing" page logged in as teacher1
|
|
|
25 |
And I expand all fieldsets
|
|
|
26 |
And I set the field "Add requirements" to "1"
|
|
|
27 |
And I set the field "Receive a grade" to "1"
|
|
|
28 |
When I click on "Save and display" "button"
|
|
|
29 |
Then I should see "Require grade can't be enabled for Rating because grading by Rating is not enabled."
|
|
|
30 |
And I set the following fields to these values:
|
|
|
31 |
| Ratings > Aggregate type | Average of ratings |
|
|
|
32 |
| id_scale_modgrade_type | Point |
|
|
|
33 |
| Ratings > scale[modgrade_point] | 60 |
|
|
|
34 |
And I click on "Save and display" "button"
|
|
|
35 |
And I should not see "Require grade can't be enabled for Rating because grading by Rating is not enabled."
|
|
|
36 |
And I should see "Receive a grade"
|
|
|
37 |
And I am on the "Test forum" "forum activity editing" page
|
|
|
38 |
And I set the following fields to these values:
|
|
|
39 |
| completiongradeitemnumber | Whole forum |
|
|
|
40 |
And I click on "Save and display" "button"
|
|
|
41 |
And I should see "Require grade can't be enabled for Whole forum because grading by Whole forum is not enabled."
|
|
|
42 |
And I set the following fields to these values:
|
|
|
43 |
| Whole forum grading > Type | Point |
|
|
|
44 |
And I click on "Save and display" "button"
|
|
|
45 |
And I should not see "Require grade can't be enabled for Whole forum because grading by Whole forum is not enabled."
|
|
|
46 |
And I should see "Receive a grade"
|
|
|
47 |
|
|
|
48 |
Scenario: Require passing grade for multiple grading items activities
|
|
|
49 |
Given I am on the "Test forum" "forum activity editing" page logged in as teacher1
|
|
|
50 |
And I set the following fields to these values:
|
|
|
51 |
| Ratings > Aggregate type | Average of ratings |
|
|
|
52 |
| id_scale_modgrade_type | Point |
|
|
|
53 |
| Ratings > scale[modgrade_point] | 60 |
|
|
|
54 |
| Whole forum grading > Type | Point |
|
|
|
55 |
And I expand all fieldsets
|
|
|
56 |
And I set the field "Add requirements" to "1"
|
|
|
57 |
And I set the field "Receive a grade" to "1"
|
|
|
58 |
And I set the field "Passing grade" to "1"
|
|
|
59 |
When I click on "Save and display" "button"
|
|
|
60 |
Then I should see "This activity does not have a valid grade to pass set"
|
|
|
61 |
And I set the following fields to these values:
|
|
|
62 |
| gradepass | 50 |
|
|
|
63 |
And I click on "Save and display" "button"
|
|
|
64 |
And I should see "Receive a passing grade"
|
|
|
65 |
And I am on the "Test forum" "forum activity editing" page
|
|
|
66 |
And I set the following fields to these values:
|
|
|
67 |
| completiongradeitemnumber | Whole forum |
|
|
|
68 |
And I click on "Save and display" "button"
|
|
|
69 |
And I should see "This activity does not have a valid grade to pass set"
|
|
|
70 |
And I expand all fieldsets
|
|
|
71 |
And I set the field "Grade to pass" to "50"
|
|
|
72 |
And I click on "Save and display" "button"
|
|
|
73 |
And I should not see "This activity does not have a valid grade to pass set"
|
|
|
74 |
And I should see "Receive a passing grade"
|