module Moodle2CC::CC::Resource
Public Class Methods
included(klass)
click to toggle source
# File lib/moodle2cc/cc/resource.rb, line 3 def self.included(klass) klass.class_eval do attr_accessor :mod, :identifier, :id, :title, :indent end end
new(mod, *args)
click to toggle source
# File lib/moodle2cc/cc/resource.rb, line 9 def initialize(mod, *args) @mod = mod @id = mod.id @title = mod.name @indent = mod.section_mod.nil? ? 0 : mod.section_mod.indent @identifier = create_resource_key(mod) end
Public Instance Methods
create_files(export_dir)
click to toggle source
# File lib/moodle2cc/cc/resource.rb, line 17 def create_files(export_dir) end
create_organization_item_node(item_node)
click to toggle source
# File lib/moodle2cc/cc/resource.rb, line 23 def create_organization_item_node(item_node) item_node.item(:identifier => create_mod_key(@mod), :identifierref => @identifier) do |sub_item| sub_item.title @title end end
create_resource_node(resources_node)
click to toggle source
# File lib/moodle2cc/cc/resource.rb, line 20 def create_resource_node(resources_node) end