1 |
efrain |
1 |
@mod @mod_lesson
|
|
|
2 |
Feature: An incorrect response to an answer with multiple attempts show appropriate continue buttons
|
|
|
3 |
In order for lesson the appropriate continue button to be displayed
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to create a lesson with multiple attempts for each question
|
|
|
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 |
|
|
|
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 "activities" exist:
|
|
|
20 |
| activity | name | course | idnumber |
|
|
|
21 |
| lesson | Test lesson name | C1 | lesson1 |
|
|
|
22 |
And I am on the "Test lesson name" "lesson activity editing" page logged in as teacher1
|
|
|
23 |
And I set the following fields to these values:
|
|
|
24 |
| Provide option to try a question again | Yes |
|
|
|
25 |
| Maximum number of attempts per question | 2 |
|
|
|
26 |
And I press "Save and display"
|
|
|
27 |
|
|
|
28 |
Scenario: A student answering incorrectly to a question will see an option to move to the next question if set up.
|
|
|
29 |
Given the following "mod_lesson > pages" exist:
|
|
|
30 |
| lesson | qtype | title | content |
|
|
|
31 |
| Test lesson name | numeric | Numerical question | What is 1 + 2? |
|
|
|
32 |
| Test lesson name | content | Just move on page | You are here to move on |
|
|
|
33 |
And the following "mod_lesson > answers" exist:
|
|
|
34 |
| page | answer | jumpto | score |
|
|
|
35 |
| Numerical question | 3 | Next page | 1 |
|
|
|
36 |
| Numerical question | 2 | Next page | 0 |
|
|
|
37 |
| Just move on page | End this lesson | End of lesson | 0 |
|
|
|
38 |
And I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
39 |
When I set the field "Your answer" to "2"
|
|
|
40 |
And I press "Submit"
|
|
|
41 |
And I should see "That's the wrong answer"
|
|
|
42 |
And I should see "No, I just want to go on to the next question"
|
|
|
43 |
And I press "No, I just want to go on to the next question"
|
|
|
44 |
Then I should see "You are here to move on"
|
|
|
45 |
|
|
|
46 |
Scenario: A student answering incorrectly to a question will only see an option to try again if there is no matching wrong response.
|
|
|
47 |
Given the following "mod_lesson > pages" exist:
|
|
|
48 |
| lesson | qtype | title | content |
|
|
|
49 |
| Test lesson name | numeric | Numerical question | What is 1 + 2? |
|
|
|
50 |
| Test lesson name | content | Just move on page | You are here to move on |
|
|
|
51 |
And the following "mod_lesson > answers" exist:
|
|
|
52 |
| page | answer | jumpto | score |
|
|
|
53 |
| Numerical question | 3 | Next page | 1 |
|
|
|
54 |
| Just move on page | End this lesson | End of lesson | 0 |
|
|
|
55 |
And I am on the "Test lesson name" "lesson activity" page logged in as student1
|
|
|
56 |
When I set the field "Your answer" to "2"
|
|
|
57 |
And I press "Submit"
|
|
|
58 |
And I should see "That's the wrong answer"
|
|
|
59 |
Then I should not see "No, I just want to go on to the next question"
|
|
|
60 |
And I press "Yes, I'd like to try again"
|
|
|
61 |
And I should see "What is 1 + 2?"
|