1 |
efrain |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Flag quiz questions
|
|
|
3 |
As a student
|
|
|
4 |
In order to flag a quiz questions
|
|
|
5 |
All review options for immediately after the attempt are ticked
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student1 | Student | 1 | student1@email.com |
|
|
|
11 |
| teacher1 | Teacher | 1 | teacher1@email.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname |
|
|
|
14 |
| Course 1 | C1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| student1 | C1 | student |
|
|
|
18 |
| teacher1 | C1 | teacher |
|
|
|
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 | TF1 | First question |
|
|
|
25 |
| Test questions | truefalse | TF2 | Second question |
|
|
|
26 |
| Test questions | truefalse | TF3 | Third question |
|
|
|
27 |
And the following "activity" exists:
|
|
|
28 |
| activity | quiz |
|
|
|
29 |
| name | Quiz 1 |
|
|
|
30 |
| course | C1 |
|
|
|
31 |
| attemptimmediately | 1 |
|
|
|
32 |
| correctnessimmediately | 1 |
|
|
|
33 |
| maxmarksimmediately | 1 |
|
|
|
34 |
| marksimmediately | 1 |
|
|
|
35 |
| specificfeedbackimmediately | 1 |
|
|
|
36 |
| generalfeedbackimmediately | 1 |
|
|
|
37 |
| rightanswerimmediately | 1 |
|
|
|
38 |
| overallfeedbackimmediately | 1 |
|
|
|
39 |
And quiz "Quiz 1" contains the following questions:
|
|
|
40 |
| question | page |
|
|
|
41 |
| TF1 | 1 |
|
|
|
42 |
| TF2 | 2 |
|
|
|
43 |
| TF3 | 3 |
|
|
|
44 |
|
|
|
45 |
@javascript
|
|
|
46 |
Scenario: Flag a quiz during and after quiz attempt
|
|
|
47 |
Given I am on the "Quiz 1" "quiz activity" page logged in as student1
|
|
|
48 |
And I press "Attempt quiz"
|
11 |
efrain |
49 |
When I click on "Flag question" "button" in the "First question" "question"
|
|
|
50 |
Then I should see "Remove flag" in the "First question" "question"
|
1 |
efrain |
51 |
# Confirm question 1 is flagged in navigation
|
11 |
efrain |
52 |
And "Question 1 This page Flagged" "link" should exist
|
1 |
efrain |
53 |
# Answer questions
|
|
|
54 |
And I click on "True" "radio" in the "First question" "question"
|
|
|
55 |
And I press "Next page"
|
|
|
56 |
And I click on "True" "radio" in the "Second question" "question"
|
|
|
57 |
And I press "Next page"
|
|
|
58 |
And I click on "True" "radio" in the "Third question" "question"
|
|
|
59 |
And I follow "Finish attempt ..."
|
|
|
60 |
And I press "Submit all and finish"
|
|
|
61 |
And I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
|
|
62 |
# Confirm only flagged question is flagged
|
|
|
63 |
And I should see "Remove flag" in the "First question" "question"
|
|
|
64 |
And I should see "Flag question" in the "Second question" "question"
|
11 |
efrain |
65 |
And I click on "Flagged" "button" in the "Second question" "question"
|
|
|
66 |
And I should see "Remove flag" in the "Second question" "question"
|
1 |
efrain |
67 |
And I should see "Flag question" in the "Third question" "question"
|
|
|
68 |
And I am on the "Quiz 1" "mod_quiz > Grades report" page logged in as teacher1
|
|
|
69 |
And "Flagged" "icon" should exist in the "Student 1" "table_row"
|
|
|
70 |
And I am on the "Quiz 1" "mod_quiz > Responses report" page
|
|
|
71 |
And "Flagged" "icon" should exist in the "Student 1" "table_row"
|
11 |
efrain |
72 |
And I am on the "Quiz 1 > student1 > Attempt 1" "mod_quiz > Attempt review" page
|
|
|
73 |
And I should see "Remove flag" in the "First question" "question"
|
|
|
74 |
And I should see "Remove flag" in the "Second question" "question"
|
|
|
75 |
And I should see "Flag question" in the "Third question" "question"
|