Class: Moodle2CC::Moodle::Mod::QuestionInstance
- Inherits:
-
Object
- Object
- Moodle2CC::Moodle::Mod::QuestionInstance
- Includes:
- HappyMapper
- Defined in:
- lib/moodle2cc/moodle/mod.rb
Instance Attribute Summary collapse
-
#mod ⇒ Object
Returns the value of attribute mod.
Instance Method Summary collapse
Instance Attribute Details
#mod ⇒ Object
Returns the value of attribute mod.
10 11 12 |
# File 'lib/moodle2cc/moodle/mod.rb', line 10 def mod @mod end |
Instance Method Details
#question ⇒ Object
17 18 19 20 21 |
# File 'lib/moodle2cc/moodle/mod.rb', line 17 def question @question ||= mod.course.question_categories.map do |qc| qc.questions.find { |q| q.id == question_id } end.compact.first end |