qti 2.22.2 → 2.22.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/v1/models/bank_entry_item.rb +4 -0
- data/lib/qti/v1/models/interactions/match_interaction.rb +1 -1
- data/lib/qti/v1/models/question_group.rb +4 -0
- data/lib/qti/version.rb +1 -1
- data/spec/fixtures/items_1.2/bank_entry_item.xml +1 -1
- data/spec/fixtures/items_1.2/question_group.xml +1 -1
- data/spec/lib/qti/v1/models/bank_entry_item_spec.rb +1 -0
- data/spec/lib/qti/v1/models/interactions/match_interaction_spec.rb +6 -6
- data/spec/lib/qti/v1/models/question_group_spec.rb +1 -0
- 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: 45bba08327d82fa348eba37bd8c30fd5b00d18b47944e931f877f41952513065
|
4
|
+
data.tar.gz: 1c7cc174a7c78953ab64c6272f35d1bd6d678ac655ea9250eb05e653da1f1cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d278b33c3611159b943d494edfad9e8a2370a6c0e5ad5d4f216599fe8bfd8c4db518f79fae7b6b5b850452c444510df677309c62fa98eb59d32b75a20138726
|
7
|
+
data.tar.gz: 3ff17c1f2717b8374b426d2f6a34f8ec714e750c0c9ead4a9103c1a27e290581d82610ec6bafeebc212fbd10431e3b90d2865f1317c886f4255f3609b01baffb
|
@@ -18,6 +18,10 @@ module Qti
|
|
18
18
|
@item_ref ||= @doc.attribute('item_ref').value
|
19
19
|
end
|
20
20
|
|
21
|
+
def parent_stimulus_item_ident
|
22
|
+
@parent_stimulus_item_ident ||= @doc.attribute('parent_stimulus_item_ident')&.value
|
23
|
+
end
|
24
|
+
|
21
25
|
def points_possible
|
22
26
|
@points_possible ||= @doc.attribute('points_possible')&.value || 1
|
23
27
|
end
|
@@ -21,7 +21,7 @@ module Qti
|
|
21
21
|
mattext = lid_node.at_xpath('.//xmlns:mattext')
|
22
22
|
inner_content = return_inner_content!(mattext)
|
23
23
|
item_body = sanitize_content!(inner_content)
|
24
|
-
{ id: lid_node.attributes['ident'].value,
|
24
|
+
{ id: lid_node.attributes['ident'].value, item_body: item_body }
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -42,6 +42,10 @@ module Qti
|
|
42
42
|
selection&.xpath('xmlns:sourcebank_export_id')&.text
|
43
43
|
end
|
44
44
|
|
45
|
+
def parent_stimulus_item_ident
|
46
|
+
@parent_stimulus_item_ident ||= @doc.attribute('parent_stimulus_item_ident')&.value
|
47
|
+
end
|
48
|
+
|
45
49
|
def points_per_item
|
46
50
|
selection.xpath('xmlns:selection_extension/xmlns:points_per_item')&.text&.to_f
|
47
51
|
end
|
data/lib/qti/version.rb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
</qtimetadatafield>
|
9
9
|
</qtimetadata>
|
10
10
|
<section ident="root_section">
|
11
|
-
<bankentry_item sourcebank_ref="gafe7177102bee6759845b002c5de397c" item_ref="ge0c6b84f2afc834ec575718bbc1451ff" points_possible="2.0"/>
|
11
|
+
<bankentry_item sourcebank_ref="gafe7177102bee6759845b002c5de397c" item_ref="ge0c6b84f2afc834ec575718bbc1451ff" parent_stimulus_item_ident="020d8745b74093feb3365745dc18aa0a" points_possible="2.0"/>
|
12
12
|
</section>
|
13
13
|
</assessment>
|
14
14
|
</questestinterop>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</qtimetadatafield>
|
9
9
|
</qtimetadata>
|
10
10
|
<section ident="root_section">
|
11
|
-
<section ident="i4663897607358cfba8636ed6127b9466" title="Group 1 (1/4)">
|
11
|
+
<section ident="i4663897607358cfba8636ed6127b9466" title="Group 1 (1/4)" parent_stimulus_item_ident="020d8745b74093feb3365745dc18aa0a">
|
12
12
|
<selection_ordering>
|
13
13
|
<selection>
|
14
14
|
<selection_number>1</selection_number>
|
@@ -7,6 +7,7 @@ describe Qti::V1::Models::BankEntryItem do
|
|
7
7
|
it 'configures a bank entry item correctly' do
|
8
8
|
expect(loaded_class.sourcebank_ref).to eq('gafe7177102bee6759845b002c5de397c')
|
9
9
|
expect(loaded_class.item_ref).to eq('ge0c6b84f2afc834ec575718bbc1451ff')
|
10
|
+
expect(loaded_class.parent_stimulus_item_ident).to eq('020d8745b74093feb3365745dc18aa0a')
|
10
11
|
expect(loaded_class.points_possible).to eq('2.0')
|
11
12
|
end
|
12
13
|
end
|
@@ -47,8 +47,8 @@ describe Qti::V1::Models::Interactions::MatchInteraction do
|
|
47
47
|
end
|
48
48
|
let(:expected_questions) do
|
49
49
|
[
|
50
|
-
{ id: 'question_1',
|
51
|
-
{ id: 'question_2',
|
50
|
+
{ id: 'question_1', item_body: 'Light Microscope' },
|
51
|
+
{ id: 'question_2', item_body: 'Electron Microscopes' }
|
52
52
|
]
|
53
53
|
end
|
54
54
|
let(:expected_scoring_data) do
|
@@ -73,10 +73,10 @@ describe Qti::V1::Models::Interactions::MatchInteraction do
|
|
73
73
|
let(:expected_answers) { '1,2,,C,D,E,F,3,4,5,6'.split(',') }
|
74
74
|
let(:expected_questions) do
|
75
75
|
[
|
76
|
-
{ id: 'response_6831',
|
77
|
-
{ id: 'response_6259',
|
78
|
-
{ id: 'response_743',
|
79
|
-
{ id: 'response_1943',
|
76
|
+
{ id: 'response_6831', item_body: 'A' },
|
77
|
+
{ id: 'response_6259', item_body: 'B' },
|
78
|
+
{ id: 'response_743', item_body: '' },
|
79
|
+
{ id: 'response_1943', item_body: '' }
|
80
80
|
]
|
81
81
|
end
|
82
82
|
let(:expected_scoring_data) do
|
@@ -12,5 +12,6 @@ describe Qti::V1::Models::QuestionGroup do
|
|
12
12
|
expect(loaded_class.items.count).to eq(4)
|
13
13
|
expect(loaded_class.selection_number).to eq(1)
|
14
14
|
expect(loaded_class.points_per_item).to eq(1)
|
15
|
+
expect(loaded_class.parent_stimulus_item_ident).to eq('020d8745b74093feb3365745dc18aa0a')
|
15
16
|
end
|
16
17
|
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.22.
|
4
|
+
version: 2.22.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: 2023-
|
15
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionview
|