{"action":"closed","number":9023,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/9023","id":40691984,"html_url":"https://github.com/edx/edx-platform/pull/9023","diff_url":"https://github.com/edx/edx-platform/pull/9023.diff","patch_url":"https://github.com/edx/edx-platform/pull/9023.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/9023","number":9023,"state":"closed","locked":false,"title":"[LTI Provider] Grade passback for non-leaf blocks.","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},"body":"This change allows graded assignments to be added to a campus LMS\r\nregardless of the granularity at which the problem sits. Previously\r\na grade could only be returned if the usage ID for the problem itself\r\nwas specified in the LTI launch.\r\n\r\nThe code assumes that courses taking advantage of this functionality\r\nare arranged in a hiearchy (with sections being parents to verticals,\r\nand verticals being parents to problems). When a grading event occurs\r\nit traverses the parent hiearchy to identify any previous graded LTI\r\nlaunches for which the new scoring event should generate a grade\r\nupdate. It then calculates and sends scores to each of those outcome\r\nservices.\r\n\r\nSince grade calculation is an expensive operation, the code optimizes\r\nthe case where a problem has been added only once as a leaf unit. In\r\nthat case it is able to behave as before, just taking the grade from\r\nthe signal without having to calculate grades for the whole course.\r\n\r\nThis PR is an updated version of https://github.com/edx/edx-platform/pull/8974. The major changes are:\r\n- The logic to calculate scores for each module location has been moved to grades.py\r\n- The GradedAssignment model has a version number to ensure that only the most recent of multiple score updates are sent to the campus LMS\r\n- The score update handler creates a new Celery task per-GradedAssignment, rather than batching them together. This simplifies the code a lot, at the expense of a little speed on the rare corner case when a single problem is embedded in a campus course twice.\r\n- A configurable delay is added before sending a composite score to the campus system. This both avoids a race when the view has not yet committed its transaction when the scoring task attempts to read an updated score, and reduces the number of messages sent if a student completes multiple problems from a single vertical in quick succession.","created_at":"2015-07-23T16:36:42Z","updated_at":"2015-09-02T11:34:10Z","closed_at":"2015-09-02T11:34:10Z","merged_at":"2015-09-02T11:34:10Z","merge_commit_sha":"79f2faf35ae945bc9c8b42b523b5afa3b022c290","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/9023/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/9023/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/9023/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/9e6c44911d8d30bdf26a55f855b697821e8758b9","head":{"label":"mcgachey:lti-collated-grades","ref":"lti-collated-grades","sha":"9e6c44911d8d30bdf26a55f855b697821e8758b9","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},"repo":{"id":29143614,"name":"edx-platform","full_name":"mcgachey/edx-platform","owner":{"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},"private":false,"html_url":"https://github.com/mcgachey/edx-platform","description":"Open edX, the edX platform that powers http://edx.org","fork":true,"url":"https://api.github.com/repos/mcgachey/edx-platform","forks_url":"https://api.github.com/repos/mcgachey/edx-platform/forks","keys_url":"https://api.github.com/repos/mcgachey/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcgachey/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcgachey/edx-platform/teams","hooks_url":"https://api.github.com/repos/mcgachey/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/mcgachey/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mcgachey/edx-platform/events","assignees_url":"https://api.github.com/repos/mcgachey/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mcgachey/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mcgachey/edx-platform/tags","blobs_url":"https://api.github.com/repos/mcgachey/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcgachey/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcgachey/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcgachey/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcgachey/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mcgachey/edx-platform/languages","stargazers_url":"https://api.github.com/repos/mcgachey/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/mcgachey/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/mcgachey/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/mcgachey/edx-platform/subscription","commits_url":"https://api.github.com/repos/mcgachey/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcgachey/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcgachey/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcgachey/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcgachey/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mcgachey/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcgachey/edx-platform/merges","archive_url":"https://api.github.com/repos/mcgachey/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcgachey/edx-platform/downloads","issues_url":"https://api.github.com/repos/mcgachey/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mcgachey/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mcgachey/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mcgachey/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcgachey/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/mcgachey/edx-platform/releases{/id}","created_at":"2015-01-12T16:05:23Z","updated_at":"2015-08-21T01:15:54Z","pushed_at":"2015-08-27T19:55:04Z","git_url":"git://github.com/mcgachey/edx-platform.git","ssh_url":"git@github.com:mcgachey/edx-platform.git","clone_url":"https://github.com/mcgachey/edx-platform.git","svn_url":"https://github.com/mcgachey/edx-platform","homepage":"http://openedx.org/","size":535873,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"ba1b84210df0829e9e9cd5622e1f5c4a509b79af","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-09-02T07:59:10Z","pushed_at":"2015-09-02T11:34:10Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":2105568,"stargazers_count":2105,"watchers_count":2105,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1245,"mirror_url":null,"open_issues_count":161,"forks":1245,"open_issues":161,"watchers":2105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9023"},"html":{"href":"https://github.com/edx/edx-platform/pull/9023"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9023"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/9023/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9023/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/9023/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/9e6c44911d8d30bdf26a55f855b697821e8758b9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ormsbee","id":41625,"avatar_url":"https://avatars.githubusercontent.com/u/41625?v=3","gravatar_id":"","url":"https://api.github.com/users/ormsbee","html_url":"https://github.com/ormsbee","followers_url":"https://api.github.com/users/ormsbee/followers","following_url":"https://api.github.com/users/ormsbee/following{/other_user}","gists_url":"https://api.github.com/users/ormsbee/gists{/gist_id}","starred_url":"https://api.github.com/users/ormsbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ormsbee/subscriptions","organizations_url":"https://api.github.com/users/ormsbee/orgs","repos_url":"https://api.github.com/users/ormsbee/repos","events_url":"https://api.github.com/users/ormsbee/events{/privacy}","received_events_url":"https://api.github.com/users/ormsbee/received_events","type":"User","site_admin":false},"comments":18,"review_comments":32,"commits":1,"additions":743,"deletions":152,"changed_files":11}}