blob: 6433f6d3b93a3487a4ddeaf9673f05e8703989ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# Model storing answers for questions with multiple choice content.
class MultipleChoiceAnswer < Answer
# Returns RichTypes::CheckList describing given answer
def options
if @options.nil?
@options = RichTypes::CheckList.new(question.content.options)
@options.options = content.to_s
end
@options
end
# Sets new answer
def options=(what)
self.options
@options.options = what
self.content = @options.to_s
end
end
|