Class: Course::Assessment::Question::MultipleResponseOption

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/course/assessment/question/multiple_response_option.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.correctObject

Gets the options which are marked as correct.


13
# File 'app/models/course/assessment/question/multiple_response_option.rb', line 13

scope :correct, ->() { where(correct: true) }

Instance Method Details

#initialize_duplicate(duplicator, other) ⇒ Object


15
16
17
# File 'app/models/course/assessment/question/multiple_response_option.rb', line 15

def initialize_duplicate(duplicator, other)
  self.question = duplicator.duplicate(other.question)
end