fix double key in vericite sendrequest calls

In the calls to sendRequest in vericite.rb, the :ptype key was specified
twice. This fix removes the extra key and maintains the one
supported/defined by the code.

test plan:
 - Confirm that both text entry and document submissions can be sent to
   vericite

Change-Id: I88b387016224251f7925f2abc2b2fb6d31803688
Reviewed-on: https://gerrit.instructure.com/93748
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
This commit is contained in:
Keith Garner 2016-10-26 15:24:59 -05:00 committed by Keith T. Garner
parent 59cd31cebd
commit 2e0756de04
1 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ module VeriCite
paper_ext = ""
end
paper_size = 100 # File.size(
responses[a.asset_string] = sendRequest(:submit_paper, { :pid => paper_id, :ptl => paper_title, :pext => paper_ext, :ptype => paper_type, :psize => paper_size, :pdata => a.open(), :ptype => '2' }.merge!(opts))
responses[a.asset_string] = sendRequest(:submit_paper, { :pid => paper_id, :ptl => paper_title, :pext => paper_ext, :ptype => paper_type, :psize => paper_size, :pdata => a.open() }.merge!(opts))
end
end
elsif submission.submission_type == 'online_text_entry' && (asset_string.nil? || submission.asset_string == asset_string)
@ -147,7 +147,7 @@ module VeriCite
paper_type = "text/html"
paper_size = plain_text.bytesize
responses[submission.asset_string] = sendRequest(:submit_paper, {:pid => paper_id, :ptl => paper_title, :pext => paper_ext, :ptype => paper_type, :psize => paper_size, :pdata => plain_text, :ptype => "1" }.merge!(opts))
responses[submission.asset_string] = sendRequest(:submit_paper, {:pid => paper_id, :ptl => paper_title, :pext => paper_ext, :ptype => paper_type, :psize => paper_size, :pdata => plain_text }.merge!(opts))
else
raise "Unsupported submission type for VeriCite integration: #{submission.submission_type}"
end