Module: IMS::LTI::Extensions::OutcomeData::OutcomeRequest
- Includes:
- ExtensionBase, Base
- Defined in:
- lib/ims/lti/extensions/outcome_data.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#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.
-
#status_of_result ⇒ Object
Returns the value of attribute status_of_result.
Instance Method Summary collapse
Methods included from Base
Methods included from ExtensionBase
#outcome_request_extensions, #outcome_response_extensions
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def date @date end |
#outcome_cdata_text ⇒ Object
Returns the value of attribute outcome_cdata_text.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def outcome_cdata_text @outcome_cdata_text end |
#outcome_needs_grading ⇒ Object
Returns the value of attribute outcome_needs_grading.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def outcome_needs_grading @outcome_needs_grading end |
#outcome_text ⇒ Object
Returns the value of attribute outcome_text.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def outcome_text @outcome_text end |
#outcome_url ⇒ Object
Returns the value of attribute outcome_url.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def outcome_url @outcome_url end |
#status_of_result ⇒ Object
Returns the value of attribute status_of_result.
162 163 164 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 162 def status_of_result @status_of_result end |
Instance Method Details
#extention_process_xml(doc) ⇒ Object
187 188 189 190 191 192 193 194 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 187 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') @outcome_date = doc.get_text('//resultRecord/result/resultData/date') @outcome_status_of_result = doc.get_text('//resultRecord/result/resultData/status_of_result') end |
#has_result_data? ⇒ Boolean
183 184 185 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 183 def has_result_data? !!@outcome_text || !!@outcome_url || !!@outcome_needs_grading || @outcome_status_of_result || @outcome_date || super end |
#result_values(node) ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/ims/lti/extensions/outcome_data.rb', line 164 def result_values(node) super if @outcome_text || @outcome_url || @outcome_needs_grading || @outcome_cdata_text || @outcome_status_of_result || @outcome_date 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 res_data.status_of_result @outcome_status_of_result if @outcome_status_of_result res_data.date @outcome_date if @outcome_date end end end |