How can we help?

Home > Integrations > Learning Tools Interoperability (LTI) > LTI Administrator Guide > Advanced LTI Resources > Submission Option: Using LTI Extensions

Submission Option: Using LTI Extensions

Retrieving Submissions from Turnitin LTI

 

You can retrieve a submission that has been submitted via Turnitin LTI by using our ext_outcomes_tool_placement_url LTI extension. This extension parameter along with the LTI lis_result_sourcedid parameter(Used to map submission to callback URL’s) can be used in conjunction with one another to return a JSON object containing endpoints that can be used to pull down the submission from Turnitin for storage in your LMS.

 

To use this feature, every LTI request from a user making a submission must include both of these parameters, generally it’s easier to always include them on every request:

  • lis_result_sourcedid - This is a standard LTI parameter, it’s a unique ID for the submission

  • ext_outcomes_tool_placement_url - This is our extension, not specified in the LTI specification, it requires a URL value so we can pass back a JSON object containing data related to the submission

Upon submitting a file as a student, as long as the above parameters are passed into the request, we will map the submission created to the unique ID provided in the lis_result_sourcedid to the URL provided in the ext_outcomes_tool_placement_url, once the submission has been successfully created, we will then send a JSON object for that submission to the URL provided in that parameter, which can be used to programmatically pull down the submission.

Example LTI request with lis_result_sourcedid and ext_outcomes_tool_placement_url:

 

POST /api/lti/1p0/assignment HTTP/1.1

Host: ip-cpod3-vm1.oak.iparadigms.com:5030

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

Content-Type: application/x-www-form-urlencoded

 

context_id=8213060-006f-27b2066ac545&context_label=SI182&context_title=Design+of+Personal+Environments&context_type=CourseSection&ext_outcomes_tool_placement_url=http%3A%2F%2Fexample.com%2Foutcomes_tool_placement&launch_presentation_locale=en-US&lis_outcome_service_url=http%3A%2F%2Fexample.com%2Fgrade-pass-back&lis_person_contact_email_primary=user.email.1%40turnitin.com&lis_person_name_family=User&lis_person_name_full=Test+User&lis_person_name_given=Test&lis_result_sourcedid=Unique123&lti_message_type=basic-lti-launch-request&lti_version=LTI-1p0&oauth_consumer_key=61115&oauth_nonce=Cn5muNlT1VK&oauth_signature=%2F0mzncgRO5lw0yCTvUrXBVLFeBM%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1445265343&oauth_version=1.0&resource_link_description=hello&resource_link_id=88391-e1919-bb3456-jjiuiu3&resource_link_title=My+Weekly+Wiki&roles=Instructor&user_id=user_id_1
 

The JSON object will look something like this:

{

   lis_result_sourcedid: 12345,

   paperid: 4321,

   outcomes_tool_placement_url: "http://turnitin.com/api/lti/1p0/outcome_tool_data/4321"

}

You can then request the URL in the outcomes_tool_placement_url field, with a standard POST request using the same oAuth details you did in the LTI request. Like so:

POST /api/lti/1p0/outcome_tool_data/4321 HTTP/1.1

Host: turnitin.com

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8

 

oauth_consumer_key=69552&oauth_nonce=t4Xmm5bUlcW&oauth_signature=Vfn9%2Ft1dMNz68qLE2REkiat5Vi8%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1445264212&oauth_version=1.0

This will return a JSON body in its response like below:

{

   "outcome_pdffile": {

       "roles": [

           "Learner",

           "Instructor"

       ],

       "launch_url": "http://dev5.oak.iparadigms.com:7920/api/lti/1p0/download/pdf/49357867?lang=en_us",

       "text": null,

       "label": "Download File in PDF Format"

   },

   "outcome_originalfile": {

       "roles": [

           "Learner",

           "Instructor"

       ],

       "launch_url": "http://dev5.oak.iparadigms.com:7920/api/lti/1p0/download/orig/49357867?lang=en_us",

       "text": null,

       "label": "Download File in Original Format"

   },

...

  }

You can use the data in outcome_originalfile and outcome_pdffile to retrieve either the original file or the PDF version from Turnitin. Using this you can store the physical submission on your LMS instead of just being stored on Turnitin’s side.


The only downside with the launch_url’s above is that you need to treat them like a standard LTI request (e.g. passing launching that endpoint as a valid instructor, just like you do when launching assignments).

Last modified

Tags

This page has no custom tags.

Classifications

(not set)