Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_quiz
2
Feature: Setup multiple grades for a quiz
3
  In order to assess multiple things in one quiz
4
  As a teacher
5
  I need to be able to create multiple quiz grade items.
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username |
10
      | teacher  |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1        | 0        |
14
    And the following "course enrolments" exist:
15
      | user    | course | role           |
16
      | teacher | C1     | editingteacher |
17
    And the following "question categories" exist:
18
      | contextlevel | reference | name           |
19
      | Course       | C1        | Test questions |
20
    And the following "questions" exist:
21
      | questioncategory | qtype       | name       | questiontext        |
22
      | Test questions   | description | Info       | Some information    |
23
      | Test questions   | truefalse   | Question A | This is question 01 |
24
      | Test questions   | truefalse   | Question B | This is question 02 |
25
      | Test questions   | truefalse   | Question C | This is question 03 |
26
    And the following "activities" exist:
27
      | activity | name   | course |
28
      | quiz     | Quiz 1 | C1     |
29
 
30
  @javascript
31
  Scenario: Navigation to, and display of, grading setup
32
    Given the following "mod_quiz > grade items" exist:
33
      | quiz   | name              |
34
      | Quiz 1 | Intuition         |
35
      | Quiz 1 | Intelligence      |
36
      | Quiz 1 | Unused grade item |
37
    And quiz "Quiz 1" contains the following questions:
38
      | question   | page | grade item   |
39
      | Info       | 1    |              |
40
      | Question A | 1    | Intuition    |
41
      | Question B | 1    | Intelligence |
42
      | Question C | 2    | Intuition    |
43
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
44
 
45
    Then I should see "Grade items"
46
 
47
    And "Delete" "icon" should not exist in the "Intuition" "table_row"
48
    And "Intuition" row "Total of marks" column of "mod_quiz-grade-item-list" table should contain "2.00"
49
    And "Delete" "icon" should not exist in the "Intelligence" "table_row"
50
    And "Intelligence" row "Total of marks" column of "mod_quiz-grade-item-list" table should contain "1.00"
51
    And "Delete" "icon" should exist in the "Unused grade item" "table_row"
52
    And "Unused grade item" row "Total of marks" column of "mod_quiz-grade-item-list" table should contain "-"
53
 
54
    And the field "Question A" matches value "Intuition"
55
    And "1" row "Marks" column of "mod_quiz-slot-list" table should contain "1.00"
56
    And the field "Question B" matches value "Intelligence"
57
    And "2" row "Marks" column of "mod_quiz-slot-list" table should contain "1.00"
58
    And the field "Question C" matches value "Intuition"
59
    And "3" row "Marks" column of "mod_quiz-slot-list" table should contain "1.00"
60
 
61
    And I should not see "Info"
62
 
63
  @javascript
64
  Scenario: A grade item can be created and renamed
65
    Given quiz "Quiz 1" contains the following questions:
66
      | question   | page |
67
      | Question A | 1    |
68
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
69
    And I should see "Create grade items within your quiz. Allocate questions or quiz sections to these grade items to break down grade results into different areas."
70
    And I press "Add grade item"
71
    Then "New grade item 1" "table_row" should exist
72
    And I press "Add grade item"
73
    Then "New grade item 2" "table_row" should exist
74
    And I click on "Edit" "link" in the "New grade item 1" "table_row"
75
    And I set the field "New name for grade item" to "Intelligence"
76
    And I press enter
77
    And I should not see "New grade item 1"
78
    And "Intelligence" "table_row" should exist
79
 
80
  @javascript
81
  Scenario: Editing the name of a grade item can be cancelled
82
    Given the following "mod_quiz > grade items" exist:
83
      | quiz   | name      |
84
      | Quiz 1 | Intuition |
85
    And quiz "Quiz 1" contains the following questions:
86
      | question   | page |
87
      | Question A | 1    |
88
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
89
    And I click on "Edit" "link" in the "Intuition" "table_row"
