Class: Moodle2CC::Moodle::GradeItem

Inherits:
Object
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/moodle2cc/moodle/grade_item.rb

Constant Summary collapse

PROPERTIES =
%w{id category_id item_name item_type item_module item_instance 
item_number grade_type grade_max grade_min scale_id}

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#courseObject

Returns the value of attribute course.



8
9
10
# File 'lib/moodle2cc/moodle/grade_item.rb', line 8

def course
  @course
end

Instance Method Details

#instanceObject



23
24
25
# File 'lib/moodle2cc/moodle/grade_item.rb', line 23

def instance
  course.mods.find { |mod| mod.id == item_instance }
end