qti 0.6.4 → 0.7.0

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: 892498baf474eb47e6613f48d773d5be9b948b25
4
- data.tar.gz: e0ed5d5cbf41b0af1bab5127024a4d646ffe26f8
3
+ metadata.gz: a232ed3a1f3603a43d9e787e12b2489512710deb
4
+ data.tar.gz: fd8c8946f8da1404adbc204e9a57ccfa4b0376ce
5
5
  SHA512:
6
- metadata.gz: 7f5e2babb2f18a5be292e6524afab2f3ebadc52923f3cb844dc5b65100834265d1a702ef6271aaf2774a7f39d1288e266a6682e3e278442ab60d980a3db28ac1
7
- data.tar.gz: 034499c04afe47d6d0af9dd3b725770ba7d866aa7ef4e749c023ad831660e877353f496f617f9b1cda3f2baaed4e7f9ae1a0652e92f4e7f290f7ad2269110b4b
6
+ metadata.gz: 692d2995082e0573277b54fef1947994229d5bf5fbde4ba01302903beb8c96eddf804ccff6a75143e5e3cbc471f835198c939a7485052f2e7f08fc547bcef3f5
7
+ data.tar.gz: da528527b15aa0886d22e2834ca3af8f47da0b4010e7d9f9d78b19816247fbd03edf1e12b3d4e3301474c7844d807aac07220442e700cc2106627b90f88dd182
@@ -63,9 +63,7 @@ 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',
67
- 'timeDependent' => 'false', 'identifier' => "Item-#{assessment_item.identifier}",
68
- 'title' => assessment_item.title }
66
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd' }
69
67
  end
70
68
  end
71
69
  end
@@ -1,7 +1,6 @@
1
1
  module Qti
2
2
  module ContentPackaging
3
3
  class AssessmentTest < Dry::Struct
4
- attribute :identifier, Types::Strict::String
5
4
  attribute :title, Types::Strict::String
6
5
  attribute :items, Types::Strict::Array.member(ContentPackaging::AssessmentItem)
7
6
  attribute :outcome_declarations, Types::Strict::Array.member(ContentPackaging::OutcomeDeclaration)
data/lib/qti/exporter.rb CHANGED
@@ -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%L')
28
+ Time.now.utc.strftime('%Y%m%d%H%M%S')
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) do
39
+ xml.assessmentTest(assesment_test_attributes(title: assessment_test.title)) do
40
40
  outcome_declarations(xml, assessment_test)
41
- xml.testPart(identifier: 'Main', navigationMode: 'linear', submissionMode: 'individual') do
41
+ xml.testPart do
42
42
  xml_assessment_section(xml)
43
43
  end
44
44
  end
@@ -70,7 +70,6 @@ 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
74
73
  manifest_resources(xml)
75
74
  end
76
75
  end
@@ -88,29 +87,29 @@ module Qti
88
87
  end
89
88
  end
90
89
 
91
- # rubocop:disable Metrics/AbcSize
92
90
  def learning_object_metadata(xml)
93
- xml['imsmd'].lom do
94
- xml['imsmd'].general do
95
- xml['imsmd'].identifier do
96
- xml['imsmd'].entry 'FB-02'
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'
97
97
  end
98
- xml['imsmd'].title do
99
- xml['imsmd'].string(assessment_test.title, 'language' => 'en')
98
+ imsmd_ns.title do
99
+ imsmd_ns.string(assessment_test.title, 'language' => 'en')
100
100
  end
