1 |
efrain |
1 |
@mod @mod_quiz @core_completion
|
|
|
2 |
Feature: Manually complete a quiz
|
|
|
3 |
In order to meet manual quiz completion requirements
|
|
|
4 |
As a student
|
|
|
5 |
I need to be able to view and modify my quiz manual completion status
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@example.com |
|
|
|
11 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category | enablecompletion |
|
|
|
14 |
| Course 1 | C1 | 0 | 1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "question categories" exist:
|
|
|
20 |
| contextlevel | reference | name |
|
|
|
21 |
| Course | C1 | Test questions |
|
|
|
22 |
And the following "questions" exist:
|
|
|
23 |
| questioncategory | qtype | name | questiontext |
|
|
|
24 |
| Test questions | truefalse | First question | Answer the first question |
|
|
|
25 |
And the following "activities" exist:
|
|
|
26 |
| activity | name | course | idnumber | completion |
|
|
|
27 |
| quiz | Test quiz name | C1 | quiz1 | 1 |
|
|
|
28 |
And quiz "Test quiz name" contains the following questions:
|
|
|
29 |
| question | page |
|
|
|
30 |
| First question | 1 |
|
|
|
31 |
|
|
|
32 |
@javascript
|
|
|
33 |
Scenario: Use manual completion
|
|
|
34 |
Given I am on the "Test quiz name" "quiz activity" page logged in as teacher1
|
|
|
35 |
And the manual completion button for "Test quiz name" should be disabled
|
|
|
36 |
And I log out
|
|
|
37 |
# Student view.
|
|
|
38 |
When I am on the "Test quiz name" "quiz activity" page logged in as student1
|
|
|
39 |
Then the manual completion button of "Test quiz name" is displayed as "Mark as done"
|
|
|
40 |
And I toggle the manual completion state of "Test quiz name"
|
|
|
41 |
And the manual completion button of "Test quiz name" is displayed as "Done"
|