Class: Course::Assessment::Question::Scribing

Inherits:
ApplicationRecord show all
Defined in:
app/models/course/assessment/question/scribing.rb

Instance Method Summary collapse

Instance Method Details

#attempt(submission, _last_attempt = nil) ⇒ Object

Scribing is not autogradable, don't need last attempt


18
19
20
21
# File 'app/models/course/assessment/question/scribing.rb', line 18

def attempt(submission, _last_attempt = nil)
  answer = Course::Assessment::Answer::Scribing.new(submission: submission, question: question)
  answer.acting_as
end

#initialize_duplicate(duplicator, other) ⇒ Object


10
11
12
13
14
15
# File 'app/models/course/assessment/question/scribing.rb', line 10

def initialize_duplicate(duplicator, other)
  copy_attributes(other)
  associate_duplicated_skills(duplicator, other)

  self.attachment = duplicator.duplicate(other.attachment)
end

#question_typeObject

return the type of question i.e. Scribing


24
25
26
# File 'app/models/course/assessment/question/scribing.rb', line 24

def question_type
  I18n.t('course.assessment.question.scribing.question_type')
end

#to_partial_pathObject


6
7
8
# File 'app/models/course/assessment/question/scribing.rb', line 6

def to_partial_path
  'course/assessment/question/scribing/scribing'
end