Class: Moodle2CC::CanvasCC::Models::Answer

Inherits:
Object
  • Object
show all
Defined in:
lib/moodle2cc/canvas_cc/models/answer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(answer = nil) ⇒ Answer

Returns a new instance of Answer.



5
6
7
8
9
10
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 5

def initialize(answer=nil)
  return unless answer
  answer.instance_variables.each do |var|
    self.instance_variable_set(var, answer.instance_variable_get(var))
  end
end

Instance Attribute Details

#answer_formatObject

Returns the value of attribute answer_format.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def answer_format
  @answer_format
end

#answer_textObject

Returns the value of attribute answer_text.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def answer_text
  @answer_text
end

#feedbackObject

Returns the value of attribute feedback.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def feedback
  @feedback
end

#feedback_formatObject

Returns the value of attribute feedback_format.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def feedback_format
  @feedback_format
end

#fractionObject

Returns the value of attribute fraction.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def fraction
  @fraction
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def id
  @id
end

#resp_identObject

Returns the value of attribute resp_ident.



3
4
5
# File 'lib/moodle2cc/canvas_cc/models/answer.rb', line 3

def resp_ident
  @resp_ident
end