qti 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a232ed3a1f3603a43d9e787e12b2489512710deb
4
- data.tar.gz: fd8c8946f8da1404adbc204e9a57ccfa4b0376ce
3
+ metadata.gz: 51aa661f3e54c8b99614425e6ebcaf748528f040
4
+ data.tar.gz: b65282f6232469ee50b78c6373dab1c73cd84a7e
5
5
  SHA512:
6
- metadata.gz: 692d2995082e0573277b54fef1947994229d5bf5fbde4ba01302903beb8c96eddf804ccff6a75143e5e3cbc471f835198c939a7485052f2e7f08fc547bcef3f5
7
- data.tar.gz: da528527b15aa0886d22e2834ca3af8f47da0b4010e7d9f9d78b19816247fbd03edf1e12b3d4e3301474c7844d807aac07220442e700cc2106627b90f88dd182
6
+ metadata.gz: 8bf9e594bd3bf6bd70f65965019c3238c235e8dbdb1f118cc5739081ae270d433bc4e560469057bd0747aa85f11d61f2b080a5d9104c92dfacae3006df068665
7
+ data.tar.gz: 74aa6698668faf27c947c586e3d3b7c6e589d65240318d0b27cace8827bda6e910bb113d9ef229e29e73e35139ae8138870b52c86c7337e57a4bea36fc2e4fce
@@ -63,7 +63,9 @@ module Qti
63
63
  { 'xmlns' => 'http://www.imsglobal.org/xsd/imsqti_v2p2', 'xmlns:xi' => 'http://www.w3.org/2001/XInclude',
64
64
  'xmlns:m' => 'http://www.w3.org/1998/Math/MathML', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
65
65
  'xsi:schemaLocation' => 'http://www.imsglobal.org/xsd/imsqti_v2p2 ' \
66
- 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd' }
66
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd',
67
+ 'timeDependent' => 'false', 'identifier' => "Item-#{assessment_item.identifier}",
68
+ 'title' => assessment_item.title }
67
69
  end
68
70
  end
69
71
  end
@@ -1,6 +1,7 @@
1
1
  module Qti
2
2
  module ContentPackaging
3
3
  class AssessmentTest < Dry::Struct
4
+ attribute :identifier, Types::Strict::String
4
5
  attribute :title, Types::Strict::String
5
6
  attribute :items, Types::Strict::Array.member(ContentPackaging::AssessmentItem)
6
7
  attribute :outcome_declarations, Types::Strict::Array.member(ContentPackaging::OutcomeDeclaration)
@@ -25,7 +25,7 @@ module Qti
25
25
  end
26
26
 
27
27
  def file_timestamp
28
- Time.now.utc.strftime('%Y%m%d%H%M%S')
28
+ Time.now.utc.strftime('%Y%m%d%H%M%S%L')
29
29
  end
30
30
 
31
31
  def create_assessment_xml
@@ -36,9 +36,9 @@ module Qti
36
36
 
37
37
  def assessment_xml_string
38
38
  Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
39
- xml.assessmentTest(assesment_test_attributes(title: assessment_test.title)) do
39
+ xml.assessmentTest(assesment_test_attributes) do
40
40
  outcome_declarations(xml, assessment_test)
41
- xml.testPart do
41
+ xml.testPart(identifier: 'Main', navigationMode: 'linear', submissionMode: 'individual') do
42
42
  xml_assessment_section(xml)
43
43
  end
44
44
  end
@@ -70,6 +70,7 @@ module Qti
70
70
  builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
71
71
  xml.manifest(imsmanifest_attributes) do
72
72
  manifest_metadata(xml)
73
+ xml.organizations
73
74
  manifest_resources(xml)
74
75
  end
75
76
  end
@@ -87,29 +88,29 @@ module Qti
87
88
  end
88
89
  end
89
90
 
91
+ # rubocop:disable Metrics/AbcSize
90
92
  def learning_object_metadata(xml)
91
- imsmd_ns = xml['imsmd']
92
-
93
- imsmd_ns.lom do
94
- imsmd_ns.general do
95
- imsmd_ns.identifier do
96
- imsmd_ns.entry 'FB-02'
93
+ xml['imsmd'].lom do
94
+ xml['imsmd'].general do
95
+ xml['imsmd'].identifier do
96
+ xml['imsmd'].entry 'FB-02'
97
97
  end
98
- imsmd_ns.title do
99
- imsmd_ns.string(assessment_test.title, 'language' => 'en')
98
+ xml['imsmd'].title do
99
+ xml['imsmd'].string(assessment_test.title, 'language' => 'en')
100
100
  end
