From UBC Wiki
Jump to: navigation, search

Example Control Flow

LTI Launch Request

A LTI Launch Request is basically LTI's version of a handshake between two applications. The tool that is issuing an LTI Launch Request is called the Tool Consumer while the tool that receives the LTI Launch Request is called the Tool Producer. The Tool Consumer is usually the LMS, in our case, Blackboard Learn. The Tool Producer in this case is Webwork. The Tool Consumer puts information about its user and itself into the launch request. The user information is meant to allow single sign on authentication. The Tool Consumer information is mainly for advertising which LTI features is enabled/supported. The Tool Producer uses that information to pull data from the Tool Consumer.

The launch request is submitted as a HTTP POST request to the launch url of the targetted tool, which for Webwork is just the application url. The following is a list of parameters sent by the Blackboard LTI Building Block for a Webwork launch. These parameters are sent in the POST body as an urlencoded string (exactly like an html form submit).

Core Standard

OAuth Message Signing Parameters

Note that these parameters may either be in the POST body or in the Authorization section of the HTTP header. You can usually trick an OAuth library to do the signature verification for you, but there is a concise guide to the OAuth HMAC calculation process if you need to roll a custom verifier.

oauth_consumer_key => 'lti_secret'
oauth_signature => 'pB0aq142aVslYuTEHH56472a3Aw='
oauth_callback => 'about:blank' # always about:blank since lti doesn't use it
oauth_version => '1.0'
oauth_signature_method => 'HMAC-SHA1' # all lti implementation must support hmac-sha1
oauth_timestamp => '1367278573'
oauth_nonce => '352281230342435'

Required Parameters

lti_version => 'LTI-1p0'
lti_message_type => 'basic-lti-launch-request'
resource_link_id => 'CL.UBC.MATH.101.201.2012W2.13204' # the course ID
lis_person_sourcedid => 'john' # will be the PUID on Connect, though is configurable using the LTI Building Block

Outcomes Service parameters

Used to push grades. Note that this is only avavailable with LTI 1.1 support. We're still using the extension support as it's more fully featured.

lis_outcome_service_url => ''

Optional informational parameters

Information about the application that the user is coming from.

tool_consumer_instance_url => ''
tool_consumer_info_product_family_code => 'learn'
tool_consumer_instance_name => 'UBC'
tool_consumer_instance_description => 'University of British Columbia'
tool_consumer_instance_guid => 'lti_secret'
tool_consumer_info_version => '9.1.110082'

Context information, usually course information.

context_id => 'CL.UBC.MATH.101.201.2012W2.13204'
context_type => 'CourseSection'
context_title => '2012W2-MATH101-201- Integral Calculus with Applications to Physical Sciences and Engineering-Instructors'
context_label => 'CL.UBC.MATH.101.201.2012W2.13204'

Personal information on who is making the launch request

user_id => ''
roles => 'Instructor'
lis_person_contact_email_primary => ''
lis_person_name_family => 'Hsu,ø'
lis_person_name_given => 'John'
lis_person_name_full => 'John Hsu,ø'

Course which is making this request

lis_course_offering_sourcedid => 'CL.UBC.MATH.101.201.2012W2.13204'
lis_course_section_sourcedid => 'CL.UBC.MATH.101.201.2012W2.13204'
launch_presentation_return_url => ''
launch_presentation_document_target => 'frame'
launch_presentation_locale => 'en_GB'
resource_link_title => 'webworkdev'

Unofficial Extensions

Even though these extensions are technically not part of the LTI specs, they're so widely implemented that it's gained de facto recognition, as they're documented on the official site:

Memberships Extension Service parameters

Used to pull class rosters from Connect.

ext_ims_lis_memberships_id => ':_101_1::webworkdev:1367278573'
ext_ims_lis_memberships_url => ''

Outcomes Extension Service parameters

Used to push grades to Connect. A significant limitation is that officially, it's designed to push only 1 grade at a time and the student must initiate the push. A custom workaround was devised so that it's more like membership requests, which allows batch syncing and can push grades at any time.

ext_ims_lis_resultvalue_sourcedids => 'decimal,percentage,ratio,passfail,letteraf,letterafplus,freetext'
ext_ims_lis_basic_outcome_url => ''


ext_lms => 'learn-9.1.110082'

Custom Parameters

It's a flag for Webwork to perform grade syncing operations.

custom_gradesync => '1'

LTI Membership Extension Request

Like the launch request, a membership request is a HTTP POST request and also requires the OAuth parameters. Besides the OAuth parameters, this request requires 3 other parameters. The HTTP POST request is submitted to the ext_ims_lis_memberships_url parameter given in the launch request. In this example, the url is This extension is documented here.

This is the id used to identify the course and is given by the ext_ims_lis_memberships_id parameter given in the launch request.


This parameter is required to indicate a membership request.


This parameter is required to indicate an LTI request.


If successful, you will receive an XML formatted list of users in the course.

    <description>Roster retrieved</description>
      <person_name_full>John Hsu,ø</person_name_full>
      <person_name_full>shirt0004 red0004</person_name_full>
      <person_name_full>shirt0001 red0001</person_name_full>
      <person_name_full>shirt0002 red0002</person_name_full>
      <person_name_full>shirt0003 red0003</person_name_full>

If unsuccessful, you should get an XML formatted error message.

     <codeminor>Invalid signature/codeminor>

LTI Outcomes Extension Request

Like all other LTI requests, this is a HTTP POST request that requires all the OAuth parameters. Besides the OAuth parameters, this request has 5 other parameters. Note that the example shown here has been slightly modified to allow automatic course sync and might only work with the Webwork Building Block we modified for this purpose. The original intended use for this extension was that each and every student has to press a button in order to send their own individual grade back to the LMS. This extension is documented here.

Required to flag this as an Outcomes request.


Required to flag this as a LTI request.


This is the score value.


This determines how it'll handle the score value. The available options are listed as a comma separated list in the launch request parameter ext_ims_lis_resultvalue_sourcedids.


The sourced ID has 5 components: :context id:hash:tool consumer name:student number:assignment name

The components are actually assembled from the lis_result_sourcedid returned with each student in the Membership request. You just append the assignment name to it. This is where our implementation differs from the stock implementation, in stock, you would need to create the grading column in Blackboard for each and every assignment that needs to be synced first, whereas our implementation will create a grading column in Blackboard if it needs to.


If successful, you'll get a XML formatted response saying that the value was set:

    <description>Grade updated</description>

If unsuccessful, you should get a XML error message similar to Membership request's error message.

Installation in Webwork

Additional Package Needed

  • perl-Text-CSV.noarch
  • perl-Net-OAuth.noarch
  • perl-XML-Simple.noarch


  • Additional files:
  • Modified files: