IllumiDesk / illumidesk

IllumiDesk enhances your LMS with Jupyter Notebooks + Auto-Grading.
https://docs.illumidesk.com
Other
43 stars 13 forks source link

Update assignment and user registration flow with LTI 1.3 #253

Closed jgwerner closed 4 years ago

jgwerner commented 4 years ago

Overview

Automate assignment creation with LTI 1.3.

Requirements

Assumptions

'https://purl.imsglobal.org/spec/lti/claim/custom': {'lms_user_id': 4},

This custom claim is part of the standard configuration published by the LTI 1.3 handler.

jgwerner commented 4 years ago

@netoisc based on our discussion via chat, the requirements changed to the following:

When building the data object to send to the platform, then the model and the database table/column location for those data points would look like:

{
  "id" : "https://lms.example.com/context/2923/lineitems/1",  ---> line_item_id
  "scoreMaximum" : 60,
  "label" : "Chapter 5 Test",
  "resourceId" : "a-9334df-33",  ---> resource_id
  "tag" : "grade",
  "resourceLinkId" : "1g3k4dlk49fk"
  "startDateTime": "2018-03-06T20:05:02Z"
  "endDateTime": "2018-04-06T22:05:03Z"
}

Let me know if this looks ok to you.

netoisc commented 4 years ago

R. I think this new column should not be the primary key because this change will cause more changes in all nbgrader functionality. This column will only be used to identify the assignment (when user click the row in assignment list)

The object that is used to send grades is not like you suggest but it should be as next link indicates: https://www.imsglobal.org/spec/lti-ags/v2p0#service-endpoint

so the ResourceId is not used in body data and the url is something like /api/lti/courses/:course_id/line_items/:line_item_id + /scores

jgwerner commented 4 years ago
  • Add resource_link_id as an additional column to the grader database to track module/assignment identifiers. Use the resource_link_id as the primary key for all grader assignments.

R. I think this new column should not be the primary key because this change will cause more changes in all nbgrader functionality. This column will only be used to identify the assignment (when user click the row in assignment list)

I agree.

The object that is used to send grades is not like you suggest but it should be as next link indicates: https://www.imsglobal.org/spec/lti-ags/v2p0#service-endpoint

so the ResourceId is not used in body data and the url is something like /api/lti/courses/:course_id/line_items/:line_item_id + /scores

Resource Link Requests vs Assignment and Grades Requests

The primary source of confusion (at least for me) is that there are two different requests: one that uses the LTI Core specification and one that uses the Assignment and Grade Services specification.

As described in section 3.2, LTI Core does use an opaque value for the https://purl.imsglobal.org/spec/lti/claim/resource_link['id']. One https://purl.imsglobal.org/spec/lti/claim/context['id'] (equivalent to Course in most cases) may have one or many resource link id's. For example:

  "https://purl.imsglobal.org/spec/lti/claim/context": {
      "id": "c1d887f0-a1a3-4bca-ae25-c375edcc131a",
      "label": "ECON 1010",
      "title": "Economics as a Social Science",
      "type": ["http://purl.imsglobal.org/vocab/lis/v2/course#CourseOffering"]
  },
  "https://purl.imsglobal.org/spec/lti/claim/resource_link": {
      "id": "200d101f-2c14-434a-a0f3-57c2a42369fd",
      "description": "Assignment to introduce who you are",
      "title": "Introduction Assignment"
  },

This is also known as Basic Outcomes. Here

For those systems that do not offer the Assignment and Grades Services option (part of LTI 1.3 Advantage), then the LIS claim(s) may be used to provide basic Outcome Services, such as to third party SIS solutions. This provides a somewhat consistent mapping between legacy LTI 1.1 parameters and the LTI 1.3 claims to maintain backward compatibility. For example:

  "https://purl.imsglobal.org/spec/lti/claim/lis": {
      "person_sourcedid": "example.edu:71ee7e42-f6d2-414a-80db-b69ac2defd4",
      "course_offering_sourcedid": "example.edu:SI182-F16",
      "course_section_sourcedid": "example.edu:SI182-001-F16"
  },

The Assignment and Grades Services option enriches the claims, however, and is provided by most platforms (LMS's) that adhere to LTI 1.3. The requests are sent to the tool with the Assignment and Grades Services specification from sections of the platform that would logically be associated to grades and assignments. In Canvas's case, for example, any launch from an assignment link is sent with the grades and services specification, for example:

[  {
        "id": "https://lms.example.com/context/2923/lineitems/1",
        "scoreMaximum": 60,
        "label": "Chapter 5 Test",
        "resourceId": "a-9334df-33",
        "tag": "grade",
        "resourceLinkId": "1g3k4dlk49fk"
        "endDateTime": "2018-04-06T22:05:03Z"
    },
    {...},]

Here we can see that the line item (a URL) has an id that is not opaque in nature, but rather a URL that contains an identifier to the context and another identifier to the resource (lineitem is synonymous with resource).

Finally, the migration table does provide some additional information on how to map legacy 1.1 and 1.3 fields. For the sake of clarity I've copied/pasted the table from this link:

Basic outcome Assignment and Grade Service
lis_outcome_service_url, lis_result_sourcedid LineItem.url, user_id
ReplaceResult POST score with scoreGiven=normalizedScore, scoreMaximum=1 and gradingProgress: FullyGraded to {LineItem.url}/scores
DeleteResult POST score with no score, gradingProgress: NotReady, activityProgress: Initialized to {LineItem.url}/scores
ReadResult GET from {LineItem.url}/results?user_id={user_id}, returns an array of at most 1 result