1 |
efrain |
1 |
@mod @mod_quiz @quiz @quiz_overview @javascript
|
|
|
2 |
Feature: Reopening Never submitted quiz attempts
|
|
|
3 |
In order to cut some slack to students who forgot to submit their quiz attempt
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to reopen selected attempts.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname |
|
|
|
10 |
| teacher | Mark | Allwright |
|
|
|
11 |
| student | Freddy | Forgetful |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher | C1 | editingteacher |
|
|
|
18 |
| student | 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 |
|
|
|
24 |
| Test questions | truefalse | TF |
|
|
|
25 |
And the following "activities" exist:
|
|
|
26 |
| activity | name | course | idnumber |
|
|
|
27 |
| quiz | Test quiz | C1 | quiz1 |
|
|
|
28 |
And quiz "Test quiz" contains the following questions:
|
|
|
29 |
| question | page |
|
|
|
30 |
| TF | 1 |
|
|
|
31 |
And user "student" has started an attempt at quiz "Test quiz"
|
|
|
32 |
And the attempt at "Test quiz" by "student" was never submitted
|
|
|
33 |
|
|
|
34 |
Scenario: Attempt can be reopened
|
|
|
35 |
Given I am on the "Test quiz" "mod_quiz > Grades report" page logged in as teacher
|
|
|
36 |
When I press "Reopen"
|
|
|
37 |
And I should see "This will reopen attempt 1 by Freddy Forgetful." in the "Reopen attempt?" "dialogue"
|
|
|
38 |
And I should see "The attempt will remain open and can be continued." in the "Reopen attempt?" "dialogue"
|
|
|
39 |
And I click on "Reopen" "button" in the "Reopen attempt?" "dialogue"
|
|
|
40 |
Then I should see "In progress" in the "Freddy Forgetful" "table_row"
|
|
|
41 |
And "Reopen" "button" should not exist
|
|
|
42 |
|
|
|
43 |
Scenario: Reopening an attempt can be cancelled and then nothing happens
|
|
|
44 |
Given I am on the "Test quiz" "mod_quiz > Grades report" page logged in as teacher
|
|
|
45 |
And I start watching to see if a new page loads
|
|
|
46 |
When I press "Reopen"
|
|
|
47 |
And I click on "Cancel" "button" in the "Reopen attempt?" "dialogue"
|
|
|
48 |
Then a new page should not have loaded since I started watching
|
|
|
49 |
And I should see "Never submitted" in the "Freddy Forgetful" "table_row"
|