Class: Qti::Models::Manifest
- Inherits:
-
Base
- Object
- Base
- Qti::Models::Manifest
show all
- Defined in:
- lib/qti/models/manifest.rb
Constant Summary
Constants inherited
from Base
Base::ELEMENTS_REMAP
Instance Attribute Summary
Attributes inherited from Base
#doc
Instance Method Summary
collapse
Methods inherited from 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
Instance Method Details
#assessment_test_href ⇒ Object
6
7
8
9
|
# File 'lib/qti/models/manifest.rb', line 6
def assessment_test_href
href = qti_1_href.nil? ? qti_2_x_href : qti_1_href
remap_href_path(href, @path)
end
|
#qti_1_href ⇒ Object
11
12
13
|
# File 'lib/qti/models/manifest.rb', line 11
def qti_1_href
xpath_with_single_check("//xmlns:resources/xmlns:resource[@type='imsqti_xmlv1p2']/@href")&.content
end
|
#qti_2_x_href ⇒ Object
15
16
17
18
|
# File 'lib/qti/models/manifest.rb', line 15
def qti_2_x_href
xpath_with_single_check("//xmlns:resources/xmlns:resource[@type='imsqti_test_xmlv2p1']/@href")&.content ||
xpath_with_single_check("//xmlns:resources/xmlns:resource[@type='imsqti_test_xmlv2p2']/@href")&.content
end
|