Class: Qti::V2::Models::AssessmentTest
- Inherits:
-
Base
- Object
- Models::Base
- Base
- Qti::V2::Models::AssessmentTest
- Defined in:
- lib/qti/v2/models/assessment_test.rb
Constant Summary
Constants inherited from Base
Base::BODY_ELEMENTS_CSS, Base::CHOICE_ELEMENTS_CSS, Base::INTERACTION_ELEMENTS_CSS
Constants inherited from Models::Base
Instance Method Summary collapse
- #assessment_item_reference_hrefs ⇒ Object
-
#assessment_sections ⇒ Object
Not used yet.
-
#test_parts ⇒ Object
Not used yet.
- #title ⇒ Object
Methods inherited from Base
Methods inherited from Models::Base
#css_with_single_check, from_path!, #initialize, #parse_xml, #remap_href_path, #remap_unknown_tags_transformer, #sanitize_config, #sanitize_content!, #xpath_with_single_check
Constructor Details
This class inherits a constructor from Qti::Models::Base
Instance Method Details
#assessment_item_reference_hrefs ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/qti/v2/models/assessment_test.rb', line 11 def assessment_item_reference_hrefs # Return the xml files we should be parsing @assessment_item_reference_hrefs ||= begin @doc.xpath('//xmlns:assessmentItemRef/@href').map(&:content).map do |href| remap_href_path(href, @path) end end end |
#assessment_sections ⇒ Object
Not used yet
26 27 28 |
# File 'lib/qti/v2/models/assessment_test.rb', line 26 def assessment_sections @assessment_sections ||= test_parts.first.xpath('//xmlns:assessmentSection') end |
#test_parts ⇒ Object
Not used yet
21 22 23 |
# File 'lib/qti/v2/models/assessment_test.rb', line 21 def test_parts @test_parts ||= @doc.xpath('//xmlns:testPart') end |
#title ⇒ Object
7 8 9 |
# File 'lib/qti/v2/models/assessment_test.rb', line 7 def title @title ||= xpath_with_single_check('//xmlns:assessmentTest/@title').content end |