qti 2.23.2 → 2.23.4
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 +39 -4
- data/lib/qti/version.rb +1 -1
- data/spec/fixtures/test_imscc_canvas/i913965373124f56ca136e87deb040c03/assessment_meta.xml +1 -0
- data/spec/fixtures/test_imscc_canvas/ife643a8a04b48b22acab95de6c01f1cc/assessment_meta.xml +1 -0
- data/spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/assessment_meta.xml +1 -0
- data/spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml +7 -0
- data/spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml +1 -0
- data/spec/lib/qti/models/assessment_meta_spec.rb +44 -3
- 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: eeed8fd2f47c4cc0e9b58dc60cf95a4d0c5c371c351b9351243cf198f60b4ad2
|
4
|
+
data.tar.gz: 65671e7242200110475199e9ff8a3fa847e60b90d6c6d24269e45ec08b431a06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5053826023e5230e712cf9360352ca1572274fda65b88d93da294a4138d9e4411a82208188f8c0f2e0d79a1c0729303e3976b4ddea46828688a8967f0a4b9958
|
7
|
+
data.tar.gz: 23e438f500f4c6fe8dffe5466aaa61acc6f27c50a669176da2e4682891a674546683584321d7ef2e72c469716cc275b59c7f651017d65cc098a2c4dc7c161a78
|
@@ -90,6 +90,14 @@ module Qti
|
|
90
90
|
allowed_attempts_raw.to_i
|
91
91
|
end
|
92
92
|
|
93
|
+
def build_on_last_attempt
|
94
|
+
tag_under_quiz('build_on_last_attempt')
|
95
|
+
end
|
96
|
+
|
97
|
+
def build_on_last_attempt?
|
98
|
+
string_true?(build_on_last_attempt)
|
99
|
+
end
|
100
|
+
|
93
101
|
def one_question_at_a_time
|
94
102
|
tag_under_quiz('one_question_at_a_time')
|
95
103
|
end
|
@@ -130,7 +138,7 @@ module Qti
|
|
130
138
|
string_true?(show_correct_answers_last_attempt)
|
131
139
|
end
|
132
140
|
|
133
|
-
def
|
141
|
+
def only_visible_to_overrides
|
134
142
|
tag_under_quiz('only_visible_to_overrides')
|
135
143
|
end
|
136
144
|
|
@@ -240,7 +248,7 @@ module Qti
|
|
240
248
|
end
|
241
249
|
|
242
250
|
def result_view_restricted?
|
243
|
-
string_true?(result_view_restricted)
|
251
|
+
string_true?(result_view_restricted) || false if result_view_restricted
|
244
252
|
end
|
245
253
|
|
246
254
|
def display_items
|
@@ -299,6 +307,30 @@ module Qti
|
|
299
307
|
string_true?(display_item_response_correctness)
|
300
308
|
end
|
301
309
|
|
310
|
+
def display_item_response_qualifier
|
311
|
+
tag_under_quiz('display_item_response_qualifier')
|
312
|
+
end
|
313
|
+
|
314
|
+
def show_item_responses_at
|
315
|
+
tag_under_quiz('show_item_responses_at')
|
316
|
+
end
|
317
|
+
|
318
|
+
def hide_item_responses_at
|
319
|
+
tag_under_quiz('hide_item_responses_at')
|
320
|
+
end
|
321
|
+
|
322
|
+
def display_item_response_correctness_qualifier
|
323
|
+
tag_under_quiz('display_item_response_correctness_qualifier')
|
324
|
+
end
|
325
|
+
|
326
|
+
def show_item_response_correctness_at
|
327
|
+
tag_under_quiz('show_item_response_correctness_at')
|
328
|
+
end
|
329
|
+
|
330
|
+
def hide_item_response_correctness_at
|
331
|
+
tag_under_quiz('hide_item_response_correctness_at')
|
332
|
+
end
|
333
|
+
|
302
334
|
private
|
303
335
|
|
304
336
|
def tag_under_quiz(tag)
|
@@ -319,9 +351,9 @@ module Qti
|
|
319
351
|
:shuffle_answers?, :calculator_type, :scoring_policy,
|
320
352
|
:cooling_period_seconds, :points_possible,
|
321
353
|
:hide_results, :quiz_type, :anonymous_submissions?,
|
322
|
-
:could_be_locked?, :allowed_attempts, :one_question_at_a_time?,
|
354
|
+
:could_be_locked?, :allowed_attempts, :build_on_last_attempt?, :one_question_at_a_time?,
|
323
355
|
:cant_go_back?, :available?, :one_time_results?,
|
324
|
-
:
|
356
|
+
:show_correct_answers_last_attempt?, :only_visible_to_overrides?,
|
325
357
|
:module_locked?, :access_code, :ip_filter, :time_limit,
|
326
358
|
:show_correct_answers_at, :hide_correct_answers_at,
|
327
359
|
:lock_at, :unlock_at, :due_at, :require_lockdown_browser?,
|
@@ -332,6 +364,9 @@ module Qti
|
|
332
364
|
:result_view_restricted?, :display_items?, :display_item_feedback?,
|
333
365
|
:display_item_response?, :display_points_awarded?, :display_points_possible?,
|
334
366
|
:display_item_correct_answer?, :display_item_response_correctness?,
|
367
|
+
:display_item_response_qualifier, :show_item_responses_at,
|
368
|
+
:hide_item_responses_at, :display_item_response_correctness_qualifier,
|
369
|
+
:show_item_response_correctness_at, :hide_item_response_correctness_at,
|
335
370
|
to: :@canvas_meta_data, prefix: :canvas, allow_nil: true
|
336
371
|
|
337
372
|
alias canvas_instructions canvas_description
|
data/lib/qti/version.rb
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
<anonymous_submissions>false</anonymous_submissions>
|
16
16
|
<could_be_locked>false</could_be_locked>
|
17
17
|
<allowed_attempts>1</allowed_attempts>
|
18
|
+
<build_on_last_attempt>true</build_on_last_attempt>
|
18
19
|
<one_question_at_a_time>false</one_question_at_a_time>
|
19
20
|
<cant_go_back>false</cant_go_back>
|
20
21
|
<available>true</available>
|
@@ -15,6 +15,7 @@
|
|
15
15
|
<anonymous_submissions>false</anonymous_submissions>
|
16
16
|
<could_be_locked>false</could_be_locked>
|
17
17
|
<allowed_attempts>1</allowed_attempts>
|
18
|
+
<build_on_last_attempt>true</build_on_last_attempt>
|
18
19
|
<one_question_at_a_time>false</one_question_at_a_time>
|
19
20
|
<cant_go_back>false</cant_go_back>
|
20
21
|
<available>true</available>
|
data/spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/assessment_meta.xml
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
<anonymous_submissions>false</anonymous_submissions>
|
15
15
|
<could_be_locked>false</could_be_locked>
|
16
16
|
<allowed_attempts>1</allowed_attempts>
|
17
|
+
<build_on_last_attempt>true</build_on_last_attempt>
|
17
18
|
<one_question_at_a_time>false</one_question_at_a_time>
|
18
19
|
<cant_go_back>false</cant_go_back>
|
19
20
|
<available>true</available>
|
@@ -26,6 +26,7 @@
|
|
26
26
|
<could_be_locked>false</could_be_locked>
|
27
27
|
<time_limit>187</time_limit>
|
28
28
|
<allowed_attempts>52</allowed_attempts>
|
29
|
+
<build_on_last_attempt>false</build_on_last_attempt>
|
29
30
|
<one_question_at_a_time>true</one_question_at_a_time>
|
30
31
|
<cant_go_back>true</cant_go_back>
|
31
32
|
<available>false</available>
|
@@ -44,6 +45,12 @@
|
|
44
45
|
<display_points_possible>true</display_points_possible>
|
45
46
|
<display_item_correct_answer>true</display_item_correct_answer>
|
46
47
|
<display_item_response_correctness>true</display_item_response_correctness>
|
48
|
+
<display_item_response_qualifier>once_per_attempt</display_item_response_qualifier>
|
49
|
+
<show_item_responses_at>2024-07-18 06:00:00 UTC</show_item_responses_at>
|
50
|
+
<hide_item_responses_at>2024-07-21 11:59:00 UTC</hide_item_responses_at>
|
51
|
+
<display_item_response_correctness_qualifier>after_last_attempt</display_item_response_correctness_qualifier>
|
52
|
+
<show_item_response_correctness_at>2024-07-19 06:00:00 UTC</show_item_response_correctness_at>
|
53
|
+
<hide_item_response_correctness_at>2024-07-22 11:59:00 UTC</hide_item_response_correctness_at>
|
47
54
|
<assignment identifier="g390e22b33353b658bb23abbce000414f">
|
48
55
|
<title>asd09sdfaxsdflj</title>
|
49
56
|
<due_at>2020-05-23T04:59:59</due_at>
|
@@ -23,6 +23,7 @@
|
|
23
23
|
<could_be_locked></could_be_locked>
|
24
24
|
<time_limit></time_limit>
|
25
25
|
<allowed_attempts></allowed_attempts>
|
26
|
+
<build_on_last_attempt></build_on_last_attempt>
|
26
27
|
<one_question_at_a_time></one_question_at_a_time>
|
27
28
|
<cant_go_back></cant_go_back>
|
28
29
|
<available></available>
|
@@ -12,6 +12,7 @@ context 'Canvas Assessment Meta Data' do
|
|
12
12
|
expect(assessment.canvas_points_possible).to eq(points_possible)
|
13
13
|
expect(assessment.canvas_one_question_at_a_time?).to eq(oqaat)
|
14
14
|
expect(assessment.canvas_allowed_attempts).to eq(allowed_attempts)
|
15
|
+
expect(assessment.canvas_build_on_last_attempt?).to eq(build_on_last_attempt)
|
15
16
|
expect(assessment.canvas_hide_results).to eq(hide_results)
|
16
17
|
expect(assessment.canvas_quiz_type).to eq(quiz_type)
|
17
18
|
expect(assessment.canvas_anonymous_submissions?).to eq(anon_submissions)
|
@@ -31,6 +32,7 @@ context 'Canvas Assessment Meta Data' do
|
|
31
32
|
expect(assessment.canvas_ip_filter).to eq(ip_filter)
|
32
33
|
expect(assessment.canvas_time_limit).to eq(time_limit)
|
33
34
|
expect(assessment.canvas_show_correct_answers?).to eq(show_answers)
|
35
|
+
expect(assessment.canvas_show_correct_answers_last_attempt?).to eq(show_correct_answers_last_attempt)
|
34
36
|
expect(assessment.canvas_show_correct_answers_at).to eq(show_answers_at)
|
35
37
|
expect(assessment.canvas_hide_correct_answers_at).to eq(hide_answers_at)
|
36
38
|
expect(assessment.canvas_allow_clear_mc_selection?).to eq(allow_clear_mc_selection)
|
@@ -48,6 +50,13 @@ context 'Canvas Assessment Meta Data' do
|
|
48
50
|
expect(assessment.canvas_display_points_possible?).to eq(display_points_possible)
|
49
51
|
expect(assessment.canvas_display_item_correct_answer?).to eq(display_item_correct_answer)
|
50
52
|
expect(assessment.canvas_display_item_response_correctness?).to eq(display_item_response_correctness)
|
53
|
+
expect(assessment.canvas_display_item_response_qualifier).to eq(display_item_response_qualifier)
|
54
|
+
expect(assessment.canvas_show_item_responses_at).to eq(show_item_responses_at)
|
55
|
+
expect(assessment.canvas_hide_item_responses_at).to eq(hide_item_responses_at)
|
56
|
+
expect(assessment.canvas_display_item_response_correctness_qualifier)
|
57
|
+
.to eq(display_item_response_correctness_qualifier)
|
58
|
+
expect(assessment.canvas_show_item_response_correctness_at).to eq(show_item_response_correctness_at)
|
59
|
+
expect(assessment.canvas_hide_item_response_correctness_at).to eq(hide_item_response_correctness_at)
|
51
60
|
end
|
52
61
|
end
|
53
62
|
|
@@ -59,6 +68,7 @@ context 'Canvas Assessment Meta Data' do
|
|
59
68
|
let(:points_possible) { 4.0 }
|
60
69
|
let(:oqaat) { false }
|
61
70
|
let(:allowed_attempts) { 1 }
|
71
|
+
let(:build_on_last_attempt) { true }
|
62
72
|
let(:hide_results) { nil }
|
63
73
|
let(:quiz_type) { 'assignment' }
|
64
74
|
let('anon_submissions') { false }
|
@@ -78,6 +88,7 @@ context 'Canvas Assessment Meta Data' do
|
|
78
88
|
let(:ip_filter) { nil }
|
79
89
|
let(:time_limit) { nil }
|
80
90
|
let(:show_answers) { true }
|
91
|
+
let(:show_correct_answers_last_attempt) { false }
|
81
92
|
let(:show_answers_at) { nil }
|
82
93
|
let(:hide_answers_at) { nil }
|
83
94
|
let(:allow_clear_mc_selection) { false }
|
@@ -87,7 +98,7 @@ context 'Canvas Assessment Meta Data' do
|
|
87
98
|
let(:lb_monitor_data) { nil }
|
88
99
|
let(:nq_ip_filters_enabled) { false }
|
89
100
|
let(:nq_ip_filters) { [] }
|
90
|
-
let(:result_view_restricted) {
|
101
|
+
let(:result_view_restricted) { nil }
|
91
102
|
let(:display_items) { false }
|
92
103
|
let(:display_item_response) { false }
|
93
104
|
let(:display_item_feedback) { false }
|
@@ -95,6 +106,12 @@ context 'Canvas Assessment Meta Data' do
|
|
95
106
|
let(:display_points_possible) { false }
|
96
107
|
let(:display_item_correct_answer) { false }
|
97
108
|
let(:display_item_response_correctness) { false }
|
109
|
+
let(:display_item_response_qualifier) { nil }
|
110
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
111
|
+
let(:show_item_responses_at) { nil }
|
112
|
+
let(:hide_item_responses_at) { nil }
|
113
|
+
let(:show_item_response_correctness_at) { nil }
|
114
|
+
let(:hide_item_response_correctness_at) { nil }
|
98
115
|
|
99
116
|
include_examples('loads canvas meta data')
|
100
117
|
end
|
@@ -107,6 +124,7 @@ context 'Canvas Assessment Meta Data' do
|
|
107
124
|
let(:points_possible) { 0.0 }
|
108
125
|
let(:oqaat) { true }
|
109
126
|
let(:allowed_attempts) { 52 }
|
127
|
+
let(:build_on_last_attempt) { false }
|
110
128
|
let(:hide_results) { nil }
|
111
129
|
let(:quiz_type) { 'assignment' }
|
112
130
|
let('anon_submissions') { false }
|
@@ -126,6 +144,7 @@ context 'Canvas Assessment Meta Data' do
|
|
126
144
|
let(:ip_filter) { '192.168.217.1/24' }
|
127
145
|
let(:time_limit) { 187 }
|
128
146
|
let(:show_answers) { true }
|
147
|
+
let(:show_correct_answers_last_attempt) { false }
|
129
148
|
let(:show_answers_at) { '2041-02-17 06:00:00 UTC' }
|
130
149
|
let(:hide_answers_at) { '2042-12-26 06:00:00 UTC' }
|
131
150
|
let(:allow_clear_mc_selection) { true }
|
@@ -148,6 +167,12 @@ context 'Canvas Assessment Meta Data' do
|
|
148
167
|
let(:display_points_possible) { true }
|
149
168
|
let(:display_item_correct_answer) { true }
|
150
169
|
let(:display_item_response_correctness) { true }
|
170
|
+
let(:display_item_response_qualifier) { 'once_per_attempt' }
|
171
|
+
let(:display_item_response_correctness_qualifier) { 'after_last_attempt' }
|
172
|
+
let(:show_item_responses_at) { '2024-07-18 06:00:00 UTC' }
|
173
|
+
let(:hide_item_responses_at) { '2024-07-21 11:59:00 UTC' }
|
174
|
+
let(:show_item_response_correctness_at) { '2024-07-19 06:00:00 UTC' }
|
175
|
+
let(:hide_item_response_correctness_at) { '2024-07-22 11:59:00 UTC' }
|
151
176
|
|
152
177
|
include_examples('loads canvas meta data')
|
153
178
|
end
|
@@ -160,6 +185,7 @@ context 'Canvas Assessment Meta Data' do
|
|
160
185
|
let(:points_possible) { 0.0 }
|
161
186
|
let(:oqaat) { false }
|
162
187
|
let(:allowed_attempts) { 0 }
|
188
|
+
let(:build_on_last_attempt) { false }
|
163
189
|
let(:hide_results) { nil }
|
164
190
|
let(:quiz_type) { nil }
|
165
191
|
let('anon_submissions') { false }
|
@@ -179,6 +205,7 @@ context 'Canvas Assessment Meta Data' do
|
|
179
205
|
let(:ip_filter) { nil }
|
180
206
|
let(:time_limit) { nil }
|
181
207
|
let(:show_answers) { false }
|
208
|
+
let(:show_correct_answers_last_attempt) { false }
|
182
209
|
let(:show_answers_at) { nil }
|
183
210
|
let(:hide_answers_at) { nil }
|
184
211
|
let(:allow_clear_mc_selection) { false }
|
@@ -188,7 +215,7 @@ context 'Canvas Assessment Meta Data' do
|
|
188
215
|
let(:lb_monitor_data) { nil }
|
189
216
|
let(:nq_ip_filters_enabled) { false }
|
190
217
|
let(:nq_ip_filters) { [] }
|
191
|
-
let(:result_view_restricted) {
|
218
|
+
let(:result_view_restricted) { nil }
|
192
219
|
let(:display_items) { false }
|
193
220
|
let(:display_item_response) { false }
|
194
221
|
let(:display_item_feedback) { false }
|
@@ -196,6 +223,12 @@ context 'Canvas Assessment Meta Data' do
|
|
196
223
|
let(:display_points_possible) { false }
|
197
224
|
let(:display_item_correct_answer) { false }
|
198
225
|
let(:display_item_response_correctness) { false }
|
226
|
+
let(:display_item_response_qualifier) { nil }
|
227
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
228
|
+
let(:show_item_responses_at) { nil }
|
229
|
+
let(:hide_item_responses_at) { nil }
|
230
|
+
let(:show_item_response_correctness_at) { nil }
|
231
|
+
let(:hide_item_response_correctness_at) { nil }
|
199
232
|
|
200
233
|
include_examples('loads canvas meta data')
|
201
234
|
end
|
@@ -208,6 +241,7 @@ context 'Canvas Assessment Meta Data' do
|
|
208
241
|
let(:points_possible) { 1.0 }
|
209
242
|
let(:oqaat) { false }
|
210
243
|
let(:allowed_attempts) { 1 }
|
244
|
+
let(:build_on_last_attempt) { true }
|
211
245
|
let(:hide_results) { nil }
|
212
246
|
let(:quiz_type) { 'assignment' }
|
213
247
|
let('anon_submissions') { false }
|
@@ -227,6 +261,7 @@ context 'Canvas Assessment Meta Data' do
|
|
227
261
|
let(:ip_filter) { nil }
|
228
262
|
let(:time_limit) { nil }
|
229
263
|
let(:show_answers) { true }
|
264
|
+
let(:show_correct_answers_last_attempt) { false }
|
230
265
|
let(:show_answers_at) { nil }
|
231
266
|
let(:hide_answers_at) { nil }
|
232
267
|
let(:allow_clear_mc_selection) { false }
|
@@ -236,7 +271,7 @@ context 'Canvas Assessment Meta Data' do
|
|
236
271
|
let(:lb_monitor_data) { nil }
|
237
272
|
let(:nq_ip_filters_enabled) { false }
|
238
273
|
let(:nq_ip_filters) { [] }
|
239
|
-
let(:result_view_restricted) {
|
274
|
+
let(:result_view_restricted) { nil }
|
240
275
|
let(:display_items) { false }
|
241
276
|
let(:display_item_response) { false }
|
242
277
|
let(:display_item_feedback) { false }
|
@@ -244,6 +279,12 @@ context 'Canvas Assessment Meta Data' do
|
|
244
279
|
let(:display_points_possible) { false }
|
245
280
|
let(:display_item_correct_answer) { false }
|
246
281
|
let(:display_item_response_correctness) { false }
|
282
|
+
let(:display_item_response_qualifier) { nil }
|
283
|
+
let(:display_item_response_correctness_qualifier) { nil }
|
284
|
+
let(:show_item_responses_at) { nil }
|
285
|
+
let(:hide_item_responses_at) { nil }
|
286
|
+
let(:show_item_response_correctness_at) { nil }
|
287
|
+
let(:hide_item_response_correctness_at) { nil }
|
247
288
|
|
248
289
|
include_examples('loads canvas meta data')
|
249
290
|
end
|
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.4
|
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-08-01 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionview
|