qti 2.22.4 → 2.22.6
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/string_interaction.rb +11 -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/essay_custom_settings.xml +8 -0
- data/spec/lib/qti/v1/models/bank_entry_item_spec.rb +1 -0
- data/spec/lib/qti/v1/models/interactions/string_interaction_spec.rb +8 -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: a72b532cd51607d749d519695eedd195baa829425689fb89651a240fe2ce6f74
|
4
|
+
data.tar.gz: f4ca8d029a779c5f5b4b80c782238271647cee5d7cb15a4c221ffe5f5d53b1f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97053ee0f769f90b7148271a7ecf0fe309adb72e48adb6feea2c823225c0a7c27a9bc4adae09b7f2fd812b063a7197a77fe316598e5539aff74c7d66471d207e
|
7
|
+
data.tar.gz: 3ca0b4a412a6573fc530693e301bafca22e636742d069713b0be51e3ff923d302bfaee84792bbc72812553b8fb59eefe7e1eaaea67803634445ced172157d04f
|
@@ -2,6 +2,7 @@ module Qti
|
|
2
2
|
module V1
|
3
3
|
module Models
|
4
4
|
module Interactions
|
5
|
+
# This is the Interaction for Essay question type
|
5
6
|
class StringInteraction < BaseInteraction
|
6
7
|
# This will know if a class matches
|
7
8
|
def self.matches(node, parent)
|
@@ -35,6 +36,10 @@ module Qti
|
|
35
36
|
@word_limit_min ||= @node.at_xpath('.//xmlns:response_str/@word_limit_min')&.value
|
36
37
|
end
|
37
38
|
|
39
|
+
def scoring_data_structs
|
40
|
+
{ value: grading_notes }
|
41
|
+
end
|
42
|
+
|
38
43
|
private
|
39
44
|
|
40
45
|
def rcardinality
|
@@ -44,6 +49,12 @@ module Qti
|
|
44
49
|
def rce_raw
|
45
50
|
@rce_raw ||= @node.at_xpath('.//xmlns:response_str/@rce')&.value
|
46
51
|
end
|
52
|
+
|
53
|
+
def grading_notes
|
54
|
+
path = './/xmlns:qtimetadatafield/xmlns:fieldlabel' \
|
55
|
+
'[text()="grading_notes"]/../xmlns:fieldentry'
|
56
|
+
@grading_notes ||= @node.at_xpath(path)&.text || ''
|
57
|
+
end
|
47
58
|
end
|
48
59
|
end
|
49
60
|
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" parent_stimulus_item_ident="020d8745b74093feb3365745dc18aa0a" points_possible="2.0"/>
|
11
|
+
<bankentry_item sourcebank_ref="gafe7177102bee6759845b002c5de397c" item_ref="ge0c6b84f2afc834ec575718bbc1451ff" parent_stimulus_item_ident="020d8745b74093feb3365745dc18aa0a" points_possible="2.0" entry_type="Item"/>
|
12
12
|
</section>
|
13
13
|
</assessment>
|
14
14
|
</questestinterop>
|
@@ -1,6 +1,14 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
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
3
|
<item ident="if15fb877c2cde9a14437aa7429360ac6" title="First Essay">
|
4
|
+
<itemmetadata>
|
5
|
+
<qtimetadata>
|
6
|
+
<qtimetadatafield>
|
7
|
+
<fieldlabel>grading_notes</fieldlabel>
|
8
|
+
<fieldentry>this is the remix</fieldentry>
|
9
|
+
</qtimetadatafield>
|
10
|
+
</qtimetadata>
|
11
|
+
</itemmetadata>
|
4
12
|
<presentation>
|
5
13
|
<material>
|
6
14
|
<mattext texttype="text/html">
|
@@ -9,5 +9,6 @@ describe Qti::V1::Models::BankEntryItem do
|
|
9
9
|
expect(loaded_class.item_ref).to eq('ge0c6b84f2afc834ec575718bbc1451ff')
|
10
10
|
expect(loaded_class.parent_stimulus_item_ident).to eq('020d8745b74093feb3365745dc18aa0a')
|
11
11
|
expect(loaded_class.points_possible).to eq('2.0')
|
12
|
+
expect(loaded_class.entry_type).to eq('Item')
|
12
13
|
end
|
13
14
|
end
|
@@ -19,6 +19,10 @@ describe Qti::V1::Models::Interactions::StringInteraction do
|
|
19
19
|
expect(loaded_class.word_limit_max).to be_nil
|
20
20
|
expect(loaded_class.word_limit_min).to be_nil
|
21
21
|
end
|
22
|
+
|
23
|
+
it 'does not return any grading notes' do
|
24
|
+
expect(loaded_class.scoring_data_structs).to eq({ value: '' })
|
25
|
+
end
|
22
26
|
end
|
23
27
|
|
24
28
|
context 'essay.xml question with custom settings' do
|
@@ -31,5 +35,9 @@ describe Qti::V1::Models::Interactions::StringInteraction do
|
|
31
35
|
expect(loaded_class.word_limit_max).to eq('500')
|
32
36
|
expect(loaded_class.word_limit_min).to eq('140')
|
33
37
|
end
|
38
|
+
|
39
|
+
it 'has grading notes' do
|
40
|
+
expect(loaded_class.scoring_data_structs).to eq({ value: 'this is the remix' })
|
41
|
+
end
|
34
42
|
end
|
35
43
|
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.6
|
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: 2024-01-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: actionview
|