Class: Export2MoodleXML

Inherits:
Object
  • Object
show all
Defined in:
lib/asker/exporter/export2moodle_xml.rb

Instance Method Summary collapse

Instance Method Details

#call(data, project) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/asker/exporter/export2moodle_xml.rb', line 6

def call(data, project)
  file = File.open(project.get(:moodlepath), "w")
  add_header(file, project)

  export_concepts(concepts: data[:concepts_ai], file: file)
  export_codes(codes: data[:codes_ai], file: file)
  export_problems(problems: data[:problems], file: file)

  close(file)
end