Class: Kaltura::KalturaOptionalAnswer

Inherits:
KalturaObjectBase show all
Defined in:
lib/kaltura_plugins/kaltura_quiz_client_plugin.rb

Overview

A representation of an optional answer for question cue point

Instance Attribute Summary collapse

Attributes inherited from KalturaObjectBase

#object_type, #related_objects

Instance Method Summary collapse

Methods inherited from KalturaObjectBase

#camelcase, #to_b, #to_params

Instance Attribute Details

#is_correctObject

Returns the value of attribute is_correct.



68
69
70
# File 'lib/kaltura_plugins/kaltura_quiz_client_plugin.rb', line 68

def is_correct
  @is_correct
end

#keyObject

Returns the value of attribute key.



65
66
67
# File 'lib/kaltura_plugins/kaltura_quiz_client_plugin.rb', line 65

def key
  @key
end

#textObject

Returns the value of attribute text.



66
67
68
# File 'lib/kaltura_plugins/kaltura_quiz_client_plugin.rb', line 66

def text
  @text
end

#weightObject

Returns the value of attribute weight.



67
68
69
# File 'lib/kaltura_plugins/kaltura_quiz_client_plugin.rb', line 67

def weight
  @weight
end

Instance Method Details

#from_xml(xml_element) ⇒ Object



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/kaltura_plugins/kaltura_quiz_client_plugin.rb', line 77

def from_xml(xml_element)
	super
	if xml_element.elements['key'] != nil
		self.key = xml_element.elements['key'].text
	end
	if xml_element.elements['text'] != nil
		self.text = xml_element.elements['text'].text
	end
	if xml_element.elements['weight'] != nil
		self.weight = xml_element.elements['weight'].text
	end
	if xml_element.elements['isCorrect'] != nil
		self.is_correct = xml_element.elements['isCorrect'].text
	end
end