Class: Moodle2CC::Moodle2::Parsers::ForumParser
- Inherits:
-
Object
- Object
- Moodle2CC::Moodle2::Parsers::ForumParser
- Includes:
- ParserHelper
- Defined in:
- lib/moodle2cc/moodle2/parsers/forum_parser.rb
Constant Summary collapse
- FORUM_MODULE_NAME =
'forum'
- HSU_MODULE_NAME =
'hsuforum'
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
-
#initialize(backup_dir) ⇒ ForumParser
constructor
A new instance of ForumParser.
- #parse ⇒ Object
Methods included from ParserHelper
#activity_directories, #parse_boolean, #parse_module, #parse_text
Constructor Details
#initialize(backup_dir) ⇒ ForumParser
Returns a new instance of ForumParser.
8 9 10 |
# File 'lib/moodle2cc/moodle2/parsers/forum_parser.rb', line 8 def initialize(backup_dir) @backup_dir = backup_dir end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 |
# File 'lib/moodle2cc/moodle2/parsers/forum_parser.rb', line 12 def parse activity_directories(@backup_dir, FORUM_MODULE_NAME).map { |dir| parse_forum(dir, FORUM_MODULE_NAME) } + activity_directories(@backup_dir, HSU_MODULE_NAME).map { |dir| parse_forum(dir, HSU_MODULE_NAME) } end |