Module: IMS::LTI::Extensions::OutcomeData::OutcomeRequest
- Includes:
- ExtensionBase, Base
- Defined in:
- lib/ims/lti/extensions/outcome_data.rb
Instance Attribute Summary collapse
-
#outcome_cdata_text ⇒ Object
Returns the value of attribute outcome_cdata_text.
-
#outcome_needs_grading ⇒ Object
Returns the value of attribute outcome_needs_grading.
-
#outcome_text ⇒ Object
Returns the value of attribute outcome_text.
-
#outcome_url ⇒ Object
Returns the value of attribute outcome_url.
Instance Method Summary collapse
Methods included from Base
Methods included from ExtensionBase
#outcome_request_extensions, #outcome_response_extensions
Instance Attribute Details
#outcome_cdata_text ⇒ Object
Returns the value of attribute outcome_cdata_text.
141 142 143 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 141 def outcome_cdata_text @outcome_cdata_text end |
#outcome_needs_grading ⇒ Object
Returns the value of attribute outcome_needs_grading.
141 142 143 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 141 def outcome_needs_grading @outcome_needs_grading end |
#outcome_text ⇒ Object
Returns the value of attribute outcome_text.
141 142 143 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 141 def outcome_text @outcome_text end |
#outcome_url ⇒ Object
Returns the value of attribute outcome_url.
141 142 143 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 141 def outcome_url @outcome_url end |
Instance Method Details
#extention_process_xml(doc) ⇒ Object
164 165 166 167 168 169 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 164 def extention_process_xml(doc) super @outcome_text = doc.get_text('//resultRecord/result/resultData/text') @outcome_url = doc.get_text('//resultRecord/result/resultData/url') @outcome_needs_grading = doc.get_text('//resultRecord/result/resultData/needs_grading') end |
#has_result_data? ⇒ Boolean
160 161 162 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 160 def has_result_data? !!@outcome_text || !!@outcome_url || !!@outcome_needs_grading || super end |
#result_values(node) ⇒ Object
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 143 def result_values(node) super if @outcome_text || @outcome_url || @outcome_needs_grading || @outcome_cdata_text node.resultData do |res_data| if @outcome_cdata_text res_data.text { res_data.cdata! @outcome_cdata_text } elsif @outcome_text res_data.text @outcome_text end res_data.url @outcome_url if @outcome_url res_data.needs_grading @outcome_needs_grading if @outcome_needs_grading end end end |