qti 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/qti/models/assessment_meta.rb +10 -10
- data/lib/qti/version.rb +1 -1
- data/spec/fixtures/{test_qti_1.2_canvas_extended → test_qti_1.2_canvas_extended_1}/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml +0 -0
- data/spec/fixtures/{test_qti_1.2_canvas_extended → test_qti_1.2_canvas_extended_1}/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml +0 -0
- data/spec/fixtures/{test_qti_1.2_canvas_extended → test_qti_1.2_canvas_extended_1}/imsmanifest.xml +0 -0
- data/spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml +76 -0
- data/spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml +17 -0
- data/spec/fixtures/test_qti_1.2_canvas_extended_2/imsmanifest.xml +39 -0
- data/spec/lib/qti/models/assessment_meta_spec.rb +34 -1
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d403cbd96ceea6d51d6a27c210b4498996a742dc4f93453507bedad8ce4a032d
|
4
|
+
data.tar.gz: 9cb50045bb3437c0ee2df8569b3762feb33e52d652682ea8828e7c8061dd2b9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0b9f078f0d3b9566f0439cb22f5e1ffdc5b269ed31ae07172fafd5fce9f1d4fb95a5b8f71877bdfe0d0ff90c0987157d35841613b930367208eb0e7b6901cce
|
7
|
+
data.tar.gz: 53f22ab124044a04a33b83581127a9a08856b4b49a1a37842eacdea86655ef2a433ae2bcc23c43af1f890807af0b354dc0ef85c1abe78edb7fc8309f5ad311b3
|
@@ -18,7 +18,7 @@ module Qti
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def hide_results
|
21
|
-
|
21
|
+
tag_under_quiz('hide_results')
|
22
22
|
end
|
23
23
|
|
24
24
|
def scoring_policy
|
@@ -138,7 +138,9 @@ module Qti
|
|
138
138
|
end
|
139
139
|
|
140
140
|
def access_code
|
141
|
-
tag_under_quiz('access_code')
|
141
|
+
code = sanitize_content!(tag_under_quiz('access_code'))
|
142
|
+
return nil if code.to_s.empty?
|
143
|
+
code
|
142
144
|
end
|
143
145
|
|
144
146
|
def ip_filter
|
@@ -187,22 +189,20 @@ module Qti
|
|
187
189
|
end
|
188
190
|
|
189
191
|
def lockdown_browser_monitor_data
|
190
|
-
|
192
|
+
tag_under_quiz('lockdown_browser_monitor_data')
|
191
193
|
end
|
192
194
|
|
193
195
|
private
|
194
196
|
|
195
197
|
def tag_under_quiz(tag)
|
196
|
-
@doc.xpath("//xmlns:quiz/xmlns:#{tag}")&.first&.content
|
198
|
+
value = @doc.xpath("//xmlns:quiz/xmlns:#{tag}")&.first&.content
|
199
|
+
# If the tag is present but has no content, return nil
|
200
|
+
return nil if value.to_s.empty?
|
201
|
+
value
|
197
202
|
end
|
198
203
|
|
199
204
|
def string_true?(value)
|
200
|
-
value&.casecmp('true')&.zero?
|
201
|
-
end
|
202
|
-
|
203
|
-
def nil_if_empty(value)
|
204
|
-
return nil if value.to_s.empty?
|
205
|
-
value
|
205
|
+
value&.casecmp('true')&.zero? || false
|
206
206
|
end
|
207
207
|
end
|
208
208
|
|
data/lib/qti/version.rb
CHANGED
File without changes
|
File without changes
|
data/spec/fixtures/{test_qti_1.2_canvas_extended → test_qti_1.2_canvas_extended_1}/imsmanifest.xml
RENAMED
File without changes
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<quiz identifier="gba044ae1fc7cfd3dc413e0df695e0068" xmlns="http://canvas.instructure.com/xsd/cccv1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://canvas.instructure.com/xsd/cccv1p0 https://canvas.instructure.com/xsd/cccv1p0.xsd">
|
3
|
+
<title></title>
|
4
|
+
<description></description>
|
5
|
+
<lock_at></lock_at>
|
6
|
+
<unlock_at></unlock_at>
|
7
|
+
<due_at></due_at>
|
8
|
+
<shuffle_answers></shuffle_answers>
|
9
|
+
<scoring_policy></scoring_policy>
|
10
|
+
<hide_results></hide_results>
|
11
|
+
<quiz_type></quiz_type>
|
12
|
+
<points_possible/>
|
13
|
+
<require_lockdown_browser></require_lockdown_browser>
|
14
|
+
<require_lockdown_browser_for_results></require_lockdown_browser_for_results>
|
15
|
+
<require_lockdown_browser_monitor></require_lockdown_browser_monitor>
|
16
|
+
<lockdown_browser_monitor_data/>
|
17
|
+
<access_code></access_code>
|
18
|
+
<ip_filter></ip_filter>
|
19
|
+
<show_correct_answers></show_correct_answers>
|
20
|
+
<show_correct_answers_at></show_correct_answers_at>
|
21
|
+
<hide_correct_answers_at></hide_correct_answers_at>
|
22
|
+
<anonymous_submissions></anonymous_submissions>
|
23
|
+
<could_be_locked></could_be_locked>
|
24
|
+
<time_limit></time_limit>
|
25
|
+
<allowed_attempts></allowed_attempts>
|
26
|
+
<one_question_at_a_time></one_question_at_a_time>
|
27
|
+
<cant_go_back></cant_go_back>
|
28
|
+
<available></available>
|
29
|
+
<one_time_results></one_time_results>
|
30
|
+
<show_correct_answers_last_attempt></show_correct_answers_last_attempt>
|
31
|
+
<only_visible_to_overrides></only_visible_to_overrides>
|
32
|
+
<module_locked></module_locked>
|
33
|
+
<assignment identifier="g390e22b33353b658bb23abbce000414f">
|
34
|
+
<title>asd09sdfaxsdflj</title>
|
35
|
+
<due_at>2020-05-23T04:59:59</due_at>
|
36
|
+
<lock_at>2020-07-10T04:59:59</lock_at>
|
37
|
+
<unlock_at>2020-04-16T05:00:00</unlock_at>
|
38
|
+
<module_locked>false</module_locked>
|
39
|
+
<all_day_date>2020-05-22</all_day_date>
|
40
|
+
<workflow_state>unpublished</workflow_state>
|
41
|
+
<assignment_overrides>
|
42
|
+
</assignment_overrides>
|
43
|
+
<quiz_identifierref>gba044ae1fc7cfd3dc413e0df695e0068</quiz_identifierref>
|
44
|
+
<allowed_extensions></allowed_extensions>
|
45
|
+
<has_group_category>false</has_group_category>
|
46
|
+
<grading_type>points</grading_type>
|
47
|
+
<all_day>true</all_day>
|
48
|
+
<submission_types>online_quiz</submission_types>
|
49
|
+
<position>11</position>
|
50
|
+
<turnitin_enabled>false</turnitin_enabled>
|
51
|
+
<vericite_enabled>false</vericite_enabled>
|
52
|
+
<peer_review_count>0</peer_review_count>
|
53
|
+
<peer_reviews>false</peer_reviews>
|
54
|
+
<automatic_peer_reviews>false</automatic_peer_reviews>
|
55
|
+
<anonymous_peer_reviews>false</anonymous_peer_reviews>
|
56
|
+
<grade_group_students_individually>false</grade_group_students_individually>
|
57
|
+
<freeze_on_copy>false</freeze_on_copy>
|
58
|
+
<omit_from_final_grade>false</omit_from_final_grade>
|
59
|
+
<intra_group_peer_reviews>false</intra_group_peer_reviews>
|
60
|
+
<only_visible_to_overrides>false</only_visible_to_overrides>
|
61
|
+
<post_to_sis>false</post_to_sis>
|
62
|
+
<moderated_grading>false</moderated_grading>
|
63
|
+
<grader_count>0</grader_count>
|
64
|
+
<grader_comments_visible_to_graders>true</grader_comments_visible_to_graders>
|
65
|
+
<anonymous_grading>false</anonymous_grading>
|
66
|
+
<graders_anonymous_to_graders>false</graders_anonymous_to_graders>
|
67
|
+
<grader_names_visible_to_final_grader>true</grader_names_visible_to_final_grader>
|
68
|
+
<anonymous_instructor_annotations>false</anonymous_instructor_annotations>
|
69
|
+
<post_policy>
|
70
|
+
<post_manually>false</post_manually>
|
71
|
+
</post_policy>
|
72
|
+
</assignment>
|
73
|
+
<assignment_group_identifierref>g242d42956e923734daedb8192227c3c9</assignment_group_identifierref>
|
74
|
+
<assignment_overrides>
|
75
|
+
</assignment_overrides>
|
76
|
+
</quiz>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
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
|
+
<assessment ident="gba044ae1fc7cfd3dc413e0df695e0068" title="asd09sdfaxsdflj">
|
4
|
+
<qtimetadata>
|
5
|
+
<qtimetadatafield>
|
6
|
+
<fieldlabel>qmd_timelimit</fieldlabel>
|
7
|
+
<fieldentry>187</fieldentry>
|
8
|
+
</qtimetadatafield>
|
9
|
+
<qtimetadatafield>
|
10
|
+
<fieldlabel>cc_maxattempts</fieldlabel>
|
11
|
+
<fieldentry>52</fieldentry>
|
12
|
+
</qtimetadatafield>
|
13
|
+
</qtimetadata>
|
14
|
+
<section ident="root_section">
|
15
|
+
</section>
|
16
|
+
</assessment>
|
17
|
+
</questestinterop>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<manifest identifier="g9dc5fd873c331ef5143dfe20c719a3f3" xmlns="http://www.imsglobal.org/xsd/imsccv1p1/imscp_v1p1" xmlns:lom="http://ltsc.ieee.org/xsd/imsccv1p1/LOM/resource" xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsccv1p1/imscp_v1p1 http://www.imsglobal.org/xsd/imscp_v1p1.xsd http://ltsc.ieee.org/xsd/imsccv1p1/LOM/resource http://www.imsglobal.org/profile/cc/ccv1p1/LOM/ccv1p1_lomresource_v1p0.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 http://www.imsglobal.org/xsd/imsmd_v1p2p2.xsd">
|
3
|
+
<metadata>
|
4
|
+
<schema>IMS Content</schema>
|
5
|
+
<schemaversion>1.1.3</schemaversion>
|
6
|
+
<imsmd:lom>
|
7
|
+
<imsmd:general>
|
8
|
+
<imsmd:title>
|
9
|
+
<imsmd:string>QTI Quiz Export for course "QO"</imsmd:string>
|
10
|
+
</imsmd:title>
|
11
|
+
</imsmd:general>
|
12
|
+
<imsmd:lifeCycle>
|
13
|
+
<imsmd:contribute>
|
14
|
+
<imsmd:date>
|
15
|
+
<imsmd:dateTime>2020-05-01</imsmd:dateTime>
|
16
|
+
</imsmd:date>
|
17
|
+
</imsmd:contribute>
|
18
|
+
</imsmd:lifeCycle>
|
19
|
+
<imsmd:rights>
|
20
|
+
<imsmd:copyrightAndOtherRestrictions>
|
21
|
+
<imsmd:value>yes</imsmd:value>
|
22
|
+
</imsmd:copyrightAndOtherRestrictions>
|
23
|
+
<imsmd:description>
|
24
|
+
<imsmd:string>Private (Copyrighted) - http://en.wikipedia.org/wiki/Copyright</imsmd:string>
|
25
|
+
</imsmd:description>
|
26
|
+
</imsmd:rights>
|
27
|
+
</imsmd:lom>
|
28
|
+
</metadata>
|
29
|
+
<organizations/>
|
30
|
+
<resources>
|
31
|
+
<resource identifier="gba044ae1fc7cfd3dc413e0df695e0068" type="imsqti_xmlv1p2">
|
32
|
+
<file href="gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml"/>
|
33
|
+
<dependency identifierref="gd7fc181aed26406e7e3e9c5c8c475128"/>
|
34
|
+
</resource>
|
35
|
+
<resource identifier="gd7fc181aed26406e7e3e9c5c8c475128" type="associatedcontent/imscc_xmlv1p1/learning-application-resource" href="gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml">
|
36
|
+
<file href="gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml"/>
|
37
|
+
</resource>
|
38
|
+
</resources>
|
39
|
+
</manifest>
|
@@ -70,7 +70,7 @@ context 'Canvas Assessment Meta Data' do
|
|
70
70
|
end
|
71
71
|
|
72
72
|
describe 'in a QTI 1.2 container with extended fields' do
|
73
|
-
let(:qti_file) { 'test_qti_1.
|
73
|
+
let(:qti_file) { 'test_qti_1.2_canvas_extended_1' }
|
74
74
|
let(:assessment_type) { Qti::V1::Models::Assessment }
|
75
75
|
let(:title) { 'asd09sdfaxsdflj' }
|
76
76
|
let(:instructions) { '<p>dlkjfaflkjla3rlajl3lafd</p>' }
|
@@ -102,6 +102,39 @@ context 'Canvas Assessment Meta Data' do
|
|
102
102
|
include_examples('loads canvas meta data')
|
103
103
|
end
|
104
104
|
|
105
|
+
describe 'in a QTI 1.2 container with extended fields and empty tags' do
|
106
|
+
let(:qti_file) { 'test_qti_1.2_canvas_extended_2' }
|
107
|
+
let(:assessment_type) { Qti::V1::Models::Assessment }
|
108
|
+
let(:title) { '' }
|
109
|
+
let(:instructions) { '' }
|
110
|
+
let(:points_possible) { 0.0 }
|
111
|
+
let(:oqaat) { false }
|
112
|
+
let(:allowed_attempts) { 0 }
|
113
|
+
let(:hide_results) { nil }
|
114
|
+
let(:quiz_type) { nil }
|
115
|
+
let('anon_submissions') { false }
|
116
|
+
let(:could_be_locked) { false }
|
117
|
+
let(:nobacktracking) { false }
|
118
|
+
let(:available) { false }
|
119
|
+
let(:one_time_results) { false }
|
120
|
+
let(:scoring_policy) { nil }
|
121
|
+
let(:shuffle_answers) { false }
|
122
|
+
let(:lock_at) { nil }
|
123
|
+
let(:unlock_at) { nil }
|
124
|
+
let(:due_at) { nil }
|
125
|
+
let(:access_code) { nil }
|
126
|
+
let(:ip_filter) { nil }
|
127
|
+
let(:time_limit) { nil }
|
128
|
+
let(:show_answers_at) { nil }
|
129
|
+
let(:hide_answers_at) { nil }
|
130
|
+
let(:rlb) { false }
|
131
|
+
let(:rlb_results) { false }
|
132
|
+
let(:rlb_monitor) { false }
|
133
|
+
let(:lb_monitor_data) { nil }
|
134
|
+
|
135
|
+
include_examples('loads canvas meta data')
|
136
|
+
end
|
137
|
+
|
105
138
|
describe 'in a Common Cartridge container' do
|
106
139
|
let(:qti_file) { 'test_imscc_canvas' }
|
107
140
|
let(:assessment_type) { Qti::V1::Models::Assessment }
|
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.
|
4
|
+
version: 2.3.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: 2020-05-
|
12
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|
@@ -510,9 +510,12 @@ files:
|
|
510
510
|
- spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/assessment_meta.xml
|
511
511
|
- spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/i00f37ac2af026e5a607e4a5d9a70b1d5.xml
|
512
512
|
- spec/fixtures/test_qti_1.2_canvas/imsmanifest.xml
|
513
|
-
- spec/fixtures/test_qti_1.
|
514
|
-
- spec/fixtures/test_qti_1.
|
515
|
-
- spec/fixtures/test_qti_1.
|
513
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml
|
514
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml
|
515
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/imsmanifest.xml
|
516
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml
|
517
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml
|
518
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/imsmanifest.xml
|
516
519
|
- spec/fixtures/test_qti_1.2_multi/i913965373124f56ca136e87deb040c03/assessment_meta.xml
|
517
520
|
- spec/fixtures/test_qti_1.2_multi/i913965373124f56ca136e87deb040c03/i913965373124f56ca136e87deb040c03.xml
|
518
521
|
- spec/fixtures/test_qti_1.2_multi/ife643a8a04b48b22acab95de6c01f1cc/assessment_meta.xml
|
@@ -849,9 +852,12 @@ test_files:
|
|
849
852
|
- spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/assessment_meta.xml
|
850
853
|
- spec/fixtures/test_qti_1.2_canvas/i00f37ac2af026e5a607e4a5d9a70b1d5/i00f37ac2af026e5a607e4a5d9a70b1d5.xml
|
851
854
|
- spec/fixtures/test_qti_1.2_canvas/imsmanifest.xml
|
852
|
-
- spec/fixtures/test_qti_1.
|
853
|
-
- spec/fixtures/test_qti_1.
|
854
|
-
- spec/fixtures/test_qti_1.
|
855
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml
|
856
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml
|
857
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_1/imsmanifest.xml
|
858
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/assessment_meta.xml
|
859
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/gba044ae1fc7cfd3dc413e0df695e0068/gba044ae1fc7cfd3dc413e0df695e0068.xml
|
860
|
+
- spec/fixtures/test_qti_1.2_canvas_extended_2/imsmanifest.xml
|
855
861
|
- spec/fixtures/test_qti_1.2_multi/i913965373124f56ca136e87deb040c03/assessment_meta.xml
|
856
862
|
- spec/fixtures/test_qti_1.2_multi/i913965373124f56ca136e87deb040c03/i913965373124f56ca136e87deb040c03.xml
|
857
863
|
- spec/fixtures/test_qti_1.2_multi/ife643a8a04b48b22acab95de6c01f1cc/assessment_meta.xml
|