class Senkyoshi::CourseToc
Public Class Methods
get_pre_data(xml, file_name)
click to toggle source
# File lib/senkyoshi/models/course_toc.rb, line 21 def self.get_pre_data(xml, file_name) target_type = xml.xpath("/COURSETOC/TARGETTYPE/@value").first.text if target_type != "MODULE" || target_type != "DIVIDER" title = xml.xpath("/COURSETOC/LABEL/@value").first.text internal_handle = xml.xpath("/COURSETOC/INTERNALHANDLE/@value"). first.text { title: title, target_type: target_type, original_file: file_name, internal_handle: internal_handle, } end end