qti 0.8.2 → 0.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7543c5147bd92cd202829811e0f16d1c886ed2e5
4
- data.tar.gz: c7c3d6d77a201a55d2dfaf4c04d01aa555e70bfa
3
+ metadata.gz: 9501025b957fd152a06d9f8fbcd0a43f18231307
4
+ data.tar.gz: 780e5d82d983e6d94aea40574865d2d6f59a6c6b
5
5
  SHA512:
6
- metadata.gz: 8b64ab839a19673eba4f2400a704a613abc8bb2ab9c6dead2b2f0780eb974916133a55c2d5171ab6af0e9540612af6f759922404ca9a12ad39fe4966deddd638
7
- data.tar.gz: 372e4dc9624c533bb6566944cfb676b6a463d67fdef2bdb3649639e01d6ae1d99da4369c55dc66b45cb63c5ec8317b9f441ca698ae27893e6919bb312052c76d
6
+ metadata.gz: 05be9883791183dc3a1c8261b814cacd48e2a960c7755e004e5e6ed3f210aba9da26b549bd6dbda3a9753cc94cbfbe976709ded15f79f8fb0045a71b8b8a1144
7
+ data.tar.gz: 77d486e5b21b022b9787448db926c2028341f07ed01731b07c67b0f5b2c48147145a5894554fcd769f49b289de43b287f352637205af966441ae937dc5905414
@@ -15,6 +15,8 @@ module Qti
15
15
 
16
16
  # Filter undesired interaction nodes out of the list (need to make this a deep traversal)
17
17
  node.children.filter(INTERACTION_ELEMENTS_CSS).map(&:unlink)
18
+ # Filter out rubrics
19
+ node.children.filter('rubricBlock').map(&:unlink)
18
20
 
19
21
  node.add_child(prompt) if prompt&.parent && prompt.parent != node
20
22
  sanitize_content!(node.to_html)
@@ -64,4 +64,17 @@ describe Qti::V2::Models::AssessmentItem do
64
64
  end
65
65
  end
66
66
  end
67
+
68
+ context 'rubrics' do
69
+ describe 'with a rubric' do
70
+ let(:fixtures_path) { File.join('spec', 'fixtures') }
71
+ let(:file_path) { File.join(fixtures_path, 'items_2.1', 'extended_text_rubric.xml') }
72
+ let(:loaded_class) { described_class.from_path!(file_path) }
73
+
74
+ it 'removes the rubric from the item_body' do
75
+ expect(loaded_class.item_body).to include 'Read this postcard'
76
+ expect(loaded_class.item_body).not_to include 'Scoring Guidelines'
77
+ end
78
+ end
79
+ end
67
80
  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.8.2
4
+ version: 0.8.3
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-09-05 00:00:00.000000000 Z
12
+ date: 2017-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -511,7 +511,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
511
511
  version: '0'
512
512
  requirements: []
513
513
  rubyforge_project:
514
- rubygems_version: 2.5.2
514
+ rubygems_version: 2.5.1
515
515
  signing_key:
516
516
  specification_version: 4
517
517
  summary: QTI 1.2 and 2.1 import and export models