qti 2.28.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76e0ccb82cec45bc227f147d2b1d505b4117131e1aa6fbc166553efbbb4e248e
|
|
4
|
+
data.tar.gz: 180bb912b8a0d53b398ac62fab21922ae4da140817e86c27abb4783bd843f6ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c51e5b108c05d11ec919a5118de0e9d5fdcfed4403defecc353f6d93bb083fb6f281db0fd74d1ff636fafda4982981b47ba618198068a933f5991ffac3ec923
|
|
7
|
+
data.tar.gz: 55a94df5be4713653c8db8965ada79ea5daee2f1c0c9fe69a92558be7f6a080e3136ee3f6dc5d193d6dc730b6d2235dabb07135ec1e6d19f6311cfe8675baba1
|
|
@@ -105,6 +105,27 @@ module Qti
|
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
def case_sensitive
|
|
109
|
+
@case_sensitive ||= begin
|
|
110
|
+
if case_sensitive_metadata?
|
|
111
|
+
case_sensitive_metadata_label = qti_metadata_children.children.find do |node|
|
|
112
|
+
node.text == 'case_sensitive'
|
|
113
|
+
end
|
|
114
|
+
case_sensitive_metadata_label.next.text
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def case_sensitive_metadata?
|
|
120
|
+
if @doc.at_xpath('.//xmlns:qtimetadata').present?
|
|
121
|
+
qti_metadata_children.children.find do |node|
|
|
122
|
+
node.text == 'case_sensitive'
|
|
123
|
+
end.present?
|
|
124
|
+
else
|
|
125
|
+
false
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
108
129
|
def decvar_maxvalue
|
|
109
130
|
@doc.at_xpath('.//xmlns:decvar/@maxvalue')&.value&.to_i ||
|
|
110
131
|
@doc.at_xpath('.//xmlns:decvar/@defaultval')&.value&.to_i || 0
|
data/lib/qti/version.rb
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
2
|
+
<questestinterop xmlns="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/xsd/ims_qtiasiv1p2p1.xsd">
|
|
3
|
+
<item ident="97b0baae152f137d14503e2a2125c4d0" title="NQ Fill in Multiple Blanks Case Sensitive">
|
|
4
|
+
<itemmetadata>
|
|
5
|
+
<qtimetadata>
|
|
6
|
+
<qtimetadatafield>
|
|
7
|
+
<fieldlabel>question_type</fieldlabel>
|
|
8
|
+
<fieldentry>fill_in_multiple_blanks_question</fieldentry>
|
|
9
|
+
</qtimetadatafield>
|
|
10
|
+
<qtimetadatafield>
|
|
11
|
+
<fieldlabel>points_possible</fieldlabel>
|
|
12
|
+
<fieldentry>1.0</fieldentry>
|
|
13
|
+
</qtimetadatafield>
|
|
14
|
+
<qtimetadatafield>
|
|
15
|
+
<fieldlabel>original_answer_ids</fieldlabel>
|
|
16
|
+
<fieldentry>["bafd8242-ecdb-4158-a6d3-4ff15e016cb8-0", "d719aee0-6ce0-462c-9c0d-be63ba8d3408-0", "ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90-0", "41dfd716-8fd9-466a-97fa-33d353e44b42-0", "41dfd716-8fd9-466a-97fa-33d353e44b42-1", "a053119f-6a61-4372-ac79-4b2a7de0232f-0"]</fieldentry>
|
|
17
|
+
</qtimetadatafield>
|
|
18
|
+
<qtimetadatafield>
|
|
19
|
+
<fieldlabel>assessment_question_identifierref</fieldlabel>
|
|
20
|
+
<fieldentry>eaeec2d07f83998ee7b317ffde86dbc0</fieldentry>
|
|
21
|
+
</qtimetadatafield>
|
|
22
|
+
<qtimetadatafield>
|
|
23
|
+
<fieldlabel>case_sensitive</fieldlabel>
|
|
24
|
+
<fieldentry>true</fieldentry>
|
|
25
|
+
</qtimetadatafield>
|
|
26
|
+
</qtimetadata>
|
|
27
|
+
</itemmetadata>
|
|
28
|
+
<presentation>
|
|
29
|
+
<material>
|
|
30
|
+
<mattext texttype="text/html"><p>Roses are [bafd8242-ecdb-4158-a6d3-4ff15e016cb8], [d719aee0-6ce0-462c-9c0d-be63ba8d3408], [ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90], [41dfd716-8fd9-466a-97fa-33d353e44b42], and [a053119f-6a61-4372-ac79-4b2a7de0232f].</p></mattext>
|
|
31
|
+
</material>
|
|
32
|
+
<response_lid ident="response_bafd8242-ecdb-4158-a6d3-4ff15e016cb8">
|
|
33
|
+
<material>
|
|
34
|
+
<mattext>red</mattext>
|
|
35
|
+
</material>
|
|
36
|
+
<render_choice>
|
|
37
|
+
<response_label ident="bafd8242-ecdb-4158-a6d3-4ff15e016cb8-0" scoring_algorithm='TextContainsAnswer' answer_type='openEntry'>
|
|
38
|
+
<material>
|
|
39
|
+
<mattext texttype="text/plain">red</mattext>
|
|
40
|
+
</material>
|
|
41
|
+
</response_label>
|
|
42
|
+
</render_choice>
|
|
43
|
+
</response_lid>
|
|
44
|
+
<response_lid ident="response_d719aee0-6ce0-462c-9c0d-be63ba8d3408">
|
|
45
|
+
<material>
|
|
46
|
+
<mattext>blue</mattext>
|
|
47
|
+
</material>
|
|
48
|
+
<render_choice>
|
|
49
|
+
<response_label ident="d719aee0-6ce0-462c-9c0d-be63ba8d3408-0" scoring_algorithm='TextCloseEnough' answer_type='openEntry' levenshtein_distance='1' ignore_case='true'>
|
|
50
|
+
<material>
|
|
51
|
+
<mattext texttype="text/plain">blue</mattext>
|
|
52
|
+
</material>
|
|
53
|
+
</response_label>
|
|
54
|
+
</render_choice>
|
|
55
|
+
</response_lid>
|
|
56
|
+
<response_lid ident="response_ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90">
|
|
57
|
+
<material>
|
|
58
|
+
<mattext>green</mattext>
|
|
59
|
+
</material>
|
|
60
|
+
<render_choice>
|
|
61
|
+
<response_label ident="ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90-0" scoring_algorithm='TextEquivalence' answer_type='openEntry'>
|
|
62
|
+
<material>
|
|
63
|
+
<mattext texttype="text/plain">green</mattext>
|
|
64
|
+
</material>
|
|
65
|
+
</response_label>
|
|
66
|
+
</render_choice>
|
|
67
|
+
</response_lid>
|
|
68
|
+
<response_lid ident="response_41dfd716-8fd9-466a-97fa-33d353e44b42">
|
|
69
|
+
<material>
|
|
70
|
+
<mattext>yellow</mattext>
|
|
71
|
+
</material>
|
|
72
|
+
<render_choice>
|
|
73
|
+
<response_label ident="41dfd716-8fd9-466a-97fa-33d353e44b42-0" scoring_algorithm='TextInChoices' answer_type='openEntry'>
|
|
74
|
+
<material>
|
|
75
|
+
<mattext texttype="text/plain">yellow</mattext>
|
|
76
|
+
</material>
|
|
77
|
+
</response_label>
|
|
78
|
+
<response_label ident="41dfd716-8fd9-466a-97fa-33d353e44b42-1" scoring_algorithm='TextInChoices' answer_type='openEntry'>
|
|
79
|
+
<material>
|
|
80
|
+
<mattext texttype="text/plain">teal</mattext>
|
|
81
|
+
</material>
|
|
82
|
+
</response_label>
|
|
83
|
+
</render_choice>
|
|
84
|
+
</response_lid>
|
|
85
|
+
<response_lid ident="response_a053119f-6a61-4372-ac79-4b2a7de0232f">
|
|
86
|
+
<material>
|
|
87
|
+
<mattext>^orange<s>$</mattext>
|
|
88
|
+
</material>
|
|
89
|
+
<render_choice>
|
|
90
|
+
<response_label ident="a053119f-6a61-4372-ac79-4b2a7de0232f-0" scoring_algorithm='TextRegex' answer_type='openEntry'>
|
|
91
|
+
<material>
|
|
92
|
+
<mattext texttype="text/plain">^orange<s>$</mattext>
|
|
93
|
+
</material>
|
|
94
|
+
</response_label>
|
|
95
|
+
</render_choice>
|
|
96
|
+
</response_lid>
|
|
97
|
+
</presentation>
|
|
98
|
+
<resprocessing>
|
|
99
|
+
<outcomes>
|
|
100
|
+
<decvar maxvalue="100" minvalue="0" varname="SCORE" vartype="Decimal"/>
|
|
101
|
+
</outcomes>
|
|
102
|
+
<respcondition>
|
|
103
|
+
<conditionvar>
|
|
104
|
+
<varequal respident="response_bafd8242-ecdb-4158-a6d3-4ff15e016cb8">bafd8242-ecdb-4158-a6d3-4ff15e016cb8-0</varequal>
|
|
105
|
+
</conditionvar>
|
|
106
|
+
<setvar action="Add" varname="SCORE">20.00</setvar>
|
|
107
|
+
</respcondition>
|
|
108
|
+
<respcondition>
|
|
109
|
+
<conditionvar>
|
|
110
|
+
<varequal respident="response_d719aee0-6ce0-462c-9c0d-be63ba8d3408">d719aee0-6ce0-462c-9c0d-be63ba8d3408-0</varequal>
|
|
111
|
+
</conditionvar>
|
|
112
|
+
<setvar action="Add" varname="SCORE">20.00</setvar>
|
|
113
|
+
</respcondition>
|
|
114
|
+
<respcondition>
|
|
115
|
+
<conditionvar>
|
|
116
|
+
<varequal respident="response_ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90">ce47aaf6-c1dd-4db8-9a9f-7f5c131d8a90-0</varequal>
|
|
117
|
+
</conditionvar>
|
|
118
|
+
<setvar action="Add" varname="SCORE">20.00</setvar>
|
|
119
|
+
</respcondition>
|
|
120
|
+
<respcondition>
|
|
121
|
+
<conditionvar>
|
|
122
|
+
<varequal respident="response_41dfd716-8fd9-466a-97fa-33d353e44b42">41dfd716-8fd9-466a-97fa-33d353e44b42-0</varequal>
|
|
123
|
+
</conditionvar>
|
|
124
|
+
<setvar action="Add" varname="SCORE">20.00</setvar>
|
|
125
|
+
</respcondition>
|
|
126
|
+
<respcondition>
|
|
127
|
+
<conditionvar>
|
|
128
|
+
<varequal respident="response_a053119f-6a61-4372-ac79-4b2a7de0232f">a053119f-6a61-4372-ac79-4b2a7de0232f-0</varequal>
|
|
129
|
+
</conditionvar>
|
|
130
|
+
<setvar action="Add" varname="SCORE">20.00</setvar>
|
|
131
|
+
</respcondition>
|
|
132
|
+
</resprocessing>
|
|
133
|
+
</item>
|
|
134
|
+
</questestinterop>
|
|
@@ -135,6 +135,26 @@ describe Qti::V1::Models::AssessmentItem do
|
|
|
135
135
|
end
|
|
136
136
|
end
|
|
137
137
|
|
|
138
|
+
describe '#case_sensitive' do
|
|
139
|
+
let(:test_object) { Qti::V1::Models::Assessment.from_path!(file_path) }
|
|
140
|
+
let(:assessment_item_refs) { test_object.assessment_items }
|
|
141
|
+
let(:loaded_class) { described_class.new(assessment_item_refs) }
|
|
142
|
+
|
|
143
|
+
context 'when it does not contain case_sensitive metadata' do
|
|
144
|
+
let(:file_path) { File.join('spec', 'fixtures', 'items_1.2', 'nq_multiple_fib_scoring_algorithms.xml') }
|
|
145
|
+
it 'returns nil' do
|
|
146
|
+
expect(loaded_class.case_sensitive).to be_nil
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
context 'when it contains case_sensitive metadata' do
|
|
151
|
+
let(:file_path) { File.join('spec', 'fixtures', 'items_1.2', 'nq_multiple_fib_case_sensitive.xml') }
|
|
152
|
+
it 'returns the case_sensitive value' do
|
|
153
|
+
expect(loaded_class.case_sensitive).to eq 'true'
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
138
158
|
describe '#scoring_data_structs' do
|
|
139
159
|
it 'grabs the rcardinality and scoring data value' do
|
|
140
160
|
struct = loaded_class.send(:scoring_data_structs)
|
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.
|
|
4
|
+
version: 2.29.0
|
|
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:
|
|
15
|
+
date: 2026-07-24 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: actionview
|
|
@@ -410,6 +410,7 @@ files:
|
|
|
410
410
|
- spec/fixtures/items_1.2/multiple_answer_canvas.xml
|
|
411
411
|
- spec/fixtures/items_1.2/multiple_choice.xml
|
|
412
412
|
- spec/fixtures/items_1.2/nq_multiple_fib_answer_types.xml
|
|
413
|
+
- spec/fixtures/items_1.2/nq_multiple_fib_case_sensitive.xml
|
|
413
414
|
- spec/fixtures/items_1.2/nq_multiple_fib_scoring_algorithms.xml
|
|
414
415
|
- spec/fixtures/items_1.2/numeric_exact_match.xml
|
|
415
416
|
- spec/fixtures/items_1.2/numeric_margin_error.xml
|
|
@@ -743,7 +744,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
743
744
|
- !ruby/object:Gem::Version
|
|
744
745
|
version: '0'
|
|
745
746
|
requirements: []
|
|
746
|
-
rubygems_version: 3.
|
|
747
|
+
rubygems_version: 3.5.22
|
|
747
748
|
signing_key:
|
|
748
749
|
specification_version: 4
|
|
749
750
|
summary: QTI 1.2 and 2.1 import and export models
|
|
@@ -794,6 +795,7 @@ test_files:
|
|
|
794
795
|
- spec/fixtures/items_1.2/multiple_answer_canvas.xml
|
|
795
796
|
- spec/fixtures/items_1.2/multiple_choice.xml
|
|
796
797
|
- spec/fixtures/items_1.2/nq_multiple_fib_answer_types.xml
|
|
798
|
+
- spec/fixtures/items_1.2/nq_multiple_fib_case_sensitive.xml
|
|
797
799
|
- spec/fixtures/items_1.2/nq_multiple_fib_scoring_algorithms.xml
|
|
798
800
|
- spec/fixtures/items_1.2/numeric_exact_match.xml
|
|
799
801
|
- spec/fixtures/items_1.2/numeric_margin_error.xml
|