fixes INTEROP-6426
flag=none
Test plan
- Set up the TurnItIn 1.1 LTI tool on an assignment
- Upload a document to their tool as a student
- Send a request to get the TurnItIn submission
download process started (see below)
- Try to get DocViewer annotations working
and add some
- Resend the request to get the TurnItIn submission
- Ensure you don't lose the annotations
EX: In IRB fill out the following:
require 'json'
require 'oauth'
oauth_key = (from your tool consumer key)
oauth_secret = (from your tool shared secret)
paperid = (after you've uploaded a document via
the LTI tool, click on it and use the o parameter
from the URL)
outcomes_tool_placement_url = (https://sandbox.turnitin.com/
api/lti/1p0/outcome_tool_data/#{paperid}?lang=en_us)
sourcedid = (from the LTI launch the value in
lis_result_sourcedid)
tool_id = string tool id from the tool
post_url = (from the LTI launch the value in
ext_outcomes_tool_placement_url)
json = {"outcomes_tool_placement_url"=>outcomes_tool_placement_url,
"paperid"=>paperid,
"lis_result_sourcedid"=>sourcedid,
"tool_id"=>tool_id}.to_json
consumer = OAuth::Consumer.new(oauth_key, oauth_secret)
token = OAuth::AccessToken.new(consumer)
response = token.post(post_url, json, 'Content-Type' => 'application/json')
This starts a delayed job that checks with TurnItIn for the score.
If done right, it should not take long.
Change-Id: I80ac8bd666a25b8b52ace46befe66daaad32b2c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Wagner Goncalves <wagner.goncalves@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
fixes INTEROP-6185
flag=none
Test plan
- Set up the TurnItIn 1.1 LTI tool on an assignment
with limited attempts (there's a feature option
you have to turn on) so you can see the attempts
for the user
- Upload a document to their tool as a student
- Send a request to get the TurnItIn submission
download process started (see below)
- As a student, check your submission page and
see what attempt # it shows you
EX: In IRB fill out the following:
require 'json'
require 'oauth'
oauth_key = (from your tool consumer key)
oauth_secret = (from your tool shared secret)
paperid = (after you've uploaded a document via
the LTI tool, click on it and use the o parameter
from the URL)
outcomes_tool_placement_url = (https://sandbox.turnitin.com/
api/lti/1p0/outcome_tool_data/#{paperid}?lang=en_us)
sourcedid = (from the LTI launch the value in
lis_result_sourcedid)
tool_id = string tool id from the tool
post_url = (from the LTI launch the value in
ext_outcomes_tool_placement_url)
json = {"outcomes_tool_placement_url"=>outcomes_tool_placement_url,
"paperid"=>paperid,
"lis_result_sourcedid"=>sourcedid,
"tool_id"=>tool_id}.to_json
consumer = OAuth::Consumer.new(oauth_key, oauth_secret)
token = OAuth::AccessToken.new(consumer)
response = token.post(post_url, json, 'Content-Type' => 'application/json')
This starts a delayed job that checks with TurnItIn for the score.
If done right, it should not take long.
Change-Id: I6fd939eae77aaf654f271c947016c3d47176fbb1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260294
Reviewed-by: Wagner Goncalves <wagner.goncalves@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes FOO-1230
flag=none
TEST PLAN:
1) new up a processor
2) access it's client (set the ivar for
tii)
3) call "#resubmit" with a submission and asset
string
4) serialized object should not have the TII client
inside it.
Change-Id: I99257986f730838b6bda2254fec11edad935ea61
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253573
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Change-Id: I7f40ed058b50882121da69f0cb05966854b8e920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250924
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
These errors are not meaningful to us in sentry and they produce a large
amount of errors. This will stop sending them to sentry, but will still
create an error report.
test plan TII
- TII submissions should still work
- on Failure
- should not generate an error report
- should not generate a sentry error
- should send a stat to statsd
- should retry
test plan grade passback
- LTI tool with errors in grade passback
- should not send to sentry
- *should* still create an error report
fixes PLAT-5668
fixes PLAT-3155
flag=none
Change-Id: Iff28e6538798d2bfe80d91721559934d0d3e4329
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/232949
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fixes PLAT-2954
Test plan:
* Create a TII assignment
* Make a submission
* Ensure that a bunch of delayed job errors are not triggered (they look
like these https://sentry.insops.net/instructure/canvas/issues/317736/)
* Ensure that you still get an originality report back and that
everything works as it did.
Change-Id: I27efdfabc45c58db2afc9cbcafbaebede4fd5c14
Reviewed-on: https://gerrit.instructure.com/138532
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
Fixes: PLAT-2623
If a student submits to the Turnitin LTI via Google Drive and the filename
in Google Drive contains a forward slash, the submission will not be
returned to Canvas.
This changes the behavior so that we replace the filename with a dash
before we try to do anything else with it.
Test Plan:
- Install the TII LTI in your account
- Create a course with a TII LTI assignment
- Create a google doc with a forward-slash
- As a teacher, launch the TII assignment to configure it
- As a student, launch the TII Assignment
- Click on "Upload submisson" --> Additional Options --> google drive
- Authenticate with google drive and choose the google doc your previously
create
- After some time, the submission should be returned to canvas with a dash
in place of the forward slash
Change-Id: I56ea8be56d0d7a2671cd42dd8e976cec832016b6
Reviewed-on: https://gerrit.instructure.com/114470
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Closes PLAT-2404, PLAT-1910
Test Plan:
- Create an assignment associated with a similarity
detection tool.
- Verify that a subscription with the
'submission_created' and 'plagiarism_resubmit'
event types is created in Dynamo.
- Create an assignment of type online upload
- As a student submit a document for the assignment
submission.
- Create an originality report for the submission with
the workflow state set to 'error'
- Navigate to the submission in speed grader and
click the resubmit to TII button.
- Verify canvas emits a 'plagiarism_resubmit'
event
- Verify you can create/manage subscriptions of this new
type via the subscriptions api (See https://docs.google.com/
document/d/12x6Peif-I-0zvl2uMv2JVbQdZumGGqMtspWKYTqlL9o/edit)
Change-Id: Ia9eff1c61bf0b5662e0b6bc1d088026afd03e8af
Reviewed-on: https://gerrit.instructure.com/106187
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
fixes PLAT-2332
test plan:
- submit a file through the TII lti tool
- once you get a score back, pull up the Attachment model in a
rails console and change the uploaded_data using a StringIO object
- remove the content_id from the assignment.external_tool_tag object on
the rails console
- hit
api/v1/support_helpers/turnitin/refresh_lti_attachment?attachment_id=:attacment_id&submission_id=:submission_id
-once the fixer completes the attachment in canvas should be refreshed
with the correct data
Change-Id: I8747921b08a4edf40d9a873cfbcf31b72ac39ac7
Reviewed-on: https://gerrit.instructure.com/103740
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes PLAT-1844
Test plan:
* As a student make a turnitin submission
* Ensure that the submitted at time in Canvas matches the uploaded at
time in turnitin
Change-Id: I3d2ae76835608cb26bf7f0f32b0aa21743d71eb9
Reviewed-on: https://gerrit.instructure.com/93550
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
Fixes PLAT-1778
Test plan:
Use localtunnel/ngrok
Configure TII to not compute OScore until a future due date
Set MAX_ATTEMPTS in OutcomeResponseProcessor to 2
Submit an assignment and see that an
error message appears on the submission after 2 failed job attempts.
Change-Id: Ic77e017ebd0dcb186904d8f9379bba8c999b244b
Reviewed-on: https://gerrit.instructure.com/88788
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Fixes PLAT-1771
Test Plan:
Create a TII assignment, submit it as a student
see that the originality score is visible in canvas itself
Change-Id: Ifab2590ba2333d7a5b3a991cbf5ca7e0b96f026f
Reviewed-on: https://gerrit.instructure.com/88583
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Fixes PLAT-1548
Test Plan: Regression test Turn it in integration
Change-Id: I46e85439b37f8eba536c77dcf460fc57d20edc06
Reviewed-on: https://gerrit.instructure.com/86908
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
fixes PLAT-1626
test plan:
it should wait 5 minutes before trying to get the tii submission
Change-Id: I24dcb17262695cfbac3ad58ae5d1541e5a153b2b
Reviewed-on: https://gerrit.instructure.com/83781
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes PLAT-1397
test plan
the submission retrieval delayed job should wait 1 minute before it is run.
Change-Id: I7aa3a759f3cfda1187c6ba2d36c7fd08c7bd859e
Reviewed-on: https://gerrit.instructure.com/75525
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
When turn it timesout we will create a submission with
the error as the file contents
Fixes: PLAT-1323
Test Plan:
So I am not aware of a good way to manually test this
Cause you need turn it in to work while you using the tool, but
you need to to fail when the delayed job runs.
Change-Id: I4644c41fdc033d506837d64f66cdb9735eaa893d
Reviewed-on: https://gerrit.instructure.com/72472
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
if there is already a submission for grade passback
then keep the original submission_type
fixes PLAT-1313
test plan:
setup the turnitin lti tool and submit an assignmnet
wait until you get an originality score back
edit the db to change the status of the result to error
resubmit the assignment in speed grader
you should get the score again, and the status in the db should change
then go into turnitin as a teacher and submit a grade for the submission
check the database the submission_type should still be 'online_upload'
Change-Id: I2bc609bc5559e80f678cf00370f6a04af4d3b6aa
Reviewed-on: https://gerrit.instructure.com/71118
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes PLAT-1208
test-plan:
submit a turnitin assignment via lti
make sure it doesn't break
there isn't a good way to simulate an error so the focus should be on us not breaking anything
Change-Id: I4d1dc2ca15af2226e0151be2ce1837435fea1fa0
Reviewed-on: https://gerrit.instructure.com/62408
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
fixes PLAT-1207
test-plan:
submit a doc using the turnitin assignment
the UI should show it as pending in speedgrader until it is done.
Change-Id: I02f8736c4c5c63d82ddba3ff741e4efd4cf15205
Reviewed-on: https://gerrit.instructure.com/61771
Tested-by: Jenkins
Reviewed-by: Josh Orr <jgorr@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Fires off delayed job that hits the turnitin callback url,
creates a submission, and maps originality data into the turnitin_data
field.
Fixes PLAT-1167
Fixes PLAT-1169
Test Plan:
You'll need to have the TurnItIn LTI tool installed, and delayed_jobs
running
Create an assignment with the submission set to the External Tool for
turnitin.
As a student, submit the assignment.
wait for the delayed job to run. check out /jobs to see whats going on
After the job has ran you should see turnitin data, as you would
normally with the plugin
Change-Id: I5d60d250e91b422b5e77255d715abf2e4712f130
Reviewed-on: https://gerrit.instructure.com/59942
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Fixes Plat-1168
Test-plan:
Submit a turnitin assignment using the lti tool
it should create a submission with the submitted file as an attachment
Change-Id: I37b24f8d2cb5c78f1247a0096f1afe2f3528abcb
Reviewed-on: https://gerrit.instructure.com/59701
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>