{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/8205","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/8205/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/8205/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/8205/events","html_url":"https://github.com/edx/edx-platform/pull/8205","id":81447510,"number":8205,"title":"[LTI Provider] Use the LTI Outcome Service to pass back scores","user":{"login":"mcgachey","id":3449356,"avatar_url":"https://avatars.githubusercontent.com/u/3449356?v=3","gravatar_id":"","url":"https://api.github.com/users/mcgachey","html_url":"https://github.com/mcgachey","followers_url":"https://api.github.com/users/mcgachey/followers","following_url":"https://api.github.com/users/mcgachey/following{/other_user}","gists_url":"https://api.github.com/users/mcgachey/gists{/gist_id}","starred_url":"https://api.github.com/users/mcgachey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcgachey/subscriptions","organizations_url":"https://api.github.com/users/mcgachey/orgs","repos_url":"https://api.github.com/users/mcgachey/repos","events_url":"https://api.github.com/users/mcgachey/events{/privacy}","received_events_url":"https://api.github.com/users/mcgachey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/edx/edx-platform/labels/community%20manager%20review","name":"community manager review","color":"207de5"},{"url":"https://api.github.com/repos/edx/edx-platform/labels/open-source-contribution","name":"open-source-contribution","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-27T13:31:13Z","updated_at":"2015-05-28T14:51:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/8205","html_url":"https://github.com/edx/edx-platform/pull/8205","diff_url":"https://github.com/edx/edx-platform/pull/8205.diff","patch_url":"https://github.com/edx/edx-platform/pull/8205.patch"},"body":"This change allows the LTI provider to pass grades back to the campus LMS platform using the LTI outcome service. For full details of the outcome service, see:\r\n    http://www.imsglobal.org/LTI/v1p1/ltiIMGv1p1.html\r\n\r\nIn brief, the LTI 1.1 spec defines an outcome service that can be offered by an LTI consumer. The consumer determines whether a score should be returned (in Canvas, this means that the LTI tool is used in an assignment, and the launch was performed by a student). If so, it sends two additional parameters along with the LTI launch:\r\n - lis_outcome_service_url: the endpoint for the outcome service on the consumer;\r\n - lis_result_sourcedid: a unique identifier for the row in the gradebook (i.e. the tool/student/assignment combination).\r\n\r\nThe LTI Provider launch view detects the presence of these optional fields, and creates database records for the specific Outcome Service and for the graded LTI launch. Later, when a score on edX changes (identified using the signal mechanism from previous LTI Provider pull requests), a Celery task is launched to pass the score back to the LTI consumer.\r\n\r\nApologies for the longer-than-usual pull request - much of it is migrations and test code, and the diff is cluttered by the changes from https://github.com/edx/edx-platform/pull/8117. Once that change has been merged I'll rebase. Could reviewers pay particular attention to the Celery usage in models.py and tasks.py? I followed what looks like the recommended usage for Celery, but it's not a pattern that I see elsewhere in the LMS code."},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/106371714","html_url":"https://github.com/edx/edx-platform/pull/8205#issuecomment-106371714","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/8205","id":106371714,"user":{"login":"sarina","id":1985317,"avatar_url":"https://avatars.githubusercontent.com/u/1985317?v=3","gravatar_id":"","url":"https://api.github.com/users/sarina","html_url":"https://github.com/sarina","followers_url":"https://api.github.com/users/sarina/followers","following_url":"https://api.github.com/users/sarina/following{/other_user}","gists_url":"https://api.github.com/users/sarina/gists{/gist_id}","starred_url":"https://api.github.com/users/sarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarina/subscriptions","organizations_url":"https://api.github.com/users/sarina/orgs","repos_url":"https://api.github.com/users/sarina/repos","events_url":"https://api.github.com/users/sarina/events{/privacy}","received_events_url":"https://api.github.com/users/sarina/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T14:51:09Z","updated_at":"2015-05-28T14:51:09Z","body":"@mcgachey I don't know a ton about Celery, but have you checked out lms/djangoapps/instructor_task/tasks.py (and associated test and helper files in that directory)? That's our primary usage of Celery within the LMS."}}