{"action":"created","comment":{"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments/38117038","id":38117038,"diff_hunk":"@@ -43,8 +43,10 @@ def _get_keyword_for_course_instance_id(course_instance_id):\n         sites__site_type_id='isite'\n     ).values_list('sites__external_id')\n \n-    # Return the last keyword in the QuerySet\n-    return keywords.reverse()[0]\n+    # if the list keywords contains values return the first one\n+    # otherwise the method returns None\n+    if keywords:\n+        return keywords.reverse()[0]\n ","path":"lecture_video/views.py","position":34,"original_position":10,"commit_id":"a4dbcd0017d0839619b51e7ad4bc42ab7c07c7ee","original_commit_id":"2d942f04071757f4fc134f92c7a80bcfb039e42a","user":{"login":"eparker71","id":1084287,"avatar_url":"https://avatars.githubusercontent.com/u/1084287?v=3","gravatar_id":"","url":"https://api.github.com/users/eparker71","html_url":"https://github.com/eparker71","followers_url":"https://api.github.com/users/eparker71/followers","following_url":"https://api.github.com/users/eparker71/following{/other_user}","gists_url":"https://api.github.com/users/eparker71/gists{/gist_id}","starred_url":"https://api.github.com/users/eparker71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparker71/subscriptions","organizations_url":"https://api.github.com/users/eparker71/orgs","repos_url":"https://api.github.com/users/eparker71/repos","events_url":"https://api.github.com/users/eparker71/events{/privacy}","received_events_url":"https://api.github.com/users/eparker71/received_events","type":"User","site_admin":false},"body":"sure","created_at":"2015-08-27T16:39:58Z","updated_at":"2015-08-27T16:39:58Z","html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351#discussion_r38117038","pull_request_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351","_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments/38117038"},"html":{"href":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351#discussion_r38117038"},"pull_request":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351"}}},"pull_request":{"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351","id":43474331,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351","diff_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351.diff","patch_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351.patch","issue_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/351","number":351,"state":"open","locked":false,"title":"Task/eparker71/tlt 1925 lecture video bug","user":{"login":"eparker71","id":1084287,"avatar_url":"https://avatars.githubusercontent.com/u/1084287?v=3","gravatar_id":"","url":"https://api.github.com/users/eparker71","html_url":"https://github.com/eparker71","followers_url":"https://api.github.com/users/eparker71/followers","following_url":"https://api.github.com/users/eparker71/following{/other_user}","gists_url":"https://api.github.com/users/eparker71/gists{/gist_id}","starred_url":"https://api.github.com/users/eparker71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eparker71/subscriptions","organizations_url":"https://api.github.com/users/eparker71/orgs","repos_url":"https://api.github.com/users/eparker71/repos","events_url":"https://api.github.com/users/eparker71/events{/privacy}","received_events_url":"https://api.github.com/users/eparker71/received_events","type":"User","site_admin":false},"body":"Changes\r\n1) added some divs and id's in video_details.html for selecting items in the selenium tests\r\n2) fixed bug where course instance id does not contain a keyword (in views.py line 46) \r\n3) updated names of test flow for bulk create making the class name more descriptive\r\n4) fixed bug - changed how the tool was getting the course instance id from LTI parameters (views.py line 148)\r\n5) added selenium test for the tool\r\n6) changed JavaScript to form the correct query string (video.js line 48). This was not working as the resource link id is now being inserted in the url by lti_auth. \r\n\r\nI think 2, 4 and 5 are the meat here. The others are small changes. \r\n\r\n","created_at":"2015-08-27T02:46:39Z","updated_at":"2015-08-27T16:39:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fe4e0a8bd85a8cfe5cbed19d5cf05c2274fae50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351/commits","review_comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351/comments","review_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/351/comments","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/a4dbcd0017d0839619b51e7ad4bc42ab7c07c7ee","head":{"label":"Harvard-University-iCommons:task/eparker71/TLT-1925-lecture-video-bug","ref":"task/eparker71/TLT-1925-lecture-video-bug","sha":"a4dbcd0017d0839619b51e7ad4bc42ab7c07c7ee","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":14696916,"name":"icommons_lti_tools","full_name":"Harvard-University-iCommons/icommons_lti_tools","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","description":"LTI tools for Canvas","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/releases{/id}","created_at":"2013-11-25T20:06:20Z","updated_at":"2015-08-16T12:08:30Z","pushed_at":"2015-08-27T16:30:41Z","git_url":"git://github.com/Harvard-University-iCommons/icommons_lti_tools.git","ssh_url":"git@github.com:Harvard-University-iCommons/icommons_lti_tools.git","clone_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools.git","svn_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","homepage":"","size":10151,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"develop"}},"base":{"label":"Harvard-University-iCommons:develop","ref":"develop","sha":"558908fd3370c6413998b1b4da980d66ea41de57","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":14696916,"name":"icommons_lti_tools","full_name":"Harvard-University-iCommons/icommons_lti_tools","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","description":"LTI tools for Canvas","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/releases{/id}","created_at":"2013-11-25T20:06:20Z","updated_at":"2015-08-16T12:08:30Z","pushed_at":"2015-08-27T16:30:41Z","git_url":"git://github.com/Harvard-University-iCommons/icommons_lti_tools.git","ssh_url":"git@github.com:Harvard-University-iCommons/icommons_lti_tools.git","clone_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools.git","svn_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","homepage":"","size":10151,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351"},"html":{"href":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/351"},"issue":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/351"},"comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/351/comments"},"review_comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351/comments"},"review_comment":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/351/commits"},"statuses":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/a4dbcd0017d0839619b51e7ad4bc42ab7c07c7ee"}}}}