qti 0.2.4 → 0.2.5
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/interactions/logical_identifier_interaction.rb +2 -2
- data/lib/qti/v1/models/interactions/string_interaction.rb +2 -2
- data/lib/qti/v2/models/interactions/choice_interaction.rb +2 -2
- data/lib/qti/v2/models/interactions/extended_text_interaction.rb +2 -2
- data/spec/lib/qti/models/base_spec.rb +2 -2
- data/spec/lib/qti/v1/models/assessment_item_spec.rb +2 -2
- data/spec/lib/qti/v2/models/assessment_item_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc6006e634a3ac856e98842fdfc7fb1849f04b2
|
4
|
+
data.tar.gz: 3ca4f8ddf812e9b2fe555a2bb27d9ec0139a10fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f7d7fd845c67e9da054f585f9d13ab3caec518a085941eff6d69e61689e98d62dd65b732dcf36af0023020edf8f58a5140aa9a5fc4b1fdd42de3132cffc9929
|
7
|
+
data.tar.gz: 037968b23187f73b21f125b48c2fbb86bb19cf0474c5d1afc41e236c4523089d98b87bd0793aa18f3083721dbdd5d07cde050bab1cd635a33f0ed7287b56f39e
|
@@ -6,10 +6,10 @@ module Qti
|
|
6
6
|
module Models
|
7
7
|
module Interactions
|
8
8
|
class LogicalIdentifierInteraction < Qti::V1::Models::Base
|
9
|
-
|
9
|
+
@node_name = 'response_lid'.freeze
|
10
10
|
# This will know if a class matches
|
11
11
|
def self.matches(node)
|
12
|
-
matches = node.children.children.select { |n| n.name ==
|
12
|
+
matches = node.children.children.select { |n| n.name == @node_name }
|
13
13
|
return false if matches.empty?
|
14
14
|
|
15
15
|
raise Qti::UnsupportedSchema if matches.size > 1
|
@@ -3,10 +3,10 @@ module Qti
|
|
3
3
|
module Models
|
4
4
|
module Interactions
|
5
5
|
class StringInteraction < Qti::V1::Models::Base
|
6
|
-
|
6
|
+
@node_name = 'response_str'.freeze
|
7
7
|
# This will know if a class matches
|
8
8
|
def self.matches(node)
|
9
|
-
matches = node.children.children.select { |n| n.name ==
|
9
|
+
matches = node.children.children.select { |n| n.name == @node_name }
|
10
10
|
return false if matches.empty?
|
11
11
|
|
12
12
|
raise Qti::UnsupportedSchema if matches.size > 1
|
@@ -6,10 +6,10 @@ module Qti
|
|
6
6
|
module Models
|
7
7
|
module Interactions
|
8
8
|
class ChoiceInteraction < Qti::V2::Models::Base
|
9
|
-
|
9
|
+
@node_name = 'choiceInteraction'.freeze
|
10
10
|
# This will know if a class matches
|
11
11
|
def self.matches(node)
|
12
|
-
matches = node.children.filter(INTERACTION_ELEMENTS_CSS).select { |n| n.name ==
|
12
|
+
matches = node.children.filter(INTERACTION_ELEMENTS_CSS).select { |n| n.name == @node_name }
|
13
13
|
return false if matches.empty?
|
14
14
|
|
15
15
|
raise Qti::UnsupportedSchema if matches.size > 1
|
@@ -3,10 +3,10 @@ module Qti
|
|
3
3
|
module Models
|
4
4
|
module Interactions
|
5
5
|
class ExtendedTextInteraction < Qti::V2::Models::Base
|
6
|
-
|
6
|
+
@node_name = 'extendedTextInteraction'.freeze
|
7
7
|
# This will know if a class matches
|
8
8
|
def self.matches(node)
|
9
|
-
matches = node.children.filter(INTERACTION_ELEMENTS_CSS).select { |n| n.name ==
|
9
|
+
matches = node.children.filter(INTERACTION_ELEMENTS_CSS).select { |n| n.name == @node_name }
|
10
10
|
return false if matches.empty?
|
11
11
|
|
12
12
|
raise Qti::UnsupportedSchema if matches.size > 1
|
@@ -20,7 +20,7 @@ describe Qti::Models::Base do
|
|
20
20
|
it 'raises if node count is more than 1' do
|
21
21
|
expect do
|
22
22
|
loaded_class.xpath_with_single_check(bad_xpath)
|
23
|
-
end.to raise_error
|
23
|
+
end.to raise_error(Qti::ParseError)
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'doesn\'t raise with a single node count' do
|
@@ -34,7 +34,7 @@ describe Qti::Models::Base do
|
|
34
34
|
it 'raises if node count is more than 1' do
|
35
35
|
expect do
|
36
36
|
loaded_class.css_with_single_check(bad_css_path)
|
37
|
-
end.to raise_error
|
37
|
+
end.to raise_error(Qti::ParseError)
|
38
38
|
end
|
39
39
|
|
40
40
|
it 'doesn\'t raise with a single node count' do
|
@@ -9,8 +9,8 @@ describe Qti::V1::Models::AssessmentItem do
|
|
9
9
|
|
10
10
|
it 'loads an AssessmentItem ref' do
|
11
11
|
expect do
|
12
|
-
described_class.new(
|
13
|
-
end.to_not raise_error
|
12
|
+
described_class.new(assessment_item_refs)
|
13
|
+
end.to_not raise_error
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'has the title' do
|
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: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hannah Bottalla
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-03-
|
12
|
+
date: 2017-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -416,7 +416,7 @@ rubyforge_project:
|
|
416
416
|
rubygems_version: 2.5.1
|
417
417
|
signing_key:
|
418
418
|
specification_version: 4
|
419
|
-
summary: QTI 1.2 and 2.1 import models
|
419
|
+
summary: QTI 1.2 and 2.1 import and export models
|
420
420
|
test_files:
|
421
421
|
- spec/fixtures/items_1.2/multiple_answer.xml
|
422
422
|
- spec/fixtures/items_1.2/multiple_choice.xml
|