1 |
efrain |
1 |
@mod @mod_workshop
|
|
|
2 |
Feature: Workshop assessment with grade to pass
|
|
|
3 |
In order to use workshop activity
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to setup workshop with require assessment grade and grade to pass
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Sam1 | Student1 | student1@example.com |
|
|
|
11 |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | format | enablecompletion |
|
|
|
14 |
| Course1 | c1 | topics | 1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | c1 | student |
|
|
|
18 |
| teacher1 | c1 | editingteacher |
|
|
|
19 |
|
|
|
20 |
Scenario: Setup workshop with assessment grade and pass grade set
|
|
|
21 |
And I log in as "teacher1"
|
|
|
22 |
And I add a workshop activity to course "Course1" section "0"
|
|
|
23 |
When I set the following fields to these values:
|
|
|
24 |
| Workshop name | Test workshop |
|
|
|
25 |
| Add requirements | 1 |
|
|
|
26 |
| Receive a grade | 1 |
|
|
|
27 |
| completiongradeitemnumber | Assessment |
|
|
|
28 |
| Passing grade | 1 |
|
|
|
29 |
And I press "Save and display"
|
|
|
30 |
And I should see "This activity does not have a valid grade to pass set. It may be set in the Grade section of the activity settings."
|
|
|
31 |
And I set the field "Assessment grade to pass" to ""
|
|
|
32 |
And I press "Save and display"
|
|
|
33 |
And I should see "This activity does not have a valid grade to pass set. It may be set in the Grade section of the activity settings."
|
|
|
34 |
And I set the field "Assessment grade to pass" to "81"
|
|
|
35 |
And I press "Save and display"
|
|
|
36 |
And I should see "The grade to pass can not be greater than the maximum possible grade 20"
|
|
|
37 |
And I set the field "Assessment grade to pass" to "hello"
|
|
|
38 |
And I press "Save and display"
|
|
|
39 |
And I should see "You must enter a number here."
|
|
|
40 |
And I set the field "Assessment grade to pass" to "12,34"
|
|
|
41 |
And I press "Save and display"
|
|
|
42 |
And I should see "You must enter a number here."
|
|
|
43 |
And I set the field "Assessment grade to pass" to "10"
|
|
|
44 |
And I press "Save and display"
|
11 |
efrain |
45 |
Then "Setup phase" "heading" should exist
|