{"action":"created","comment":{"url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/comments/53919247","id":53919247,"diff_hunk":"@@ -0,0 +1,56 @@\n+module.exports = function (grunt, options) {\n+\n+  var courseDir = options.sourcedir + 'course/';\n+\n+  if (options.outputdir.indexOf('build/') > -1) {\n+    courseDir = options.outputdir + 'course/';\n+  }\n+\n+  var configJson = grunt.file.readJSON(courseDir + 'config.json');\n+  var defaultLanguage = configJson._defaultLanguage || 'en';\n+  var courseJson = grunt.file.readJSON(courseDir + defaultLanguage + '/course.json');\n+\n+  // Backwards compatibility for courses missing 'description'\n+  if (!courseJson.hasOwnProperty('description')) {\n+    courseJson.description = '';\n+  }\n+\n+  // A shim for edge cases where xAPI has not been configured.\n+  if (!configJson.hasOwnProperty('_xapi')) {\n+    configJson._xapi = {\n+      'activityID': '',\n+      '_isEnabled': false\n+    };\n+  } else {\n+    // xAPI has been enabled, check if the activityID has been set.\n+    if (configJson._xapi.hasOwnProperty('activityID') && configJson._xapi.activityID == '') {\n+      grunt.log.writeln('WARNING: xAPI activityID has not been set');\n+    }\n+  }\n+\n+  // Combine the course and config JSON so both can be passet to replace.  ","path":"grunt/config/replace.js","position":31,"original_position":31,"commit_id":"86d37f2b498a8973d81cb909de5d169ee3d031a2","original_commit_id":"86d37f2b498a8973d81cb909de5d169ee3d031a2","user":{"login":"dennis-learningpool","id":1692639,"avatar_url":"https://avatars.githubusercontent.com/u/1692639?v=3","gravatar_id":"","url":"https://api.github.com/users/dennis-learningpool","html_url":"https://github.com/dennis-learningpool","followers_url":"https://api.github.com/users/dennis-learningpool/followers","following_url":"https://api.github.com/users/dennis-learningpool/following{/other_user}","gists_url":"https://api.github.com/users/dennis-learningpool/gists{/gist_id}","starred_url":"https://api.github.com/users/dennis-learningpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennis-learningpool/subscriptions","organizations_url":"https://api.github.com/users/dennis-learningpool/orgs","repos_url":"https://api.github.com/users/dennis-learningpool/repos","events_url":"https://api.github.com/users/dennis-learningpool/events{/privacy}","received_events_url":"https://api.github.com/users/dennis-learningpool/received_events","type":"User","site_admin":false},"body":"passet -> passed","created_at":"2016-02-24T10:28:21Z","updated_at":"2016-02-24T10:28:21Z","html_url":"https://github.com/adaptlearning/adapt_framework/pull/971#discussion_r53919247","pull_request_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971","_links":{"self":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/comments/53919247"},"html":{"href":"https://github.com/adaptlearning/adapt_framework/pull/971#discussion_r53919247"},"pull_request":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971"}}},"pull_request":{"url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971","id":60346473,"html_url":"https://github.com/adaptlearning/adapt_framework/pull/971","diff_url":"https://github.com/adaptlearning/adapt_framework/pull/971.diff","patch_url":"https://github.com/adaptlearning/adapt_framework/pull/971.patch","issue_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/971","number":971,"state":"open","locked":false,"title":"Added support for string substitution in XML files","user":{"login":"brian-learningpool","id":1327471,"avatar_url":"https://avatars.githubusercontent.com/u/1327471?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-learningpool","html_url":"https://github.com/brian-learningpool","followers_url":"https://api.github.com/users/brian-learningpool/followers","following_url":"https://api.github.com/users/brian-learningpool/following{/other_user}","gists_url":"https://api.github.com/users/brian-learningpool/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-learningpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-learningpool/subscriptions","organizations_url":"https://api.github.com/users/brian-learningpool/orgs","repos_url":"https://api.github.com/users/brian-learningpool/repos","events_url":"https://api.github.com/users/brian-learningpool/events{/privacy}","received_events_url":"https://api.github.com/users/brian-learningpool/received_events","type":"User","site_admin":false},"body":"This is required to support upcoming work on the xAPI plugin but will also work with a slightly modified Spoor plugin.  The placeholder format is: @@property.\r\n\r\nRight now properties from config.json and course.json are supported.\r\n\r\nSquashed commit messages:\r\n- Added replace task to build.js and dev.js\r\n- Added support for passing both course and config to replace call\r\n- Added 'description' to course.json.  This attribute is useful for the SCORM and xAPI extensions.\r\n- Added shim for missing xAPI property. This is to cover edge cases where the xAPI extension may be defined but its configuration may be incomplete.\r\n- Added a warning mesage for when xAPI activityID has not been set.  The course will not confirm to the spec if this has been left empty.","created_at":"2016-02-23T14:23:11Z","updated_at":"2016-02-24T10:28:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"375338fce1304a0c8da59040145b6f677a536eec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971/commits","review_comments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971/comments","review_comment_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/971/comments","statuses_url":"https://api.github.com/repos/adaptlearning/adapt_framework/statuses/86d37f2b498a8973d81cb909de5d169ee3d031a2","head":{"label":"adaptlearning:issue/939","ref":"issue/939","sha":"86d37f2b498a8973d81cb909de5d169ee3d031a2","user":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"repo":{"id":13442719,"name":"adapt_framework","full_name":"adaptlearning/adapt_framework","owner":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adaptlearning/adapt_framework","description":"This is the output framework of the Adapt Learning open source project ","fork":false,"url":"https://api.github.com/repos/adaptlearning/adapt_framework","forks_url":"https://api.github.com/repos/adaptlearning/adapt_framework/forks","keys_url":"https://api.github.com/repos/adaptlearning/adapt_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adaptlearning/adapt_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adaptlearning/adapt_framework/teams","hooks_url":"https://api.github.com/repos/adaptlearning/adapt_framework/hooks","issue_events_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/events{/number}","events_url":"https://api.github.com/repos/adaptlearning/adapt_framework/events","assignees_url":"https://api.github.com/repos/adaptlearning/adapt_framework/assignees{/user}","branches_url":"https://api.github.com/repos/adaptlearning/adapt_framework/branches{/branch}","tags_url":"https://api.github.com/repos/adaptlearning/adapt_framework/tags","blobs_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adaptlearning/adapt_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/adaptlearning/adapt_framework/languages","stargazers_url":"https://api.github.com/repos/adaptlearning/adapt_framework/stargazers","contributors_url":"https://api.github.com/repos/adaptlearning/adapt_framework/contributors","subscribers_url":"https://api.github.com/repos/adaptlearning/adapt_framework/subscribers","subscription_url":"https://api.github.com/repos/adaptlearning/adapt_framework/subscription","commits_url":"https://api.github.com/repos/adaptlearning/adapt_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/adaptlearning/adapt_framework/contents/{+path}","compare_url":"https://api.github.com/repos/adaptlearning/adapt_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adaptlearning/adapt_framework/merges","archive_url":"https://api.github.com/repos/adaptlearning/adapt_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adaptlearning/adapt_framework/downloads","issues_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues{/number}","pulls_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/adaptlearning/adapt_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/adaptlearning/adapt_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adaptlearning/adapt_framework/labels{/name}","releases_url":"https://api.github.com/repos/adaptlearning/adapt_framework/releases{/id}","deployments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/deployments","created_at":"2013-10-09T13:15:44Z","updated_at":"2016-02-24T08:59:21Z","pushed_at":"2016-02-24T09:12:23Z","git_url":"git://github.com/adaptlearning/adapt_framework.git","ssh_url":"git@github.com:adaptlearning/adapt_framework.git","clone_url":"https://github.com/adaptlearning/adapt_framework.git","svn_url":"https://github.com/adaptlearning/adapt_framework","homepage":null,"size":58247,"stargazers_count":192,"watchers_count":192,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":107,"forks":120,"open_issues":107,"watchers":192,"default_branch":"master"}},"base":{"label":"adaptlearning:master","ref":"master","sha":"0b66d6ad21329463405bb12dfcc61a910c5b2a6b","user":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"repo":{"id":13442719,"name":"adapt_framework","full_name":"adaptlearning/adapt_framework","owner":{"login":"adaptlearning","id":5629464,"avatar_url":"https://avatars.githubusercontent.com/u/5629464?v=3","gravatar_id":"","url":"https://api.github.com/users/adaptlearning","html_url":"https://github.com/adaptlearning","followers_url":"https://api.github.com/users/adaptlearning/followers","following_url":"https://api.github.com/users/adaptlearning/following{/other_user}","gists_url":"https://api.github.com/users/adaptlearning/gists{/gist_id}","starred_url":"https://api.github.com/users/adaptlearning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaptlearning/subscriptions","organizations_url":"https://api.github.com/users/adaptlearning/orgs","repos_url":"https://api.github.com/users/adaptlearning/repos","events_url":"https://api.github.com/users/adaptlearning/events{/privacy}","received_events_url":"https://api.github.com/users/adaptlearning/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adaptlearning/adapt_framework","description":"This is the output framework of the Adapt Learning open source project ","fork":false,"url":"https://api.github.com/repos/adaptlearning/adapt_framework","forks_url":"https://api.github.com/repos/adaptlearning/adapt_framework/forks","keys_url":"https://api.github.com/repos/adaptlearning/adapt_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adaptlearning/adapt_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adaptlearning/adapt_framework/teams","hooks_url":"https://api.github.com/repos/adaptlearning/adapt_framework/hooks","issue_events_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/events{/number}","events_url":"https://api.github.com/repos/adaptlearning/adapt_framework/events","assignees_url":"https://api.github.com/repos/adaptlearning/adapt_framework/assignees{/user}","branches_url":"https://api.github.com/repos/adaptlearning/adapt_framework/branches{/branch}","tags_url":"https://api.github.com/repos/adaptlearning/adapt_framework/tags","blobs_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adaptlearning/adapt_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/adaptlearning/adapt_framework/languages","stargazers_url":"https://api.github.com/repos/adaptlearning/adapt_framework/stargazers","contributors_url":"https://api.github.com/repos/adaptlearning/adapt_framework/contributors","subscribers_url":"https://api.github.com/repos/adaptlearning/adapt_framework/subscribers","subscription_url":"https://api.github.com/repos/adaptlearning/adapt_framework/subscription","commits_url":"https://api.github.com/repos/adaptlearning/adapt_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/adaptlearning/adapt_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/adaptlearning/adapt_framework/contents/{+path}","compare_url":"https://api.github.com/repos/adaptlearning/adapt_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adaptlearning/adapt_framework/merges","archive_url":"https://api.github.com/repos/adaptlearning/adapt_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adaptlearning/adapt_framework/downloads","issues_url":"https://api.github.com/repos/adaptlearning/adapt_framework/issues{/number}","pulls_url":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/adaptlearning/adapt_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/adaptlearning/adapt_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adaptlearning/adapt_framework/labels{/name}","releases_url":"https://api.github.com/repos/adaptlearning/adapt_framework/releases{/id}","deployments_url":"https://api.github.com/repos/adaptlearning/adapt_framework/deployments","created_at":"2013-10-09T13:15:44Z","updated_at":"2016-02-24T08:59:21Z","pushed_at":"2016-02-24T09:12:23Z","git_url":"git://github.com/adaptlearning/adapt_framework.git","ssh_url":"git@github.com:adaptlearning/adapt_framework.git","clone_url":"https://github.com/adaptlearning/adapt_framework.git","svn_url":"https://github.com/adaptlearning/adapt_framework","homepage":null,"size":58247,"stargazers_count":192,"watchers_count":192,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":107,"forks":120,"open_issues":107,"watchers":192,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971"},"html":{"href":"https://github.com/adaptlearning/adapt_framework/pull/971"},"issue":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/971"},"comments":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/issues/971/comments"},"review_comments":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971/comments"},"review_comment":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/pulls/971/commits"},"statuses":{"href":"https://api.github.com/repos/adaptlearning/adapt_framework/statuses/86d37f2b498a8973d81cb909de5d169ee3d031a2"}}}}