class Qti::V2::Models::NonAssessmentTest
Public Instance Methods
assessment_items()
click to toggle source
# File lib/qti/v2/models/non_assessment_test.rb, line 7 def assessment_items # Return the xml files we should be parsing @assessment_items ||= begin item_resources_v2.map do |node| rsc = Qti::Models::Resource.new(node, self) { path: remap_href_path(rsc.href), resource: rsc } end end end
stimulus_ref(assessment_item_ref)
click to toggle source
# File lib/qti/v2/models/non_assessment_test.rb, line 17 def stimulus_ref(assessment_item_ref) ref = assessment_item_ref[:path].sub(@package_root, '') dependencies = @doc.xpath("//xmlns:resource[@href='#{ref}']/xmlns:dependency/@identifierref") return unless dependencies&.count == 1 href = xpath_with_single_check("//xmlns:resource[@identifier='#{dependencies.first}']/@href") remap_href_path(href) end