Class: Moodle2CC::Moodle2::Parsers::QuestionParsers::RandomSAParser

Inherits:
QuestionParser
  • Object
show all
Includes:
ParserHelper
Defined in:
lib/moodle2cc/moodle2/parsers/question_parsers/random_sa_parser.rb

Constant Summary

Constants included from ParserHelper

ParserHelper::FILES_XML, ParserHelper::IMS_FILEBASE_TOKEN, ParserHelper::MODULE_XML, ParserHelper::MOODLE_FILEBASE_TOKEN, ParserHelper::SLASH_TOKEN, ParserHelper::XML_NULL_VALUE

Instance Method Summary collapse

Methods included from ParserHelper

#activity_directories, #parse_boolean, #parse_module, #parse_text

Methods inherited from QuestionParser

parse, register_parser_type

Instance Method Details

#parse_question(node) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/moodle2cc/moodle2/parsers/question_parsers/random_sa_parser.rb', line 6

def parse_question(node)
  question = super

  if choose_node = node.at_xpath("plugin_qtype_randomsamatch_question/randomsamatch/choose")
    question.choose = choose_node.text
  end

  question
end