101
- imsmd_ns.language 'en'
102
- imsmd_ns.description do
103
- imsmd_ns.string('Instructure QTI package.' \
101
+ xml['imsmd'].language 'en'
102
+ xml['imsmd'].description do
103
+ xml['imsmd'].string('Instructure QTI package.' \
104
104
  'Feedback XML used as an example of unprocessable entity', 'language' => 'en')
105
105
  end
106
+ keywords(xml)
106
107
  end
107
- keywords(xml)
108
108
  end
109
109
  end
110
+ # rubocop:enable Metrics/AbcSize
110
111
 
111
112
  def keywords(xml)
112
- keywords = %w(feedback modal test inline block)
113
+ keywords = %w[feedback modal test inline block]
113
114
  keywords.each do |keyword|
114
115
  xml['imsmd'].keyword do
115
116
  xml['imsmd'].string(keyword, 'language' => 'en')
@@ -134,21 +135,25 @@ module Qti
134
135
  end
135
136
  end
136
137
 
137
- def assesment_test_attributes(args = {})
138
- { 'xmlns' => 'http://www.imsglobal.org/xsd/imsqti_v2p2', 'xmlns:xi' => 'http://www.w3.org/2001/XInclude',
138
+ def assesment_test_attributes
139
+ { 'xmlns' => 'http://www.imsglobal.org/xsd/imsqti_v2p2p1', 'xmlns:xi' => 'http://www.w3.org/2001/XInclude',
139
140
  'xmlns:m' => 'http://www.w3.org/1998/Math/MathML', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
140
141
  'xsi:schemaLocation' => 'http://www.imsglobal.org/xsd/imsqti_v2p2 ' \
141
- 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd' }.merge(args)
142
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd',
143
+ 'title' => assessment_test.title }
142
144
  end
143
145
 
144
146
  def imsmanifest_attributes
145
- { 'xmlns' => 'http://www.imsglobal.org/xsd/imscp_v1p1', 'xmlns:imsmd' => 'http://ltsc.ieee.org/xsd/LOM',
146
- 'xmlns:imsqti' => 'http://www.imsglobal.org/xsd/imsqti_v2p2', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
147
- 'xsi:schemaLocation' => 'http://www.imsglobal.org/xsd/imscp_v1p1 ' \
148
- 'http://www.imsglobal.org/xsd/qti/qtiv2p2/qtiv2p2_imscpv1p2_v1p0.xsd' \
147
+ { 'xmlns' => 'http://www.imsglobal.org/xsd/imscp_v1p1',
148
+ 'xmlns:imsmd' => 'http://ltsc.ieee.org/xsd/LOM',
149
+ 'xmlns:imsqti' => 'http://www.imsglobal.org/xsd/imsqti_v2p2',
150
+ 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
151
+ 'xsi:schemaLocation' => 'http://www.imsglobal.org/xsd/imsqti_v2p2 ' \
152
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd ' \
149
153
  'http://ltsc.ieee.org/xsd/LOM http://www.imsglobal.org/xsd/imsmd_loose_v1p3p2.xsd' \
150
- 'http://www.imsglobal.org/xsd/imsqti_metadata_v2p2' \
151
- 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_metadata_v2p2.xsd' }
154
+ 'http://www.imsglobal.org/xsd/imscp_v1p1 ' \
155
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/qtiv2p2_imscpv1p2_v1p0.xsd',
156
+ 'identifier' => assessment_test.identifier }
152
157
  end
153
158
 
154
159
  def compress_package
@@ -17,8 +17,8 @@ module Qti
17
17
 
18
18
  def questions
19
19
  node.xpath('.//xmlns:response_lid').map do |lid_node|
20
- item_body = lid_node.at_xpath('.//xmlns:mattext').text
21
- { id: lid_node.attributes['ident'].value, itemBody: item_body }
20
+ question_body = lid_node.at_xpath('.//xmlns:mattext').text
21
+ { id: lid_node.attributes['ident'].value, question_body: question_body }
22
22
  end
23
23
  end
24
24
 
@@ -24,7 +24,7 @@ module Qti
24
24
  end
25
25
 
26
26
  def questions
27
- questions_ids.map { |id| { id: id, itemBody: choices_by_identifier[id].content } }
27
+ questions_ids.map { |id| { id: id, question_body: choices_by_identifier[id].content } }
28
28
  end
29
29
 
30
30
  def answers
@@ -16,7 +16,7 @@ module Qti
16
16
  end
17
17
 
18
18
  def questions
19
- questions_ids.map { |id| { id: id, itemBody: choices_by_identifier[id].content } }
19
+ questions_ids.map { |id| { id: id, question_body: choices_by_identifier[id].content } }
20
20
  end
21
21
 
22
22
  def shuffled?
@@ -27,7 +27,7 @@ describe Qti::AssessmentItemExporter do
27
27
  expect(exporter.exported_file_path).to have_file_content(
28
28
  <<-XML.strip_heredoc
29
29
  <?xml version="1.0" encoding="UTF-8"?>
30
- <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd">
30
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd" timeDependent="false" identifier="Item-1" title="Question 1">
31
31
  <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
32
32
  <correctResponse>
33
33
  <value>true</value>
@@ -1,38 +1,40 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Qti::Exporter do
4
- let(:assessment_test) do
5
- Qti::ContentPackaging::AssessmentTest.new(
6
- title: 'Example test',
7
- items: [
8
- Qti::ContentPackaging::AssessmentItem.new(
9
- identifier: '0b8664be39cf69ef76402f3e41eb05', title: 'Question 1', response: 'true',
10
- interaction: Qti::ContentPackaging::ChoiceInteraction.new(
11
- prompt: 'Is 1+1 equals 2?', maxChoices: 1,
12
- choices: [
13
- Qti::ContentPackaging::SimpleChoice.new(
14
- identifier: 'true', body: 'True'
15
- ),
16
- Qti::ContentPackaging::SimpleChoice.new(
17
- identifier: 'false', body: 'False'
18
- )
19
- ]
20
- )
21
- )
22
- ],
23
- outcome_declarations: [
24
- Qti::ContentPackaging::OutcomeDeclaration.new(
25
- identifier: 'TEST_total', baseType: 'float', cardinality: 'single', defaultValue: 0.0
26
- ),
27
- Qti::ContentPackaging::OutcomeDeclaration.new(
28
- identifier: 'S1', baseType: 'float', cardinality: 'single', defaultValue: 0.0
29
- )
30
- ]
31
- )
32
- end
33
-
34
4
  describe '#export' do
35
5
  let(:dir) { Dir.mktmpdir }
6
+ let(:test_identifier) { SecureRandom.uuid }
7
+ let(:item_identifier) { SecureRandom.uuid }
8
+ let(:assessment_test) do
9
+ Qti::ContentPackaging::AssessmentTest.new(
10
+ identifier: test_identifier,
11
+ title: 'Example test',
12
+ items: [
13
+ Qti::ContentPackaging::AssessmentItem.new(
14
+ identifier: item_identifier, title: 'Question 1', response: 'true',
15
+ interaction: Qti::ContentPackaging::ChoiceInteraction.new(
16
+ prompt: 'Is 1+1 equals 2?', maxChoices: 1,
17
+ choices: [
18
+ Qti::ContentPackaging::SimpleChoice.new(
19
+ identifier: 'true', body: 'True'
20
+ ),
21
+ Qti::ContentPackaging::SimpleChoice.new(
22
+ identifier: 'false', body: 'False'
23
+ )
24
+ ]
25
+ )
26
+ )
27
+ ],
28
+ outcome_declarations: [
29
+ Qti::ContentPackaging::OutcomeDeclaration.new(
30
+ identifier: 'TEST_total', baseType: 'float', cardinality: 'single', defaultValue: 0.0
31
+ ),
32
+ Qti::ContentPackaging::OutcomeDeclaration.new(
33
+ identifier: 'S1', baseType: 'float', cardinality: 'single', defaultValue: 0.0
34
+ )
35
+ ]
36
+ )
37
+ end
36
38
  let(:exporter) { Qti::Exporter.new(assessment_test, package_root_path: dir) }
37
39
 
38
40
  before do
@@ -42,6 +44,7 @@ describe Qti::Exporter do
42
44
  context 'empty assessment' do
43
45
  let(:assessment_test) do
44
46
  Qti::ContentPackaging::AssessmentTest.new(
47
+ identifier: test_identifier,
45
48
  title: 'Empty test',
46
49
  items: [],
47
50
  outcome_declarations: []
@@ -52,8 +55,8 @@ describe Qti::Exporter do
52
55
  expect(exporter.exported_file_path).to have_zip_entry('assessment.xml').with_content(
53
56
  <<-XML.strip_heredoc
54
57
  <?xml version="1.0" encoding="UTF-8"?>
55
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd" title="Empty test">
56
- <testPart/>
58
+ <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2p1" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd" title="Empty test">
59
+ <testPart identifier="Main" navigationMode="linear" submissionMode="individual"/>
57
60
  </assessmentTest>
58
61
  XML
59
62
  )
@@ -61,11 +64,11 @@ describe Qti::Exporter do
61
64
  end
62
65
 
63
66
  it 'generates the xml for an assessment with an item' do
64
- expect(exporter.exported_file_path).to contain_zip_entry('0b8664be39cf69ef76402f3e41eb05.xml')
67
+ expect(exporter.exported_file_path).to contain_zip_entry("#{item_identifier}.xml")
65
68
  expect(exporter.exported_file_path).to have_zip_entry('assessment.xml').with_content(
66
69
  <<-XML.strip_heredoc
67
70
  <?xml version="1.0" encoding="UTF-8"?>
68
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd" title="Example test">
71
+ <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2p1" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd" title="Example test">
69
72
  <outcomeDeclaration baseType="float" cardinality="single" identifier="TEST_total">
70
73
  <defaultValue>
71
74
  <value>0</value>
@@ -76,9 +79,9 @@ describe Qti::Exporter do
76
79
  <value>0</value>
77
80
  </defaultValue>
78
81
  </outcomeDeclaration>
79
- <testPart>
82
+ <testPart identifier="Main" navigationMode="linear" submissionMode="individual">
80
83
  <assessmentSection identifier="S1" visible="true" title="Section 1">
81
- <assessmentItemRef identifier="0b8664be39cf69ef76402f3e41eb05" href="0b8664be39cf69ef76402f3e41eb05.xml"/>
84
+ <assessmentItemRef identifier="#{item_identifier}" href="#{item_identifier}.xml"/>
82
85
  </assessmentSection>
83
86
  </testPart>
84
87
  </assessmentTest>
@@ -90,44 +93,45 @@ describe Qti::Exporter do
90
93
  expect(exporter.exported_file_path).to have_zip_entry('imsmanifest.xml').with_content(
91
94
  <<-XML.strip_heredoc
92
95
  <?xml version="1.0" encoding="UTF-8"?>
93
- <manifest xmlns="http://www.imsglobal.org/xsd/imscp_v1p1" xmlns:imsmd="http://ltsc.ieee.org/xsd/LOM" xmlns:imsqti="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 http://www.imsglobal.org/xsd/qti/qtiv2p2/qtiv2p2_imscpv1p2_v1p0.xsdhttp://ltsc.ieee.org/xsd/LOM http://www.imsglobal.org/xsd/imsmd_loose_v1p3p2.xsdhttp://www.imsglobal.org/xsd/imsqti_metadata_v2p2http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_metadata_v2p2.xsd">
96
+ <manifest xmlns="http://www.imsglobal.org/xsd/imscp_v1p1" xmlns:imsmd="http://ltsc.ieee.org/xsd/LOM" xmlns:imsqti="http://www.imsglobal.org/xsd/imsqti_v2p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd http://ltsc.ieee.org/xsd/LOM http://www.imsglobal.org/xsd/imsmd_loose_v1p3p2.xsdhttp://www.imsglobal.org/xsd/imscp_v1p1 http://www.imsglobal.org/xsd/qti/qtiv2p2/qtiv2p2_imscpv1p2_v1p0.xsd" identifier="#{test_identifier}">
94
97
  <metadata>
95
98
  <schema>QTIv2.2 Package</schema>
96
99
  <schemaversion>1.0.0</schemaversion>
97
100
  <imsmd:lom>
98
- <general>
99
- <identifier>
100
- <entry>FB-02</entry>
101
- </identifier>
102
- <title>
103
- <string language="en">Example test</string>
104
- </title>
105
- <language>en</language>
106
- <description>
107
- <string language="en">Instructure QTI package.Feedback XML used as an example of unprocessable entity</string>
108
- </description>
109
- </general>
110
- <imsmd:keyword>
111
- <imsmd:string language="en">feedback</imsmd:string>
112
- </imsmd:keyword>
113
- <imsmd:keyword>
114
- <imsmd:string language="en">modal</imsmd:string>
115
- </imsmd:keyword>
116
- <imsmd:keyword>
117
- <imsmd:string language="en">test</imsmd:string>
118
- </imsmd:keyword>
119
- <imsmd:keyword>
120
- <imsmd:string language="en">inline</imsmd:string>
121
- </imsmd:keyword>
122
- <imsmd:keyword>
123
- <imsmd:string language="en">block</imsmd:string>
124
- </imsmd:keyword>
101
+ <imsmd:general>
102
+ <imsmd:identifier>
103
+ <imsmd:entry>FB-02</imsmd:entry>
104
+ </imsmd:identifier>
105
+ <imsmd:title>
106
+ <imsmd:string language="en">Example test</imsmd:string>
107
+ </imsmd:title>
108
+ <imsmd:language>en</imsmd:language>
109
+ <imsmd:description>
110
+ <imsmd:string language="en">Instructure QTI package.Feedback XML used as an example of unprocessable entity</imsmd:string>
111
+ </imsmd:description>
112
+ <imsmd:keyword>
113
+ <imsmd:string language="en">feedback</imsmd:string>
114
+ </imsmd:keyword>
115
+ <imsmd:keyword>
116
+ <imsmd:string language="en">modal</imsmd:string>
117
+ </imsmd:keyword>
118
+ <imsmd:keyword>
119
+ <imsmd:string language="en">test</imsmd:string>
120
+ </imsmd:keyword>
121
+ <imsmd:keyword>
122
+ <imsmd:string language="en">inline</imsmd:string>
123
+ </imsmd:keyword>
124
+ <imsmd:keyword>
125
+ <imsmd:string language="en">block</imsmd:string>
126
+ </imsmd:keyword>
127
+ </imsmd:general>
125
128
  </imsmd:lom>
126
129
  </metadata>
130
+ <organizations/>
127
131
  <resources>
128
132
  <resource href="assessment.xml" type="imsqti_test_xmlv2p2" identifier="TEST">
129
133
  <file href="assessment.xml"/>
130
- <file href="0b8664be39cf69ef76402f3e41eb05.xml"/>
134
+ <file href="#{item_identifier}.xml"/>
131
135
  </resource>
132
136
  </resources>
133
137
  </manifest>
@@ -36,8 +36,8 @@ describe Qti::V1::Models::Interactions::MatchInteraction do
36
36
  describe '#questions' do
37
37
  it 'returns the questions' do
38
38
  expect(subject.questions).to eq(
39
- [{ id: 'question_1', itemBody: 'Light Microscope' },
40
- { id: 'question_2', itemBody: 'Electron Microscopes' }]
39
+ [{ id: 'question_1', question_body: 'Light Microscope' },
40
+ { id: 'question_2', question_body: 'Electron Microscopes' }]
41
41
  )
42
42
  end
43
43
  end
@@ -30,9 +30,9 @@ describe Qti::V2::Models::Interactions::MatchInteraction do
30
30
  describe '#questions' do
31
31
  it 'returns the questions' do
32
32
  expect(subject.questions).to eq(
33
- [{ id: 'A', itemBody: 'Antonio' },
34
- { id: 'C', itemBody: 'Capulet' },
35
- { id: 'D', itemBody: 'Demetrius' }]
33
+ [{ id: 'A', question_body: 'Antonio' },
34
+ { id: 'C', question_body: 'Capulet' },
35
+ { id: 'D', question_body: 'Demetrius' }]
36
36
  )
37
37
  end
38
38
  end
@@ -53,7 +53,7 @@ describe Qti::V2::Models::Interactions::MatchInteraction do
53
53
  expect(subject.scoring_data_structs).to eq [
54
54
  Qti::V2::Models::ScoringData.new('Dresden', 'Pair', id: 'Match2675678', question_id: 'Match28433682'),
55
55
  Qti::V2::Models::ScoringData.new('Leipzig', 'Pair', id: 'Match9372581', question_id: 'Match7191791'),
56
- Qti::V2::Models::ScoringData.new('Halle', 'Pair', id: 'Match22744006', question_id: 'Match20473010'),
56
+ Qti::V2::Models::ScoringData.new('Halle' , 'Pair', id: 'Match22744006', question_id: 'Match20473010'),
57
57
  Qti::V2::Models::ScoringData.new('Bautzen', 'Pair', id: 'Match17943221', question_id: 'Match6429655')
58
58
  ]
59
59
  end
@@ -68,10 +68,10 @@ describe Qti::V2::Models::Interactions::MatchInteraction do
68
68
  describe '#questions' do
69
69
  it 'returns the questions' do
70
70
  expect(subject.questions).to eq(
71
- [{ id: 'Match28433682', itemBody: 'Weißeritz' },
72
- { id: 'Match7191791', itemBody: 'Mulde' },
73
- { id: 'Match20473010', itemBody: 'Saale' },
74
- { id: 'Match6429655', itemBody: 'Spree' }]
71
+ [{ id: 'Match28433682', question_body: 'Weißeritz' },
72
+ { id: 'Match7191791', question_body: 'Mulde' },
73
+ { id: 'Match20473010', question_body: 'Saale' },
74
+ { id: 'Match6429655', question_body: 'Spree' }]
75
75
  )
76
76
  end
77
77
  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: 0.7.0
4
+ version: 0.7.1
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-06-21 00:00:00.000000000 Z
12
+ date: 2017-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport