{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-ora2/pulls/comments/97094360","pull_request_review_id":17699832,"id":97094360,"diff_hunk":"@@ -0,0 +1,63 @@\n+(function(require, define) {\n+    'use strict';\n+\n+    var defineDependency;\n+    // We do not wish to bundle common libraries (that may also be used by non-RequireJS code on the page\n+    // into the optimized files. Therefore load these libraries through script tags and explicitly define them.\n+    // Note that when the optimizer executes this code, window will not be defined.\n+    if (window) {\n+        defineDependency = function (globalName, name, noShim) {\n+            var getGlobalValue = function () {\n+                    var globalNamePath = globalName.split('.'),\n+                        result = window,\n+                        i;\n+                    for (i = 0; i < globalNamePath.length; i++) {\n+                        result = result[globalNamePath[i]];\n+                    }\n+                    return result;\n+                },\n+                globalValue = getGlobalValue();\n+            if (globalValue) {\n+                if (noShim) {\n+                    define(name, {});\n+                } else {\n+                    define(name, [], function () {\n+                        return globalValue;\n+                    });\n+                }\n+            } else {\n+                console.error('Expected library to be included on page, but not found on window object: ' + name);\n+            }\n+        };\n+        defineDependency('jQuery', 'jquery');\n+    }\n+\n+    function getBaseUrlPath() {\n+        // require-config doesn't play nice with relative paths, but\n+        // the Travis server, devstack, and staging/production servers all place the\n+        // node_module files differently in absolute paths - this is a way to retrieve the\n+        // path to the Jasmine req's as nicely as possible\n+        var scripts = document.getElementsByTagName(\"script\");\n+        var fullTag = $(scripts[scripts.length-1]);\n+        var baseUrl = fullTag.attr('src').split(['require-config'])[0];\n+        return baseUrl\n+    }\n+\n+    require.config({\n+        baseUrl: getBaseUrlPath(),\n+        paths: {\n+            'jquery': './openassessment/xblock/static/js/lib/jquery.min',\n+            'moment': './node_modules/moment/min/moment-with-locales.min',\n+            'moment-timezone': './node_modules/moment-timezone/builds/moment-timezone-with-data.min',\n+            'edx-ui-toolkit/js/utils/date-utils': './node_modules/edx-ui-toolkit/src/js/utils/date-utils',\n+            'edx-ui-toolkit/js/utils/string-utils': './node_modules/edx-ui-toolkit/src/js/utils/string-utils'\n+        },\n+        shim: {\n+            'jquery': {\n+                exports: 'jQuery'\n+            }\n+        }\n+\n+    })\n+}).call(this, require || RequireJS.require, define || RequireJS.define);","path":"require-config.js","position":62,"original_position":62,"commit_id":"9e5a591da20d1765422715269ecac4f42f359c5f","original_commit_id":"9e5a591da20d1765422715269ecac4f42f359c5f","user":{"login":"yro","id":7050866,"avatar_url":"https://avatars.githubusercontent.com/u/7050866?v=3","gravatar_id":"","url":"https://api.github.com/users/yro","html_url":"https://github.com/yro","followers_url":"https://api.github.com/users/yro/followers","following_url":"https://api.github.com/users/yro/following{/other_user}","gists_url":"https://api.github.com/users/yro/gists{/gist_id}","starred_url":"https://api.github.com/users/yro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yro/subscriptions","organizations_url":"https://api.github.com/users/yro/orgs","repos_url":"https://api.github.com/users/yro/repos","events_url":"https://api.github.com/users/yro/events{/privacy}","received_events_url":"https://api.github.com/users/yro/received_events","type":"User","site_admin":false},"body":"This is a require-config file, but effectively 'fakes' require for the jasmine tests to pass and is not called by the methods in production. \r\nFrom my testing it seemed like it needed to live in a more centralized dir than where I initially put it (openassessment/xblock/static/js/lib/), as it needs to determine the directory structure outside of the normal paths that a standard require config would use. (at least in examples I could find)","created_at":"2017-01-20T15:33:47Z","updated_at":"2017-01-20T15:33:47Z","html_url":"https://github.com/edx/edx-ora2/pull/959#discussion_r97094360","pull_request_url":"https://api.github.com/repos/edx/edx-ora2/pulls/959","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/comments/97094360"},"html":{"href":"https://github.com/edx/edx-ora2/pull/959#discussion_r97094360"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-ora2/pulls/959","id":100016190,"html_url":"https://github.com/edx/edx-ora2/pull/959","diff_url":"https://github.com/edx/edx-ora2/pull/959.diff","patch_url":"https://github.com/edx/edx-ora2/pull/959.patch","issue_url":"https://api.github.com/repos/edx/edx-ora2/issues/959","number":959,"state":"open","locked":false,"title":"implement dateutils from edx-ui-toolkit","user":{"login":"yro","id":7050866,"avatar_url":"https://avatars.githubusercontent.com/u/7050866?v=3","gravatar_id":"","url":"https://api.github.com/users/yro","html_url":"https://github.com/yro","followers_url":"https://api.github.com/users/yro/followers","following_url":"https://api.github.com/users/yro/following{/other_user}","gists_url":"https://api.github.com/users/yro/gists{/gist_id}","starred_url":"https://api.github.com/users/yro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yro/subscriptions","organizations_url":"https://api.github.com/users/yro/orgs","repos_url":"https://api.github.com/users/yro/repos","events_url":"https://api.github.com/users/yro/events{/privacy}","received_events_url":"https://api.github.com/users/yro/received_events","type":"User","site_admin":false},"body":"## [TNL-6107](https://openedx.atlassian.net/browse/TNL-6107)\r\n\r\n### Description\r\nRender time zones via date-utils from edx-ui-toolkit. Utilizes a 'shimmed' version of requirejs for testing, but otherwise piggybacks the process from edx-platform.\r\n\r\n### Testing\r\n- [ ] Unit tests\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @andy-armstrong \r\n- [ ] Code review: @nasthagiri \r\n\r\nFYI: @efischer19 \r\n\r\n### Post-review\r\n- [ ] Rebase and squash commits\r\n\r\n","created_at":"2017-01-03T20:32:06Z","updated_at":"2017-01-20T15:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10511506cda1fa7df31528968db748d70412dfee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-ora2/pulls/959/commits","review_comments_url":"https://api.github.com/repos/edx/edx-ora2/pulls/959/comments","review_comment_url":"https://api.github.com/repos/edx/edx-ora2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-ora2/issues/959/comments","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/9e5a591da20d1765422715269ecac4f42f359c5f","head":{"label":"edx:yro_implement-dateutils","ref":"yro_implement-dateutils","sha":"9e5a591da20d1765422715269ecac4f42f359c5f","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":15404425,"name":"edx-ora2","full_name":"edx/edx-ora2","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-ora2","description":"Open Response Assessment Suite","fork":false,"url":"https://api.github.com/repos/edx/edx-ora2","forks_url":"https://api.github.com/repos/edx/edx-ora2/forks","keys_url":"https://api.github.com/repos/edx/edx-ora2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ora2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ora2/teams","hooks_url":"https://api.github.com/repos/edx/edx-ora2/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ora2/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ora2/events","assignees_url":"https://api.github.com/repos/edx/edx-ora2/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ora2/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ora2/tags","blobs_url":"https://api.github.com/repos/edx/edx-ora2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ora2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ora2/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ora2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ora2/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ora2/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ora2/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ora2/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ora2/subscription","commits_url":"https://api.github.com/repos/edx/edx-ora2/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ora2/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ora2/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ora2/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ora2/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ora2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ora2/merges","archive_url":"https://api.github.com/repos/edx/edx-ora2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ora2/downloads","issues_url":"https://api.github.com/repos/edx/edx-ora2/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ora2/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ora2/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ora2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ora2/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ora2/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-ora2/deployments","created_at":"2013-12-23T20:54:54Z","updated_at":"2016-11-07T17:55:29Z","pushed_at":"2017-01-19T21:31:43Z","git_url":"git://github.com/edx/edx-ora2.git","ssh_url":"git@github.com:edx/edx-ora2.git","clone_url":"https://github.com/edx/edx-ora2.git","svn_url":"https://github.com/edx/edx-ora2","homepage":"","size":89924,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":17,"forks":81,"open_issues":17,"watchers":29,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"1ed3fc6919e3177bb2dc5c7863c5776237f9cd66","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":15404425,"name":"edx-ora2","full_name":"edx/edx-ora2","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-ora2","description":"Open Response Assessment Suite","fork":false,"url":"https://api.github.com/repos/edx/edx-ora2","forks_url":"https://api.github.com/repos/edx/edx-ora2/forks","keys_url":"https://api.github.com/repos/edx/edx-ora2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-ora2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-ora2/teams","hooks_url":"https://api.github.com/repos/edx/edx-ora2/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-ora2/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-ora2/events","assignees_url":"https://api.github.com/repos/edx/edx-ora2/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-ora2/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-ora2/tags","blobs_url":"https://api.github.com/repos/edx/edx-ora2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-ora2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-ora2/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-ora2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-ora2/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-ora2/languages","stargazers_url":"https://api.github.com/repos/edx/edx-ora2/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-ora2/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-ora2/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-ora2/subscription","commits_url":"https://api.github.com/repos/edx/edx-ora2/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-ora2/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-ora2/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-ora2/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-ora2/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-ora2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-ora2/merges","archive_url":"https://api.github.com/repos/edx/edx-ora2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-ora2/downloads","issues_url":"https://api.github.com/repos/edx/edx-ora2/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-ora2/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-ora2/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-ora2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-ora2/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-ora2/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-ora2/deployments","created_at":"2013-12-23T20:54:54Z","updated_at":"2016-11-07T17:55:29Z","pushed_at":"2017-01-19T21:31:43Z","git_url":"git://github.com/edx/edx-ora2.git","ssh_url":"git@github.com:edx/edx-ora2.git","clone_url":"https://github.com/edx/edx-ora2.git","svn_url":"https://github.com/edx/edx-ora2","homepage":"","size":89924,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":17,"forks":81,"open_issues":17,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/959"},"html":{"href":"https://github.com/edx/edx-ora2/pull/959"},"issue":{"href":"https://api.github.com/repos/edx/edx-ora2/issues/959"},"comments":{"href":"https://api.github.com/repos/edx/edx-ora2/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-ora2/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-ora2/statuses/9e5a591da20d1765422715269ecac4f42f359c5f"}}}}
{"actor":{"display_login":"yro"}}