Class: Course::Assessment::Question::ProgrammingTemplateFile

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

Instance Method Summary collapse

Instance Method Details

#copy_template_to(answer) ⇒ Course::Assessment::Answer::ProgrammingFile

Copies the current template into the provided answer.

This preserves the filename and contents.

Parameters:

Returns:


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

def copy_template_to(answer)
  answer.files.build(filename: filename, content: content)
end

#initialize_duplicate(_duplicator, _other) ⇒ Object


22
23
# File 'app/models/course/assessment/question/programming_template_file.rb', line 22

def initialize_duplicate(_duplicator, _other)
end