LtiLibrary 1.6

So finally, huh!

LtiLibrary (my .NET library for LTI web applications) is now at version 1.6. The big change is the addition Outcomes 2.0 (Draft). Outcomes 2.0 has been in draft status since December 2014. I hope by including support in LtiLibrary, a few people will take up the charge to implement Outcomes 2.0 in production which will help move the spec into final status.

There are two packages on NuGet

You’ll want both if you want Outcomes 2.0. All the source code is on GitHub

Getting Started with Outcomes-2

There are two ApiControllers in LtiLibrary.AspNet that implement the LineItems and LISResult endpoints.

  • LtiLibrary.AspNet.Outcomes.v2.LineItemsControllerBase
  • LtiLibrary.AspNet.Outcomes.v2.ResultsControllerBase

You will need to create your own controllers in your application that inherit from these to handle the actual data. For example,


There are two sample applications in LtiSamples that implement Outcomes-2. SimpleLti is a single page app that hosts both the Tool Consumer and Tool Provider. ConsumerCertification is a simple Tool Consumer that makes all the necessary launch requests to a Tool Provider (yours or someone else’s) to exercise the certification tests.

The biggest advantage I see in Outcomes-2 over Outcomes-1 is that Outcomes-2 supports a comment and a status with each result. In K12, publishers are starting to deliver content catalogs via Thin Common Cartridge where each LTI link points to a single activity such as a lesson or quiz. Let’s say those activities require manual grading. With Outcomes-2, the activity can send a “Completed” result (perhaps with a comment like “Submitted”) to tell the teacher the activity is ready for grading. When the teacher grades the submission, the activity could send a “Final” result (with “Good job!”).

Have fun!

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

8 Responses to LtiLibrary 1.6

  1. NVA says:

    Hello Andy,

    How can I use Post score function to post for all students in the class? For now I can post and update my own score.

    Thank you!

  2. Andy says:

    The IMS LTI Outcomes 1.0 spec does not support posting multiple outcomes at once. You will have to post them one at a time. The Tool Consumer will probably do some authorization checking to make sure you are allowed to post outcomes for multiple students. Please check with the Tool Consumer for details.

  3. Scott Carson says:

    How do I post result with version 2 from Web Forms?
    I understand using version 1
    LtiLibrary.Core.Outcomes.v1.OutcomesClient.PostScore(Request.Form[“lis_outcome_service_url”].ToString(), Request.Form[“oauth_consumer_key”].ToString(), clsLtiParams.SharedSecret, Request.Form[“lis_result_sourcedid”].ToString(), 0.40);

    but in version 2 how do i construct the LtiLibrary.Core.Outcomes.v2.LisResult result = new LtiLibrary.Core.Outcomes.v2.LisResult();
    Essentially how do i convert lis_result_sourcedid into the lisResult

  4. Peter says:

    Hi Andy,
    I’m struggling with the response to a outcome. Our provider (Moodle) claims that they received the following response (after succesfully replace the score):

    2017-11-30 09:53:14 [RESPONSE]:
    “imsx_descriptionField”:”Score for 6895fa5c-b636-477b-a2bf-90a51df5ee14 is now 0.744445″,

    And they expect something like this:

    HTTP/1.1 200 OK
    Date: Tue, 05 Dec 2017 14:40:24 GMT
    Server: Apache/2.4.29 (cPanel) OpenSSL/1.0.2m mod_bwlimited/1.4
    X-Powered-By: PHP/5.6.32
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Transfer-Encoding: chunked
    Content-Type: application/xml; charset=utf-8


    Score for 71fba0d51d3568dd79e76874605b9010:::S3294476:::29123:::dyJ86SiwwA9 is now 1

    I cannot figure out what i’m doing wrong. I use vs2015, and have included your
    LtiLibrary 1.4.5
    LtiLibrary.AspNet 1.6.2
    LtiLibrary.Core 1.6.2

    Can you point me in a direction to solve this? Thanks in advanced,


    • Peter says:

      Hmm… I see that the XML is removed in the expected response…

    • Andy says:

      It looks like the OutcomesController (OutcomesControllerBase) is returning json instead of XML. You should not need all 3 libraries, either LtiLibrary 1.4.5 or both LtiLibrary.AspNet and LtiLibrary.Core. I don’t know if that is the cause of the problem, but the first thing I would try is to remove the version of LtiLibrary you will not use and then try again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s