{"action":"created","comment":{"url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/comments/52885528","id":52885528,"diff_hunk":"@@ -1,51 +1,77 @@\n /*\n-* adapt-tincan\n-* License - http://github.com/adaptlearning/adapt_framework/LICENSE\n-* Maintainers - Dennis Heaney <dennis@learningpool.com>\n-*/\n+ * adapt-tincan\n+ * License - http://github.com/adaptlearning/adapt_framework/LICENSE\n+ * Maintainers  - Dennis Heaney <dennis@learningpool.com>\n+ *              - Barry McKay <barry@learningpool.com>\n+ *              - Andy Bell <andrewb@learningpool.com>\n+ */\n define(function(require) {\n \n   var Adapt = require('coreJS/adapt');\n   var _ = require('underscore');\n   var xapi = require('extensions/adapt-tincan/js/xapiwrapper.min');\n+\n   var xapiWrapper;\n   var STATE_PROGRESS = 'adapt-course-progress';\n \n   var TinCan = Backbone.Model.extend({\n+    actor: null,\n+    activityId: null,\n \n     defaults: {\n       initialised: false,\n       state: null\n     },\n \n-    initialize: function () {\n-      this.setConfig(Adapt.config.get('_tincan'));\n+    initialize: function() {\n+      if (window.xapiWrapper) {\n+        xapiWrapper = window.xapiWrapper;\n+      } else {\n+        xapiWrapper = ADL.XAPIWrapper;\n+      }\n+\n+      if (!Adapt.config.get(\"_extensions\") || !Adapt.config.get(\"_extensions\")._tincan) {\n+        return;","path":"js/adapt-tincan.js","position":41,"original_position":40,"commit_id":"21df8805adbf1f68aa43a67ec5e033a1ae18585f","original_commit_id":"1ce470e1c42c56869d4bf74f2d16e65f76cbca2d","user":{"login":"barry-learningpool","id":1804476,"avatar_url":"https://avatars.githubusercontent.com/u/1804476?v=3","gravatar_id":"","url":"https://api.github.com/users/barry-learningpool","html_url":"https://github.com/barry-learningpool","followers_url":"https://api.github.com/users/barry-learningpool/followers","following_url":"https://api.github.com/users/barry-learningpool/following{/other_user}","gists_url":"https://api.github.com/users/barry-learningpool/gists{/gist_id}","starred_url":"https://api.github.com/users/barry-learningpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barry-learningpool/subscriptions","organizations_url":"https://api.github.com/users/barry-learningpool/orgs","repos_url":"https://api.github.com/users/barry-learningpool/repos","events_url":"https://api.github.com/users/barry-learningpool/events{/privacy}","received_events_url":"https://api.github.com/users/barry-learningpool/received_events","type":"User","site_admin":false},"body":"Same again @brian-learningpool ","created_at":"2016-02-15T11:04:32Z","updated_at":"2016-02-15T11:04:32Z","html_url":"https://github.com/LearningPool/adapt-tincan/pull/5#discussion_r52885528","pull_request_url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/comments/52885528"},"html":{"href":"https://github.com/LearningPool/adapt-tincan/pull/5#discussion_r52885528"},"pull_request":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5","id":58002549,"html_url":"https://github.com/LearningPool/adapt-tincan/pull/5","diff_url":"https://github.com/LearningPool/adapt-tincan/pull/5.diff","patch_url":"https://github.com/LearningPool/adapt-tincan/pull/5.patch","issue_url":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/5","number":5,"state":"open","locked":false,"title":"ADAPT-906/ADAPT-907","user":{"login":"barry-learningpool","id":1804476,"avatar_url":"https://avatars.githubusercontent.com/u/1804476?v=3","gravatar_id":"","url":"https://api.github.com/users/barry-learningpool","html_url":"https://github.com/barry-learningpool","followers_url":"https://api.github.com/users/barry-learningpool/followers","following_url":"https://api.github.com/users/barry-learningpool/following{/other_user}","gists_url":"https://api.github.com/users/barry-learningpool/gists{/gist_id}","starred_url":"https://api.github.com/users/barry-learningpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barry-learningpool/subscriptions","organizations_url":"https://api.github.com/users/barry-learningpool/orgs","repos_url":"https://api.github.com/users/barry-learningpool/repos","events_url":"https://api.github.com/users/barry-learningpool/events{/privacy}","received_events_url":"https://api.github.com/users/barry-learningpool/received_events","type":"User","site_admin":false},"body":"Implemented xAPI test harness which shows Tincan statements/state as sent to LRS in the console\r\n\r\nAlso contains @bell87 's improvements (I branched off his ADAPT-906 branch)\r\n","created_at":"2016-02-02T15:30:28Z","updated_at":"2016-02-15T11:04:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00daac0db8e9426e4f0ed1a2593b4bf74ed359c6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5/commits","review_comments_url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5/comments","review_comment_url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/5/comments","statuses_url":"https://api.github.com/repos/LearningPool/adapt-tincan/statuses/21df8805adbf1f68aa43a67ec5e033a1ae18585f","head":{"label":"bell87:ADAPT-907","ref":"ADAPT-907","sha":"21df8805adbf1f68aa43a67ec5e033a1ae18585f","user":{"login":"bell87","id":5338785,"avatar_url":"https://avatars.githubusercontent.com/u/5338785?v=3","gravatar_id":"","url":"https://api.github.com/users/bell87","html_url":"https://github.com/bell87","followers_url":"https://api.github.com/users/bell87/followers","following_url":"https://api.github.com/users/bell87/following{/other_user}","gists_url":"https://api.github.com/users/bell87/gists{/gist_id}","starred_url":"https://api.github.com/users/bell87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bell87/subscriptions","organizations_url":"https://api.github.com/users/bell87/orgs","repos_url":"https://api.github.com/users/bell87/repos","events_url":"https://api.github.com/users/bell87/events{/privacy}","received_events_url":"https://api.github.com/users/bell87/received_events","type":"User","site_admin":false},"repo":{"id":50174117,"name":"adapt-tincan","full_name":"bell87/adapt-tincan","owner":{"login":"bell87","id":5338785,"avatar_url":"https://avatars.githubusercontent.com/u/5338785?v=3","gravatar_id":"","url":"https://api.github.com/users/bell87","html_url":"https://github.com/bell87","followers_url":"https://api.github.com/users/bell87/followers","following_url":"https://api.github.com/users/bell87/following{/other_user}","gists_url":"https://api.github.com/users/bell87/gists{/gist_id}","starred_url":"https://api.github.com/users/bell87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bell87/subscriptions","organizations_url":"https://api.github.com/users/bell87/orgs","repos_url":"https://api.github.com/users/bell87/repos","events_url":"https://api.github.com/users/bell87/events{/privacy}","received_events_url":"https://api.github.com/users/bell87/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bell87/adapt-tincan","description":"Prototype TinCan/xAPI extension for Adapt Learning","fork":true,"url":"https://api.github.com/repos/bell87/adapt-tincan","forks_url":"https://api.github.com/repos/bell87/adapt-tincan/forks","keys_url":"https://api.github.com/repos/bell87/adapt-tincan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bell87/adapt-tincan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bell87/adapt-tincan/teams","hooks_url":"https://api.github.com/repos/bell87/adapt-tincan/hooks","issue_events_url":"https://api.github.com/repos/bell87/adapt-tincan/issues/events{/number}","events_url":"https://api.github.com/repos/bell87/adapt-tincan/events","assignees_url":"https://api.github.com/repos/bell87/adapt-tincan/assignees{/user}","branches_url":"https://api.github.com/repos/bell87/adapt-tincan/branches{/branch}","tags_url":"https://api.github.com/repos/bell87/adapt-tincan/tags","blobs_url":"https://api.github.com/repos/bell87/adapt-tincan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bell87/adapt-tincan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bell87/adapt-tincan/git/refs{/sha}","trees_url":"https://api.github.com/repos/bell87/adapt-tincan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bell87/adapt-tincan/statuses/{sha}","languages_url":"https://api.github.com/repos/bell87/adapt-tincan/languages","stargazers_url":"https://api.github.com/repos/bell87/adapt-tincan/stargazers","contributors_url":"https://api.github.com/repos/bell87/adapt-tincan/contributors","subscribers_url":"https://api.github.com/repos/bell87/adapt-tincan/subscribers","subscription_url":"https://api.github.com/repos/bell87/adapt-tincan/subscription","commits_url":"https://api.github.com/repos/bell87/adapt-tincan/commits{/sha}","git_commits_url":"https://api.github.com/repos/bell87/adapt-tincan/git/commits{/sha}","comments_url":"https://api.github.com/repos/bell87/adapt-tincan/comments{/number}","issue_comment_url":"https://api.github.com/repos/bell87/adapt-tincan/issues/comments{/number}","contents_url":"https://api.github.com/repos/bell87/adapt-tincan/contents/{+path}","compare_url":"https://api.github.com/repos/bell87/adapt-tincan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bell87/adapt-tincan/merges","archive_url":"https://api.github.com/repos/bell87/adapt-tincan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bell87/adapt-tincan/downloads","issues_url":"https://api.github.com/repos/bell87/adapt-tincan/issues{/number}","pulls_url":"https://api.github.com/repos/bell87/adapt-tincan/pulls{/number}","milestones_url":"https://api.github.com/repos/bell87/adapt-tincan/milestones{/number}","notifications_url":"https://api.github.com/repos/bell87/adapt-tincan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bell87/adapt-tincan/labels{/name}","releases_url":"https://api.github.com/repos/bell87/adapt-tincan/releases{/id}","deployments_url":"https://api.github.com/repos/bell87/adapt-tincan/deployments","created_at":"2016-01-22T10:19:10Z","updated_at":"2016-01-22T10:19:11Z","pushed_at":"2016-02-15T10:45:54Z","git_url":"git://github.com/bell87/adapt-tincan.git","ssh_url":"git@github.com:bell87/adapt-tincan.git","clone_url":"https://github.com/bell87/adapt-tincan.git","svn_url":"https://github.com/bell87/adapt-tincan","homepage":null,"size":81,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"LearningPool:master","ref":"master","sha":"3c7b2aaa27e09b5e97cb3d73682e8f5f76e9a293","user":{"login":"LearningPool","id":1692494,"avatar_url":"https://avatars.githubusercontent.com/u/1692494?v=3","gravatar_id":"","url":"https://api.github.com/users/LearningPool","html_url":"https://github.com/LearningPool","followers_url":"https://api.github.com/users/LearningPool/followers","following_url":"https://api.github.com/users/LearningPool/following{/other_user}","gists_url":"https://api.github.com/users/LearningPool/gists{/gist_id}","starred_url":"https://api.github.com/users/LearningPool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LearningPool/subscriptions","organizations_url":"https://api.github.com/users/LearningPool/orgs","repos_url":"https://api.github.com/users/LearningPool/repos","events_url":"https://api.github.com/users/LearningPool/events{/privacy}","received_events_url":"https://api.github.com/users/LearningPool/received_events","type":"Organization","site_admin":false},"repo":{"id":44191124,"name":"adapt-tincan","full_name":"LearningPool/adapt-tincan","owner":{"login":"LearningPool","id":1692494,"avatar_url":"https://avatars.githubusercontent.com/u/1692494?v=3","gravatar_id":"","url":"https://api.github.com/users/LearningPool","html_url":"https://github.com/LearningPool","followers_url":"https://api.github.com/users/LearningPool/followers","following_url":"https://api.github.com/users/LearningPool/following{/other_user}","gists_url":"https://api.github.com/users/LearningPool/gists{/gist_id}","starred_url":"https://api.github.com/users/LearningPool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LearningPool/subscriptions","organizations_url":"https://api.github.com/users/LearningPool/orgs","repos_url":"https://api.github.com/users/LearningPool/repos","events_url":"https://api.github.com/users/LearningPool/events{/privacy}","received_events_url":"https://api.github.com/users/LearningPool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LearningPool/adapt-tincan","description":"Prototype TinCan/xAPI extension for Adapt Learning","fork":false,"url":"https://api.github.com/repos/LearningPool/adapt-tincan","forks_url":"https://api.github.com/repos/LearningPool/adapt-tincan/forks","keys_url":"https://api.github.com/repos/LearningPool/adapt-tincan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LearningPool/adapt-tincan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LearningPool/adapt-tincan/teams","hooks_url":"https://api.github.com/repos/LearningPool/adapt-tincan/hooks","issue_events_url":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/events{/number}","events_url":"https://api.github.com/repos/LearningPool/adapt-tincan/events","assignees_url":"https://api.github.com/repos/LearningPool/adapt-tincan/assignees{/user}","branches_url":"https://api.github.com/repos/LearningPool/adapt-tincan/branches{/branch}","tags_url":"https://api.github.com/repos/LearningPool/adapt-tincan/tags","blobs_url":"https://api.github.com/repos/LearningPool/adapt-tincan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LearningPool/adapt-tincan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LearningPool/adapt-tincan/git/refs{/sha}","trees_url":"https://api.github.com/repos/LearningPool/adapt-tincan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LearningPool/adapt-tincan/statuses/{sha}","languages_url":"https://api.github.com/repos/LearningPool/adapt-tincan/languages","stargazers_url":"https://api.github.com/repos/LearningPool/adapt-tincan/stargazers","contributors_url":"https://api.github.com/repos/LearningPool/adapt-tincan/contributors","subscribers_url":"https://api.github.com/repos/LearningPool/adapt-tincan/subscribers","subscription_url":"https://api.github.com/repos/LearningPool/adapt-tincan/subscription","commits_url":"https://api.github.com/repos/LearningPool/adapt-tincan/commits{/sha}","git_commits_url":"https://api.github.com/repos/LearningPool/adapt-tincan/git/commits{/sha}","comments_url":"https://api.github.com/repos/LearningPool/adapt-tincan/comments{/number}","issue_comment_url":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/comments{/number}","contents_url":"https://api.github.com/repos/LearningPool/adapt-tincan/contents/{+path}","compare_url":"https://api.github.com/repos/LearningPool/adapt-tincan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LearningPool/adapt-tincan/merges","archive_url":"https://api.github.com/repos/LearningPool/adapt-tincan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LearningPool/adapt-tincan/downloads","issues_url":"https://api.github.com/repos/LearningPool/adapt-tincan/issues{/number}","pulls_url":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls{/number}","milestones_url":"https://api.github.com/repos/LearningPool/adapt-tincan/milestones{/number}","notifications_url":"https://api.github.com/repos/LearningPool/adapt-tincan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LearningPool/adapt-tincan/labels{/name}","releases_url":"https://api.github.com/repos/LearningPool/adapt-tincan/releases{/id}","deployments_url":"https://api.github.com/repos/LearningPool/adapt-tincan/deployments","created_at":"2015-10-13T16:53:09Z","updated_at":"2016-01-28T17:03:27Z","pushed_at":"2016-02-15T10:45:55Z","git_url":"git://github.com/LearningPool/adapt-tincan.git","ssh_url":"git@github.com:LearningPool/adapt-tincan.git","clone_url":"https://github.com/LearningPool/adapt-tincan.git","svn_url":"https://github.com/LearningPool/adapt-tincan","homepage":null,"size":68,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5"},"html":{"href":"https://github.com/LearningPool/adapt-tincan/pull/5"},"issue":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/5"},"comments":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/LearningPool/adapt-tincan/statuses/21df8805adbf1f68aa43a67ec5e033a1ae18585f"}}}}