101
- xml['imsmd'].language 'en'
102
- xml['imsmd'].description do
103
- xml['imsmd'].string('Instructure QTI package.' \
101
+ imsmd_ns.language 'en'
102
+ imsmd_ns.description do
103
+ imsmd_ns.string('Instructure QTI package.' \
104
104
  'Feedback XML used as an example of unprocessable entity', 'language' => 'en')
105
105
  end
106
- keywords(xml)
107
106
  end
107
+ keywords(xml)
108
108
  end
109
109
  end
110
- # rubocop:enable Metrics/AbcSize
111
110
 
112
111
  def keywords(xml)
113
- keywords = %w[feedback modal test inline block]
112
+ keywords = %w(feedback modal test inline block)
114
113
  keywords.each do |keyword|
115
114
  xml['imsmd'].keyword do
116
115
  xml['imsmd'].string(keyword, 'language' => 'en')
@@ -135,25 +134,21 @@ module Qti
135
134
  end
136
135
  end
137
136
 
138
- def assesment_test_attributes
139
- { 'xmlns' => 'http://www.imsglobal.org/xsd/imsqti_v2p2p1', 'xmlns:xi' => 'http://www.w3.org/2001/XInclude',
137
+ def assesment_test_attributes(args = {})
138
+ { 'xmlns' => 'http://www.imsglobal.org/xsd/imsqti_v2p2', 'xmlns:xi' => 'http://www.w3.org/2001/XInclude',
140
139
  'xmlns:m' => 'http://www.w3.org/1998/Math/MathML', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
141
140
  'xsi:schemaLocation' => 'http://www.imsglobal.org/xsd/imsqti_v2p2 ' \
142
- 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd',
143
- 'title' => assessment_test.title }
141
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd' }.merge(args)
144
142
  end
145
143
 
146
144
  def imsmanifest_attributes
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 ' \
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' \
153
149
  'http://ltsc.ieee.org/xsd/LOM http://www.imsglobal.org/xsd/imsmd_loose_v1p3p2.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 }
150
+ 'http://www.imsglobal.org/xsd/imsqti_metadata_v2p2' \
151
+ 'http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_metadata_v2p2.xsd' }
157
152
  end
158
153
 
159
154
  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
- question_body = lid_node.at_xpath('.//xmlns:mattext').text
21
- { id: lid_node.attributes['ident'].value, question_body: question_body }
20
+ item_body = lid_node.at_xpath('.//xmlns:mattext').text
21
+ { id: lid_node.attributes['ident'].value, itemBody: item_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, question_body: choices_by_identifier[id].content } }
27
+ questions_ids.map { |id| { id: id, itemBody: 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, question_body: choices_by_identifier[id].content } }
19
+ questions_ids.map { |id| { id: id, itemBody: 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" timeDependent="false" identifier="Item-1" title="Question 1">
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">
31
31
  <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
32
32
  <correctResponse>
33
33
  <value>true</value>
@@ -1,40 +1,38 @@
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
+
4
34
  describe '#export' do
5
35
  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
38
36
  let(:exporter) { Qti::Exporter.new(assessment_test, package_root_path: dir) }
39
37
 
40
38
  before do
@@ -44,7 +42,6 @@ describe Qti::Exporter do
44
42
  context 'empty assessment' do
45
43
  let(:assessment_test) do
46
44
  Qti::ContentPackaging::AssessmentTest.new(
47
- identifier: test_identifier,
48
45
  title: 'Empty test',
49
46
  items: [],
50
47
  outcome_declarations: []
@@ -55,8 +52,8 @@ describe Qti::Exporter do
55
52
  expect(exporter.exported_file_path).to have_zip_entry('assessment.xml').with_content(
56
53
  <<-XML.strip_heredoc
57
54
  <?xml version="1.0" encoding="UTF-8"?>
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"/>
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/>
60
57
  </assessmentTest>
61
58
  XML
62
59
  )
@@ -64,11 +61,11 @@ describe Qti::Exporter do
64
61
  end
65
62
 
66
63
  it 'generates the xml for an assessment with an item' do
67
- expect(exporter.exported_file_path).to contain_zip_entry("#{item_identifier}.xml")
64
+ expect(exporter.exported_file_path).to contain_zip_entry('0b8664be39cf69ef76402f3e41eb05.xml')
68
65
  expect(exporter.exported_file_path).to have_zip_entry('assessment.xml').with_content(
69
66
  <<-XML.strip_heredoc
70
67
  <?xml version="1.0" encoding="UTF-8"?>
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">
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">
72
69
  <outcomeDeclaration baseType="float" cardinality="single" identifier="TEST_total">
73
70
  <defaultValue>
74
71
  <value>0</value>
@@ -79,9 +76,9 @@ describe Qti::Exporter do
79
76
  <value>0</value>
80
77
  </defaultValue>
81
78
  </outcomeDeclaration>
82
- <testPart identifier="Main" navigationMode="linear" submissionMode="individual">
79
+ <testPart>
83
80
  <assessmentSection identifier="S1" visible="true" title="Section 1">
84
- <assessmentItemRef identifier="#{item_identifier}" href="#{item_identifier}.xml"/>
81
+ <assessmentItemRef identifier="0b8664be39cf69ef76402f3e41eb05" href="0b8664be39cf69ef76402f3e41eb05.xml"/>
85
82
  </assessmentSection>
86
83
  </testPart>
87
84
  </assessmentTest>
@@ -93,45 +90,44 @@ describe Qti::Exporter do
93
90
  expect(exporter.exported_file_path).to have_zip_entry('imsmanifest.xml').with_content(
94
91
  <<-XML.strip_heredoc
95
92
  <?xml version="1.0" encoding="UTF-8"?>
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}">
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">
97
94
  <metadata>
98
95
  <schema>QTIv2.2 Package</schema>
99
96
  <schemaversion>1.0.0</schemaversion>
100
97
  <imsmd:lom>
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>
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>
128
125
  </imsmd:lom>
129
126
  </metadata>
130
- <organizations/>
131
127
  <resources>
132
128
  <resource href="assessment.xml" type="imsqti_test_xmlv2p2" identifier="TEST">
133
129
  <file href="assessment.xml"/>
134
- <file href="#{item_identifier}.xml"/>
130
+ <file href="0b8664be39cf69ef76402f3e41eb05.xml"/>
135
131
  </resource>
136
132
  </resources>
137
133
  </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', question_body: 'Light Microscope' },
40
- { id: 'question_2', question_body: 'Electron Microscopes' }]
39
+ [{ id: 'question_1', itemBody: 'Light Microscope' },
40
+ { id: 'question_2', itemBody: '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', question_body: 'Antonio' },
34
- { id: 'C', question_body: 'Capulet' },
35
- { id: 'D', question_body: 'Demetrius' }]
33
+ [{ id: 'A', itemBody: 'Antonio' },
34
+ { id: 'C', itemBody: 'Capulet' },
35
+ { id: 'D', itemBody: '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', question_body: 'Weißeritz' },
72
- { id: 'Match7191791', question_body: 'Mulde' },
73
- { id: 'Match20473010', question_body: 'Saale' },
74
- { id: 'Match6429655', question_body: 'Spree' }]
71
+ [{ id: 'Match28433682', itemBody: 'Weißeritz' },
72
+ { id: 'Match7191791', itemBody: 'Mulde' },
73
+ { id: 'Match20473010', itemBody: 'Saale' },
74
+ { id: 'Match6429655', itemBody: '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.6.4
4
+ version: 0.7.0
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-22 00:00:00.000000000 Z
12
+ date: 2017-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport