1 |
efrain |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Add a quiz
|
|
|
3 |
In order to evaluate students
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to create a quiz
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
|
|
|
11 |
| student1 | Sam1 | Student1 | student1@example.com |
|
|
|
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 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And the following "activity" exists:
|
|
|
20 |
| activity | quiz |
|
|
|
21 |
| course | C1 |
|
|
|
22 |
| idnumber | 00001 |
|
|
|
23 |
| name | Test quiz name |
|
|
|
24 |
| intro | Test quiz description |
|
|
|
25 |
| section | 1 |
|
|
|
26 |
| grade | 10 |
|
|
|
27 |
When I log in as "teacher1"
|
|
|
28 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
29 |
And I add a "True/False" question to the "Test quiz name" quiz with:
|
|
|
30 |
| Question name | First question |
|
|
|
31 |
| Question text | Answer the first question |
|
|
|
32 |
| General feedback | Thank you, this is the general feedback |
|
|
|
33 |
| Correct answer | False |
|
|
|
34 |
| Feedback for the response 'True'. | So you think it is true |
|
|
|
35 |
| Feedback for the response 'False'. | So you think it is false |
|
|
|
36 |
And I log out
|
|
|
37 |
|
|
|
38 |
And I am on the "Test quiz name" "quiz activity" page logged in as student1
|
|
|
39 |
And I press "Attempt quiz"
|
|
|
40 |
Then I should see "Question 1"
|
|
|
41 |
And I should see "Answer the first question"
|
|
|
42 |
And I set the field "True" to "1"
|
|
|
43 |
And I press "Finish attempt ..."
|
|
|
44 |
And I should see "Answer saved"
|
|
|
45 |
And I press "Submit all and finish"
|
|
|
46 |
|
|
|
47 |
@javascript @skip_chrome_zerosize
|
|
|
48 |
Scenario: Add and configure small quiz and perform an attempt as a student with Javascript enabled
|
|
|
49 |
Then I click on "Submit all and finish" "button" in the "Submit all your answers and finish?" "dialogue"
|
|
|
50 |
And I should see "So you think it is true"
|
|
|
51 |
And I should see "Thank you, this is the general feedback"
|
|
|
52 |
And I should see "The correct answer is 'False'."
|
|
|
53 |
And I follow "Finish review"
|
|
|
54 |
And I should see "Highest grade: 0.00 / 10.00."
|
|
|
55 |
|
|
|
56 |
Scenario: Add and configure small quiz and perform an attempt as a student with Javascript disabled
|
|
|
57 |
Then I should see "So you think it is true"
|
|
|
58 |
And I should see "Thank you, this is the general feedback"
|
|
|
59 |
And I should see "The correct answer is 'False'."
|
|
|
60 |
And I follow "Finish review"
|
|
|
61 |
And I should see "Highest grade: 0.00 / 10.00."
|