1 |
efrain |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Attempt a quiz with multiple grades
|
|
|
3 |
As a student
|
|
|
4 |
In order to demonstrate multiple skills at once
|
|
|
5 |
I need to be able to attempt quizzes with multiple grades setup
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username |
|
|
|
10 |
| student |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| student | C1 | student |
|
|
|
17 |
And the following "question categories" exist:
|
|
|
18 |
| contextlevel | reference | name |
|
|
|
19 |
| Course | C1 | Test questions |
|
|
|
20 |
And the following "activities" exist:
|
|
|
21 |
| activity | name | course |
|
|
|
22 |
| quiz | Quiz 1 | C1 |
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Navigation to, and display of, grading setup
|
|
|
26 |
Given the following "questions" exist:
|
|
|
27 |
| questioncategory | qtype | name | questiontext |
|
|
|
28 |
| Test questions | truefalse | Reading | Can you read this? |
|
|
|
29 |
| Test questions | truefalse | Listening | Can you hear this? |
|
|
|
30 |
And the following "mod_quiz > grade items" exist:
|
|
|
31 |
| quiz | name |
|
|
|
32 |
| Quiz 1 | Grade for reading |
|
|
|
33 |
| Quiz 1 | Grade for listening |
|
|
|
34 |
| Quiz 1 | Unused grade item |
|
|
|
35 |
And quiz "Quiz 1" contains the following questions:
|
|
|
36 |
| question | page | grade item |
|
|
|
37 |
| Reading | 1 | Grade for reading |
|
|
|
38 |
| Listening | 1 | Grade for listening |
|
|
|
39 |
|
|
|
40 |
When I am on the "Quiz 1" "quiz activity" page logged in as "student"
|
|
|
41 |
And I click on "Attempt quiz" "button"
|
|
|
42 |
And I set the field "True" in the "Can you read this?" "question" to "1"
|
|
|
43 |
And I set the field "False" in the "Can you hear this?" "question" to "1"
|
|
|
44 |
And I press "Finish attempt ..."
|
|
|
45 |
And I press "Submit all and finish"
|
|
|
46 |
And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
|
|
47 |
|
|
|
48 |
Then I should see "1.00 out of 1.00" in the "Grade for reading" "table_row"
|
|
|
49 |
And I should see "0.00 out of 1.00" in the "Grade for listening" "table_row"
|
|
|
50 |
And I should not see "Unused grade item"
|
|
|
51 |
And I should see "1.00/2.00" in the "Marks" "table_row"
|
|
|
52 |
# Funny order because 'Grade' also appears in other rows.
|
|
|
53 |
And I should see "Grade" in the "50.00 out of 100.00" "table_row"
|
|
|
54 |
And I follow "Finish review"
|
|
|
55 |
And I should not see "Unused grade item"
|
|
|
56 |
And I should see "1.00/2.00" in the "Marks" "table_row"
|
|
|
57 |
And I should see "Grade" in the "50.00 out of 100.00" "table_row"
|