90
    And I set the field "New name for grade item" to "Intelligence"
91
    And I press the escape key
92
    And I should not see "Intelligence"
93
    And "Intuition" "table_row" should exist
94
 
95
  @javascript
96
  Scenario: Unused grade items can be deleted
97
    Given the following "mod_quiz > grade items" exist:
98
      | quiz   | name              |
99
      | Quiz 1 | Unused grade item |
100
    And quiz "Quiz 1" contains the following questions:
101
      | question   | page |
102
      | Question A | 1    |
103
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
104
    And I follow "Delete grade item Unused grade item"
105
    Then I should not see "Unused grade item"
106
    And I should see "Create grade items within your quiz. Allocate questions or quiz sections to these grade items to break down grade results into different areas."
107
 
108
  @javascript
109
  Scenario: Grade item for a slot can be changed
110
    Given the following "mod_quiz > grade items" exist:
111
      | quiz   | name      |
112
      | Quiz 1 | Intuition |
113
    And quiz "Quiz 1" contains the following questions:
114
      | question   | page |
115
      | Question A | 1    |
116
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
117
    And "Delete" "icon" should exist in the "Intuition" "table_row"
118
    And I set the field "Question A" to "Intuition"
119
    Then  "Delete" "icon" should not exist in the "Intuition" "table_row"
120
    And the field "Question A" matches value "Intuition"
121
    And I set the field "Question A" to "[none]"
122
    And "Delete" "icon" should exist in the "Intuition" "table_row"
123
    And the field "Question A" matches value "[none]"
124
 
125
  @javascript
126
  Scenario: All setup can be reset
127
    Given the following "mod_quiz > grade items" exist:
128
      | quiz   | name              |
129
      | Quiz 1 | Intuition         |
130
      | Quiz 1 | Intelligence      |
131
      | Quiz 1 | Unused grade item |
132
    And quiz "Quiz 1" contains the following questions:
133
      | question   | page | grade item   |
134
      | Question A | 1    | Intuition    |
135
      | Question B | 1    | Intelligence |
136
      | Question C | 2    | Intuition    |
137
 
138
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
139
    And I press "Reset setup"
140
    And I click on "Reset" "button" in the "Reset grade items setup?" "dialogue"
141
 
142
    Then I should see "Create grade items within your quiz. Allocate questions or quiz sections to these grade items to break down grade results into different areas."
143
    And the field "Question A" matches value "[none]"
144
    And the field "Question B" matches value "[none]"
145
    And the field "Question C" matches value "[none]"
146
    And I should not see "Reset grade items setup"
147
 
148
  @javascript
149
  Scenario: Reset all can be cancelled
150
    Given the following "mod_quiz > grade items" exist:
151
      | quiz   | name              |
152
      | Quiz 1 | Intuition         |
153
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
154
    And I press "Reset setup"
155
    And I click on "Cancel" "button" in the "Reset grade items setup?" "dialogue"
156
    Then I should see "Intuition"
157
 
158
  @javascript
159
  Scenario: Automatically set up one grade item per section
160
    Given quiz "Quiz 1" contains the following questions:
161
      | question   | page |
162
      | Question A | 1    |
163
      | Question B | 1    |
164
      | Question C | 2    |
165
    And quiz "Quiz 1" contains the following sections:
166
      | heading   | firstslot | shuffle |
167
      | Reading   | 1         | 0       |
168
      | Listening | 3         | 0       |
169
 
170
    When I am on the "Quiz 1" "mod_quiz > multiple grades setup" page logged in as teacher
171
    And I press "Set up a grade for each section"
172
 
173
    Then "Reading" "table_row" should exist in the "mod_quiz-grade-item-list" "table"
174
    And "Listening" "table_row" should exist in the "mod_quiz-grade-item-list" "table"
175
    And the field "Question A" matches value "Reading"
176
    And the field "Question B" matches value "Reading"
177
    And the field "Question C" matches value "Listening"