qti 2.23.1 → 2.23.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qti/models/assessment_meta.rb +30 -3
- data/lib/qti/v1/models/interactions/base_fill_blank_interaction.rb +1 -1
- data/lib/qti/version.rb +1 -1
- data/spec/fixtures/items_1.2/nq_multiple_fib_scoring_algorithms.xml +2 -2
- data/spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml +6 -0
- data/spec/lib/qti/models/assessment_meta_spec.rb +39 -3
- data/spec/lib/qti/v1/models/interactions/fill_blank_interaction_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9719566374e9aa9adafe874fb59f93c2af3ae5205b0ce13e9336dc859844217a
|
4
|
+
data.tar.gz: de7eb6ec7d447940bc1bc34560d5f7d4baaa880d4e475bb812350b497b2210e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a7182cb2d4cf71405b46a3ab714faa89ddbcdb47552b90ddc5b33685b9a924540ced776092690f160017430f40c93f0af7d3f94c7593c601d5f1a7ef15cbd0d
|
7
|
+
data.tar.gz: cace046b4c9072f8929208bfba2360b4582f3b8e3f757af9a7367c8e424876a6e8c85632d41d632f1a2d16bcbc5d752eddf9f069bc1290ed00076fc522bfb631
|
@@ -130,7 +130,7 @@ module Qti
|
|
130
130
|
string_true?(show_correct_answers_last_attempt)
|
131
131
|
end
|
132
132
|
|
133
|
-
def
|
133
|
+
def only_visible_to_overrides
|
134
134
|
tag_under_quiz('only_visible_to_overrides')
|
135
135
|
end
|
136
136
|
|
@@ -240,7 +240,7 @@ module Qti
|
|
240
240
|
end
|
241
241
|
|
242
242
|
def result_view_restricted?
|
243
|
-
string_true?(result_view_restricted)
|
243
|
+
string_true?(result_view_restricted) || false if result_view_restricted
|
244
244
|
end
|
245
245
|
|
246
246
|
def display_items
|
@@ -299,6 +299,30 @@ module Qti
|
|
299
299
|
string_true?(display_item_response_correctness)
|
300
300
|
end
|
301
301
|
|
302
|
+
def display_item_response_qualifier
|
303
|
+
tag_under_quiz('display_item_response_qualifier')
|
304
|
+
end
|
305
|
+
|
306
|
+
def show_item_responses_at
|
307
|
+
tag_under_quiz('show_item_responses_at')
|
308
|
+
end
|
309
|
+
|
310
|
+
def hide_item_responses_at
|
311
|
+
tag_under_quiz('hide_item_responses_at')
|
312
|
+
end
|
313
|
+
|
314
|
+
def display_item_response_correctness_qualifier
|
315
|
+
tag_under_quiz('display_item_response_correctness_qualifier')
|
316
|
+
end
|
317
|
+
|
318
|
+
def show_item_response_correctness_at
|
319
|
+
tag_under_quiz('show_item_response_correctness_at')
|
320
|
+
end
|
321
|
+
|
322
|
+
def hide_item_response_correctness_at
|
323
|
+
tag_under_quiz('hide_item_response_correctness_at')
|
324
|
+
end
|
325
|
+
|
302
326
|
private
|
303
327
|
|
304
328
|
def tag_under_quiz(tag)
|
@@ -321,7 +345,7 @@ module Qti
|
|
321
345
|
:hide_results, :quiz_type, :anonymous_submissions?,
|
322
346
|
:could_be_locked?, :allowed_attempts, :one_question_at_a_time?,
|
323
347
|
:cant_go_back?, :available?, :one_time_results?,
|
324
|
-
:
|
348
|
+
:show_correct_answers_last_attempt?, :only_visible_to_overrides?,
|
325
349
|
:module_locked?, :access_code, :ip_filter, :time_limit,
|
326
350
|
:show_correct_answers_at, :hide_correct_answers_at,
|
327
351
|
:lock_at, :unlock_at, :due_at, :require_lockdown_browser?,
|
@@ -332,6 +356,9 @@ module Qti
|
|
332
356
|
:result_view_restricted?, :display_items?, :display_item_feedback?,
|
333
357
|
:display_item_response?, :display_points_awarded?, :display_points_possible?,
|
334
358
|
:display_item_correct_answer?, :display_item_response_correctness?,
|
359
|
+
:display_item_response_qualifier, :show_item_responses_at,
|
360
|
+
:hide_item_responses_at, :display_item_response_correctness_qualifier,
|
361
|
+
:show_item_response_correctness_at, :hide_item_response_correctness_at,
|
335
362
|
to: :@canvas_meta_data, prefix: :canvas, allow_nil: true
|
336
363
|
|
337
364
|
alias canvas_instructions canvas_description
|
@@ -129,7 +129,7 @@ module Qti
|
|
129
129
|
choice = {
|
130
130
|
id: bnode_id,
|
131
131
|
position: index + 1,
|
132
|
-
item_body: bnode.at_xpath('.//xmlns:mattext').
|
132
|
+
item_body: bnode.at_xpath('.//xmlns:mattext').inner_html
|
133
133
|
}
|
134
134
|
@blank_choices ||= {}
|
135
135
|
@blank_choices[bnode_id] = choice
|
data/lib/qti/version.rb
CHANGED
@@ -80,12 +80,12 @@
|
|
80
80
|
</response_lid>
|
81
81
|
<response_lid ident="response_a053119f-6a61-4372-ac79-4b2a7de0232f">
|
82
82
|
<material>
|
83
|
-
<mattext>^orange
|
83
|
+
<mattext>^orange<s>$</mattext>
|
84
84
|
</material>
|
85
85
|
<render_choice>
|
86
86
|
<response_label ident="a053119f-6a61-4372-ac79-4b2a7de0232f-0" scoring_algorithm='TextRegex' answer_type='openEntry'>
|
87
87
|
<material>
|
88
|
-
<mattext texttype="text/plain">^orange
|
88
|
+
<mattext texttype="text/plain">^orange<s>$</mattext>
|
89
89
|
</material>
|
90
90
|
</response_label>
|
91
91
|
</render_choice>
|
@@ -44,6 +44,12 @@
|
|
44
44
|
<display_points_possible>true</display_points_possible>
|
45
45
|
<display_item_correct_answer>true</display_item_correct_answer>
|
46
46
|
<display_item_response_correctness>true</display_item_response_correctness>
|
47
|
+
<display_item_response_qualifier>once_per_attempt</display_item_response_qualifier>
|
48
|
+
<show_item_responses_at>2024-07-18 06:00:00 UTC</show_item_responses_at>
|
49
|
+
<hide_item_responses_at>2024-07-21 11:59:00 UTC</hide_item_responses_at>
|
50
|
+
<display_item_response_correctness_qualifier>after_last_attempt</display_item_response_correctness_qualifier>
|
51
|
+
<show_item_response_correctness_at>2024-07-19 06:00:00 UTC</show_item_response_correctness_at>
|
52
|
+
<hide_item_response_correctness_at>2024-07-22 11:59:00 UTC</hide_item_response_correctness_at>
|
47
53
|
<assignment identifier="g390e22b33353b658bb23abbce000414f">
|
48
54
|
<title>asd09sdfaxsdflj</title>
|
49
55
|
<due_at>2020-05-23T04:59:59</due_at>
|
@@ -31,6 +31,7 @@ context 'Canvas Assessment Meta Data' do
|
|
31
31
|
expect(assessment.canvas_ip_filter).to eq(ip_filter)
|
32
32
|
expect(assessment.canvas_time_limit).to eq(time_limit)
|
33
33
|
expect(assessment.canvas_show_correct_answers?).to eq(show_answers)
|
34
|
+
expect(assessment.canvas_show_correct_answers_last_attempt?).to eq(show_correct_answers_last_attempt)
|
34
35
|
expect(assessment.canvas_show_correct_answers_at).to eq(show_answers_at)
|
35
36
|
expect(assessment.canvas_hide_correct_answers_at).to eq(hide_answers_at)
|
36
37
|
expect(assessment.canvas_allow_clear_mc_selection?).to eq(allow_clear_mc_selection)
|
@@ -48,6 +49,13 @@ context 'Canvas Assessment Meta Data' do
|
|
48
49
|
expect(assessment.canvas_display_points_possible?).to eq(display_points_possible)
|
49
50
|
expect(assessment.canvas_display_item_correct_answer?).to eq(display_item_correct_answer)
|
50
51
|
expect(assessment.canvas_display_item_response_correctness?).to eq(display_item_response_correctness)
|
52
|
+
expect(assessment.canvas_display_item_response_qualifier).to eq(display_item_response_qualifier)
|
53
|
+
expect(assessment.canvas_show_item_responses_at).to eq(show_item_responses_at)
|
54
|
+
expect(assessment.canvas_hide_item_responses_at).to eq(hide_item_responses_at)
|
55
|
+
expect(assessment.canvas_display_item_response_correctness_qualifier)
|
56
|
+
.to eq(display_item_response_correctness_qualifier)
|
57
|
+
expect(assessment.canvas_show_item_response_correctness_at).to eq(show_item_response_correctness_at)
|
58
|
+
expect(assessment.canvas_hide_item_response_correctness_at).to eq(hide_item_response_correctness_at)
|
51
59
|
end
|
52
60
|
end
|
53
61
|
|
@@ -78,6 +86,7 @@ context 'Canvas Assessment Meta Data' do
|
|
78
86
|
let(:ip_filter) { nil }
|
79
87
|
let(:time_limit) { nil }
|
80
88
|
let(:show_answers) { true }
|
89
|
+
let(:show_correct_answers_last_attempt) { false }
|
81
90
|
let(:show_answers_at) { nil }
|
82
91
|
let(:hide_answers_at) { nil }
|
83
92
|
let(:allow_clear_mc_selection) { false }
|
@@ -87,7 +96,7 @@ context 'Canvas Assessment Meta Data' do
|
|
87
96
|
let(:lb_monitor_data) { nil }
|
88
97
|
let(:nq_ip_filters_enabled) { false }
|
89
98
|
let(:nq_ip_filters) { [] }
|
90
|
-
let(:result_view_restricted) {
|
99
|
+
let(:result_view_restricted) { nil }
|
91
100
|
let(:display_items) { false }
|
92
101
|
let(:display_item_response) { false }
|
93
102
|
let(:display_item_feedback) { false }
|
@@ -95,6 +104,12 @@ context 'Canvas Assessment Meta Data' do
|
|
95
104
|
let(:display_points_possible) { false }
|
96
105
|
let(:display_item_correct_answer) { false }
|
97
106
|
let(:display_item_response_correctness) { false }
|
107
|
+
let(:display_item_response_qualifier) { nil }
|
108
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
109
|
+
let(:show_item_responses_at) { nil }
|
110
|
+
let(:hide_item_responses_at) { nil }
|
111
|
+
let(:show_item_response_correctness_at) { nil }
|
112
|
+
let(:hide_item_response_correctness_at) { nil }
|
98
113
|
|
99
114
|
include_examples('loads canvas meta data')
|
100
115
|
end
|
@@ -126,6 +141,7 @@ context 'Canvas Assessment Meta Data' do
|
|
126
141
|
let(:ip_filter) { '192.168.217.1/24' }
|
127
142
|
let(:time_limit) { 187 }
|
128
143
|
let(:show_answers) { true }
|
144
|
+
let(:show_correct_answers_last_attempt) { false }
|
129
145
|
let(:show_answers_at) { '2041-02-17 06:00:00 UTC' }
|
130
146
|
let(:hide_answers_at) { '2042-12-26 06:00:00 UTC' }
|
131
147
|
let(:allow_clear_mc_selection) { true }
|
@@ -148,6 +164,12 @@ context 'Canvas Assessment Meta Data' do
|
|
148
164
|
let(:display_points_possible) { true }
|
149
165
|
let(:display_item_correct_answer) { true }
|
150
166
|
let(:display_item_response_correctness) { true }
|
167
|
+
let(:display_item_response_qualifier) { 'once_per_attempt' }
|
168
|
+
let(:display_item_response_correctness_qualifier) { 'after_last_attempt' }
|
169
|
+
let(:show_item_responses_at) { '2024-07-18 06:00:00 UTC' }
|
170
|
+
let(:hide_item_responses_at) { '2024-07-21 11:59:00 UTC' }
|
171
|
+
let(:show_item_response_correctness_at) { '2024-07-19 06:00:00 UTC' }
|
172
|
+
let(:hide_item_response_correctness_at) { '2024-07-22 11:59:00 UTC' }
|
151
173
|
|
152
174
|
include_examples('loads canvas meta data')
|
153
175
|
end
|
@@ -179,6 +201,7 @@ context 'Canvas Assessment Meta Data' do
|
|
179
201
|
let(:ip_filter) { nil }
|
180
202
|
let(:time_limit) { nil }
|
181
203
|
let(:show_answers) { false }
|
204
|
+
let(:show_correct_answers_last_attempt) { false }
|
182
205
|
let(:show_answers_at) { nil }
|
183
206
|
let(:hide_answers_at) { nil }
|
184
207
|
let(:allow_clear_mc_selection) { false }
|
@@ -188,7 +211,7 @@ context 'Canvas Assessment Meta Data' do
|
|
188
211
|
let(:lb_monitor_data) { nil }
|
189
212
|
let(:nq_ip_filters_enabled) { false }
|
190
213
|
let(:nq_ip_filters) { [] }
|
191
|
-
let(:result_view_restricted) {
|
214
|
+
let(:result_view_restricted) { nil }
|
192
215
|
let(:display_items) { false }
|
193
216
|
let(:display_item_response) { false }
|
194
217
|
let(:display_item_feedback) { false }
|
@@ -196,6 +219,12 @@ context 'Canvas Assessment Meta Data' do
|
|
196
219
|
let(:display_points_possible) { false }
|
197
220
|
let(:display_item_correct_answer) { false }
|
198
221
|
let(:display_item_response_correctness) { false }
|
222
|
+
let(:display_item_response_qualifier) { nil }
|
223
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
224
|
+
let(:show_item_responses_at) { nil }
|
225
|
+
let(:hide_item_responses_at) { nil }
|
226
|
+
let(:show_item_response_correctness_at) { nil }
|
227
|
+
let(:hide_item_response_correctness_at) { nil }
|
199
228
|
|
200
229
|
include_examples('loads canvas meta data')
|
201
230
|
end
|
@@ -227,6 +256,7 @@ context 'Canvas Assessment Meta Data' do
|
|
227
256
|
let(:ip_filter) { nil }
|
228
257
|
let(:time_limit) { nil }
|
229
258
|
let(:show_answers) { true }
|
259
|
+
let(:show_correct_answers_last_attempt) { false }
|
230
260
|
let(:show_answers_at) { nil }
|
231
261
|
let(:hide_answers_at) { nil }
|
232
262
|
let(:allow_clear_mc_selection) { false }
|
@@ -236,7 +266,7 @@ context 'Canvas Assessment Meta Data' do
|
|
236
266
|
let(:lb_monitor_data) { nil }
|
237
267
|
let(:nq_ip_filters_enabled) { false }
|
238
268
|
let(:nq_ip_filters) { [] }
|
239
|
-
let(:result_view_restricted) {
|
269
|
+
let(:result_view_restricted) { nil }
|
240
270
|
let(:display_items) { false }
|
241
271
|
let(:display_item_response) { false }
|
242
272
|
let(:display_item_feedback) { false }
|
@@ -244,6 +274,12 @@ context 'Canvas Assessment Meta Data' do
|
|
244
274
|
let(:display_points_possible) { false }
|
245
275
|
let(:display_item_correct_answer) { false }
|
246
276
|
let(:display_item_response_correctness) { false }
|
277
|
+
let(:display_item_response_qualifier) { nil }
|
278
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
279
|
+
let(:show_item_responses_at) { nil }
|
280
|
+
let(:hide_item_responses_at) { nil }
|
281
|
+
let(:show_item_response_correctness_at) { nil }
|
282
|
+
let(:hide_item_response_correctness_at) { nil }
|
247
283
|
|
248
284
|
include_examples('loads canvas meta data')
|
249
285
|
end
|
@@ -243,7 +243,7 @@ describe Qti::V1::Models::Interactions::FillBlankInteraction do
|
|
243
243
|
41dfd716-8fd9-466a-97fa-33d353e44b42-1
|
244
244
|
a053119f-6a61-4372-ac79-4b2a7de0232f-0]
|
245
245
|
end
|
246
|
-
let(:scoring_data_values) { %w[red blue green yellow teal ^orange
|
246
|
+
let(:scoring_data_values) { %w[red blue green yellow teal ^orange<s>$] }
|
247
247
|
let(:scoring_data_case) { %w[no no no no no no] }
|
248
248
|
let(:scoring_data_algorithm) do
|
249
249
|
%w[TextContainsAnswer TextCloseEnough TextEquivalence TextInChoices TextInChoices TextRegex]
|
@@ -284,7 +284,7 @@ describe Qti::V1::Models::Interactions::FillBlankInteraction do
|
|
284
284
|
type: 'blank' },
|
285
285
|
{ id: 'stem_8', position: 9, type: 'text', value: ', and ' },
|
286
286
|
{ blank_id: 'response_a053119f-6a61-4372-ac79-4b2a7de0232f',
|
287
|
-
blank_name: '^orange
|
287
|
+
blank_name: '^orange<s>$',
|
288
288
|
id: 'stem_9',
|
289
289
|
position: 10,
|
290
290
|
type: 'blank' },
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.23.
|
4
|
+
version: 2.23.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Diaz
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2024-
|
15
|
+
date: 2024-07-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionview
|