attempt_feedback.feature 8.84 KB
Newer Older
0815-xyz's avatar
0815-xyz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
@mod @mod_adaptivequiz
Feature: Attempt feedback
  In order to get inspired and engaged
  As a student
  I want to get feedback on my attempts on adaptive quiz and ability estimation if I'm allowed to

  Background:
    Given the following "users" exist:
      | username | firstname | lastname    | email                       |
      | teacher1 | John      | The Teacher | johntheteacher@example.com  |
      | student1 | Peter     | The Student | peterthestudent@example.com |
    And the following "courses" exist:
      | fullname | shortname | category |
      | Course 1 | C1        | 0        |
    And the following "course enrolments" exist:
      | user     | course | role           |
      | teacher1 | C1     | editingteacher |
      | student1 | C1     | student        |
    And the following "question categories" exist:
      | contextlevel | reference | name                    |
      | Course       | C1        | Adaptive Quiz Questions |
    And the following "questions" exist:
      | questioncategory        | qtype     | name | questiontext    | answer |
      | Adaptive Quiz Questions | truefalse | Q1   | First question  | True   |
      | Adaptive Quiz Questions | truefalse | Q2   | Second question | True   |
    And the following "core_question > Tags" exist:
      | question | tag    |
      | Q1       | adpq_1 |
      | Q2       | adpq_2 |
    And the following "activity" exists:
      | activity           | adaptivequiz            |
      | idnumber           | adaptivequiz1           |
      | course             | C1                      |
      | name               | Adaptive Quiz           |
      | startinglevel      | 1                       |
      | lowestlevel        | 1                       |
      | highestlevel       | 2                       |
      | minimumquestions   | 1                       |
      | maximumquestions   | 2                       |
      | standarderror      | 20                      |
      | questionpoolnamed  | Adaptive Quiz Questions |
      | showabilitymeasure | 1                       |

  @javascript
  Scenario: Get default textual feedback after an attempt is finished
    When I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    Then I should see "You've finished the attempt, thank you for taking the quiz!"

  @javascript
  Scenario: Get customized textual feedback after an attempt is finished
    Given I am on the "adaptivequiz1" "Activity" page logged in as "teacher1"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Attempt feedback | Thank you for taking the test! |
    And I click on "Save and return to course" "button"
    And I log out
    When I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    Then I should see "Thank you for taking the test!"

  @javascript
  Scenario: Get estimated ability after an attempt is finished
    When I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    Then I should see "Estimated ability: 1.7 / 1 - 2"

  @javascript
  Scenario: View attempt summary with estimated ability for the only allowed attempt
    Given I am on the "adaptivequiz1" "Activity" page logged in as "teacher1"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Attempts allowed | 1 |
    And I click on "Save and return to course" "button"
    And I log out
    When I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    Then I should see "Attempt Summary"
    And "attemptsummarytable" "table" should exist
    And I should see "Completed" in the "#attemptstatecell" "css_element"
    And I should see "1.7 / 1 - 2" in the "#abilitymeasurecell" "css_element"

  @javascript
  Scenario: View attempts summary with estimated ability for several attempts
    Given I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    When I am on the "adaptivequiz1" "Activity" page
    Then I should see "Your previous attempts"
    And "userattemptstable" "table" should exist
    And I should see "Estimated ability / 1 - 2" in the "th.abilitymeasurecol" "css_element"
    And I should see "Completed" in the "#userattemptstable_r0 td.statecol" "css_element"
    And I should see "Completed" in the "#userattemptstable_r1 td.statecol" "css_element"
    And I should see "1.7" in the "#userattemptstable_r0 td.abilitymeasurecol" "css_element"
    And I should see "1.7" in the "#userattemptstable_r1 td.abilitymeasurecol" "css_element"

  @javascript
  Scenario: Estimated ability after an attempt is finished is not visible when set accordingly
    Given I am on the "adaptivequiz1" "Activity" page logged in as "teacher1"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Show ability measure to students | No |
    And I click on "Save and return to course" "button"
    And I log out
    When I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    Then I should not see "Estimated ability: 1.7 / 1 - 2"

  @javascript
  Scenario: Estimated ability for the only allowed attempt is not visible for a student when set accordingly
    Given I am on the "adaptivequiz1" "Activity" page logged in as "teacher1"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Attempts allowed                 | 1  |
      | Show ability measure to students | No |
    And I click on "Save and return to course" "button"
    And I log out
    And I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    When I am on the "adaptivequiz1" "Activity" page
    Then "#abilitymeasurecell" "css_element" should not exist

  @javascript
  Scenario: Estimated ability is not visible for a student in attempts summary when set accordingly
    Given I am on the "adaptivequiz1" "Activity" page logged in as "teacher1"
    And I navigate to "Settings" in current page administration
    And I set the following fields to these values:
      | Show ability measure to students | No |
    And I click on "Save and return to course" "button"
    And I log out
    And I am on the "adaptivequiz1" "Activity" page logged in as "student1"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    And I click on "Start attempt" "link"
    And I click on "True" "radio" in the "First question" "question"
    And I press "Submit answer"
    And I click on "True" "radio" in the "Second question" "question"
    And I press "Submit answer"
    And I press "Continue"
    When I am on the "adaptivequiz1" "Activity" page
    Then ".abilitymeasurecol" "css_element" should not exist