lib/ims/lti/outcome_request.rb
# Parse Outcome Request data from XML
Parse Outcome Request data from XML
Parse Outcome Request data from XML
def process_xml(xml)
      doc = REXML::Document.new xml
      @message_identifier = doc.text("//imsx_POXRequestHeaderInfo/imsx_messageIdentifier")
      @lis_result_sourcedid = doc.text("//resultRecord/sourcedGUID/sourcedId")
      if REXML::XPath.first(doc, "//deleteResultRequest")
        @operation = DELETE_REQUEST
      elsif REXML::XPath.first(doc, "//readResultRequest")
        @operation = READ_REQUEST
      elsif REXML::XPath.first(doc, "//replaceResultRequest")
        @operation = REPLACE_REQUEST
        @score = doc.get_text("//resultRecord/result/resultScore/textString")
      end
      extention_process_xml(doc)
    end
def process_xml ( xml ) doc = REXML :: Document . new xml @message_identifier = doc . text ( "//imsx_POXRequestHeaderInfo/imsx_messageIdentifier" ) @lis_result_sourcedid = doc . text ( "//resultRecord/sourcedGUID/sourcedId" ) if REXML :: XPath . first ( doc , "//deleteResultRequest" ) @operation = DELETE_REQUEST elsif REXML :: XPath . first ( doc , "//readResultRequest" ) @operation = READ_REQUEST elsif REXML :: XPath . first ( doc , "//replaceResultRequest" ) @operation = REPLACE_REQUEST @score = doc . get_text ( "//resultRecord/result/resultScore/textString" ) end extention_process_xml ( doc ) end
Parse Outcome Request data from XML
Parse Outcome Request data from XML
xml
<not_specific>