Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 15... Línea 15...
15
      | activity   | name      | course | idnumber |
15
      | activity   | name      | course | idnumber |
16
      | quiz       | Test quiz | C1     | quiz1    |
16
      | quiz       | Test quiz | C1     | quiz1    |
17
    And the following "course enrolments" exist:
17
    And the following "course enrolments" exist:
18
      | user     | course | role           |
18
      | user     | course | role           |
19
      | teacher1 | C1     | editingteacher |
19
      | teacher1 | C1     | editingteacher |
20
    And the following "question categories" exist:
-
 
21
      | contextlevel | reference | name           |
-
 
22
      | Course       | C1        | Test questions |
-
 
23
    And the following "questions" exist:
20
    And the following "questions" exist:
24
      | questioncategory | qtype     | name                          |
21
      | questioncategory      | qtype     | name                          |
25
      | Test questions   | numerical | Test question to be previewed |
22
      | Default for Test quiz | numerical | Test question to be previewed |
26
    And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
23
    And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "teacher1"
27
    When I choose "Preview" action for "Test question to be previewed" in the question bank
24
    When I choose "Preview" action for "Test question to be previewed" in the question bank
Línea 28... Línea 25...
28
 
25
 
29
  Scenario: Question preview shows the question and other information
26
  Scenario: Question preview shows the question and other information
Línea 99... Línea 96...
99
    And I set the field "Question name" to "New version"
96
    And I set the field "Question name" to "New version"
100
    And I set the field "Question text" to "New text version"
97
    And I set the field "Question text" to "New text version"
101
    And I click on "submitbutton" "button"
98
    And I click on "submitbutton" "button"
102
    And I choose "Preview" action for "New version" in the question bank
99
    And I choose "Preview" action for "New version" in the question bank
103
    When I expand all fieldsets
100
    When I expand all fieldsets
104
    And I should see "Version 2"
101
    And I should see "Version 2 (latest)"
105
    And I should see "(latest)"
-
 
106
    And I should see "New version"
102
    And I should see "New version"
107
    And I should see "New text version"
103
    And I should see "New text version"
108
    And I should not see "Test question to be previewed"
104
    And I should not see "Test question to be previewed"
109
    And I should not see "Version 1"
105
    And I should not see "Version 1"
110
    And I should see "1" in the "Question version" "select"
106
    And I should see "v1" in the "Question version" "select"
111
    And I should see "2" in the "Question version" "select"
107
    And I should see "v2" in the "Question version" "select"
112
    And I set the field "Question version" to "1"
108
    And I set the field "Question version" to "v1"
113
    And I press "Save preview options and start again"
109
    And I press "Save preview options and start again"
114
    Then I should see "Version 1"
110
    Then I should see "Version 1"
115
    And I should not see "Version 2"
111
    And I should not see "Version 2 (latest)"
116
    And I should not see "(latest)"
-
 
Línea 117... Línea 112...
117
 
112
 
118
  Scenario: The preview always uses the latest question version by default.
113
  Scenario: The preview always uses the latest question version by default.
119
    Given the following "core_question > updated questions" exist:
114
    Given the following "core_question > updated questions" exist:
120
      | questioncategory | question                      | questiontext       |
115
      | questioncategory      | question                      | questiontext       |
121
      | Test questions   | Test question to be previewed | Question version 2 |
116
      | Default for Test quiz | Test question to be previewed | Question version 2 |
122
    And I should see "Version 1 (latest)"
117
    And I should see "Version 1 (latest)"
123
    And I expand all fieldsets
118
    And I expand all fieldsets
124
    And the field "Question version" matches value "Always latest"
119
    And the field "Question version" matches value "Always latest"
125
    And I set the field "Answer:" to "3.14"
120
    And I set the field "Answer:" to "3.14"
Línea 130... Línea 125...
130
    And I should see "Version 2 (latest)"
125
    And I should see "Version 2 (latest)"
Línea 131... Línea 126...
131
 
126
 
132
  Scenario: Detect a newer version during always latest preview and offer to switch to the latest
127
  Scenario: Detect a newer version during always latest preview and offer to switch to the latest
133
    Given I should not see "This preview is using version 1"
128
    Given I should not see "This preview is using version 1"
134
    And the following "core_question > updated questions" exist:
129
    And the following "core_question > updated questions" exist:
135
      | questioncategory | question                      | questiontext       |
130
      | questioncategory      | question                      | questiontext       |
136
      | Test questions   | Test question to be previewed | Question version 2 |
131
      | Default for Test quiz | Test question to be previewed | Question version 2 |
137
    And I should see "Version 1 (latest)"
132
    And I should see "Version 1 (latest)"
138
    And I set the field "Answer:" to "3.14"
133
    And I set the field "Answer:" to "3.14"
139
    When I press "Submit and finish"
134
    When I press "Submit and finish"
140
    And I should see "This preview is using an older version of the question."
135
    And I should see "This preview is using an older version of the question."
Línea 143... Línea 138...
143
    And I should see "Version 2 (latest)"
138
    And I should see "Version 2 (latest)"
Línea 144... Línea 139...
144
 
139
 
145
  Scenario: Previewing from the question history will not always show the latest version
140
  Scenario: Previewing from the question history will not always show the latest version
146
    Given I press "Close preview"
141
    Given I press "Close preview"
147
    And the following "core_question > updated questions" exist:
142
    And the following "core_question > updated questions" exist:
148
      | questioncategory | question                      | questiontext       |
143
      | questioncategory      | question                      | questiontext       |
149
      | Test questions   | Test question to be previewed | Question version 2 |
144
      | Default for Test quiz | Test question to be previewed | Question version 2 |
150
    And I choose "History" action for "Test question to be previewed" in the question bank
145
    And I choose "History" action for "Test question to be previewed" in the question bank
151
    And I choose "Preview" action for "Test question to be previewed" in the question bank
146
    And I choose "Preview" action for "Test question to be previewed" in the question bank
152
    And I should see "Version 1 (of 2)"
147
    And I should see "Version 1 (of 2)"
153
    And I expand all fieldsets
148
    And I expand all fieldsets
154
    And the field "Question version" matches value "1"
149
    And the field "Question version" matches value "1"
155
    And I set the field "Answer:" to "3.14"
150
    And I set the field "Answer:" to "3.14"
156
    And I press "Submit and finish"
151
    And I press "Submit and finish"
157
    And I should see "Version 1 (of 2)"
152
    And I should see "Version 1 (of 2)"
158
    And I should not see "The latest version is 2."
153
    And I should not see "The latest version is 2."
159
    And the following "core_question > updated questions" exist:
154
    And the following "core_question > updated questions" exist:
160
      | questioncategory | question                      | questiontext       |
155
      | questioncategory      | question                      | questiontext       |
161
      | Test questions   | Test question to be previewed | Question version 3 |
156
      | Default for Test quiz | Test question to be previewed | Question version 3 |
162
    When I press "Start again"
157
    When I press "Start again"
163
    Then I should see "Version 1 (of 3)"
158
    Then I should see "Version 1 (of 3)"
Línea 164... Línea 159...
164
    And I should not see "Version 3 (latest)"
159
    And I should not see "Version 3 (latest)"