payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aces/Loris/pulls/comments/327225550","pull_request_review_id":291921354,"id":327225550,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyNzIyNTU1MA==","diff_hunk":"@@ -0,0 +1,280 @@\n+<?php declare(strict_types=1);\n+/**\n+ * POST request methods.\n+ *\n+ * Used to retrieve info & create timepoint by the create_timepoint form.\n+ * Ensures the user can create timepoint before processing\n+ * the POST body (array) data.\n+ *\n+ * PHP Version 7\n+ *\n+ * @category Loris\n+ * @package  Create_Timepoint\n+ * @author   Alizée Wickenheiser <alizee.wickenheiser@mcin.ca>\n+ * @license  http://www.gnu.org/licenses/gpl-3.0.txt GPLv3\n+ * @link     https://www.github.com/aces/Loris/\n+ */\n+namespace LORIS\\create_timepoint;\n+use \\Psr\\Http\\Message\\ServerRequestInterface;\n+use \\Psr\\Http\\Message\\ResponseInterface;\n+/**\n+ * The NDB_Page for the POST requests.\n+ *\n+ * @category Loris\n+ * @package  Create_Timepoint\n+ * @author   Alizée Wickenheiser <alizee.wickenheiser@mcin.ca>\n+ * @license  http://www.gnu.org/licenses/gpl-3.0.txt GPLv3\n+ * @link     https://www.github.com/aces/Loris/\n+ */\n+class AjaxTimepoint extends \\NDB_Page\n+{\n+    public $skipTemplate = true;\n+    /**\n+     * This function will return a json response.\n+     *\n+     * @param ServerRequestInterface $request The incoming PSR7 request\n+     *\n+     * @return ResponseInterface The outgoing PSR7 response\n+     */\n+    public function handle(ServerRequestInterface $request) : ResponseInterface\n+    {\n+        // Ensure GET or POST request.\n+        switch ($request->getMethod()) {\n+            case 'GET':\n+                return $this->_handleGET($request);\n+            case 'POST':\n+                return $this->_handlePOST($request);\n+            default:\n+                return new \\LORIS\\Http\\Response\\MethodNotAllowed(\n+                    $this->allowedMethods()\n+                );\n+        }\n+    }\n+    /**\n+     * Initialize setup, the extra values for the\n+     * create timepoint form. (psc & errors)\n+     *\n+     * @param ServerRequestInterface $request The incoming PSR7 request.\n+     *\n+     * @return ResponseInterface The outgoing PSR7 response\n+     */\n+    private function _handleGET(ServerRequestInterface $request) : ResponseInterface\n+    {\n+        // Parse GET query params.\n+        $values = $request->getQueryParams();\n+        // Verify identifier from Post.\n+        $values['identifier'] = isset($values['identifier']) ?\n+            intval($values['identifier']) : null;\n+        // User permission verification.\n+        $values = $this->_verifyPermissions($request, $values);","path":"modules/create_timepoint/php/ajaxtimepoint.class.inc","position":69,"original_position":69,"commit_id":"0b505970f1319b5ac10e201ec2639ac03e5d6310","original_commit_id":"0b505970f1319b5ac10e201ec2639ac03e5d6310","user":{"login":"johnsaigle","id":4022790,"node_id":"MDQ6VXNlcjQwMjI3OTA=","avatar_url":"https://avatars0.githubusercontent.com/u/4022790?v=4","gravatar_id":"","url":"https://api.github.com/users/johnsaigle","html_url":"https://github.com/johnsaigle","followers_url":"https://api.github.com/users/johnsaigle/followers","following_url":"https://api.github.com/users/johnsaigle/following{/other_user}","gists_url":"https://api.github.com/users/johnsaigle/gists{/gist_id}","starred_url":"https://api.github.com/users/johnsaigle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnsaigle/subscriptions","organizations_url":"https://api.github.com/users/johnsaigle/orgs","repos_url":"https://api.github.com/users/johnsaigle/repos","events_url":"https://api.github.com/users/johnsaigle/events{/privacy}","received_events_url":"https://api.github.com/users/johnsaigle/received_events","type":"User","site_admin":false},"body":"I think it makes more sense to create private class variables rather than pass `$values` all over the place in this class.","created_at":"2019-09-23T17:00:15Z","updated_at":"2019-09-23T17:00:16Z","html_url":"https://github.com/aces/Loris/pull/5238#discussion_r327225550","pull_request_url":"https://api.github.com/repos/aces/Loris/pulls/5238","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aces/Loris/pulls/comments/327225550"},"html":{"href":"https://github.com/aces/Loris/pull/5238#discussion_r327225550"},"pull_request":{"href":"https://api.github.com/repos/aces/Loris/pulls/5238"}}},"pull_request":{"url":"https://api.github.com/repos/aces/Loris/pulls/5238","id":320365008,"node_id":"MDExOlB1bGxSZXF1ZXN0MzIwMzY1MDA4","html_url":"https://github.com/aces/Loris/pull/5238","diff_url":"https://github.com/aces/Loris/pull/5238.diff","patch_url":"https://github.com/aces/Loris/pull/5238.patch","issue_url":"https://api.github.com/repos/aces/Loris/issues/5238","number":5238,"state":"open","locked":false,"title":"[create_timepoint] upgraded module to use react","user":{"login":"maltheism","id":16293415,"node_id":"MDQ6VXNlcjE2MjkzNDE1","avatar_url":"https://avatars3.githubusercontent.com/u/16293415?v=4","gravatar_id":"","url":"https://api.github.com/users/maltheism","html_url":"https://github.com/maltheism","followers_url":"https://api.github.com/users/maltheism/followers","following_url":"https://api.github.com/users/maltheism/following{/other_user}","gists_url":"https://api.github.com/users/maltheism/gists{/gist_id}","starred_url":"https://api.github.com/users/maltheism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maltheism/subscriptions","organizations_url":"https://api.github.com/users/maltheism/orgs","repos_url":"https://api.github.com/users/maltheism/repos","events_url":"https://api.github.com/users/maltheism/events{/privacy}","received_events_url":"https://api.github.com/users/maltheism/received_events","type":"User","site_admin":false},"body":"### Brief summary of changes\r\n\r\nThis pull request removes smarty and upgrades module to use react. This PR removes the smarty templates and adds a react file for create_timepoint. Also it adds one php file for handling the post messages from the user.\r\n\r\nNote: I changed how the visit label is handled. It's now done on the frontend and so there is no delay for the user.\r\n\r\n### This resolves issue...\r\n\r\n- [x] Redmine? #16008\r\n\r\n### To test this change...\r\n\r\n- [x] Pull the PR and test on your LORIS VM.\r\n\r\nPlease see #5140 4415","created_at":"2019-09-23T15:53:53Z","updated_at":"2019-09-23T17:00:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a0abae94a32396fdd8ae64ac623178499c2a86d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"xlecours","id":12155214,"node_id":"MDQ6VXNlcjEyMTU1MjE0","avatar_url":"https://avatars3.githubusercontent.com/u/12155214?v=4","gravatar_id":"","url":"https://api.github.com/users/xlecours","html_url":"https://github.com/xlecours","followers_url":"https://api.github.com/users/xlecours/followers","following_url":"https://api.github.com/users/xlecours/following{/other_user}","gists_url":"https://api.github.com/users/xlecours/gists{/gist_id}","starred_url":"https://api.github.com/users/xlecours/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xlecours/subscriptions","organizations_url":"https://api.github.com/users/xlecours/orgs","repos_url":"https://api.github.com/users/xlecours/repos","events_url":"https://api.github.com/users/xlecours/events{/privacy}","received_events_url":"https://api.github.com/users/xlecours/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":152314516,"node_id":"MDU6TGFiZWwxNTIzMTQ1MTY=","url":"https://api.github.com/repos/aces/Loris/labels/Cleanup","name":"Cleanup","color":"006b75","default":false},{"id":152305592,"node_id":"MDU6TGFiZWwxNTIzMDU1OTI=","url":"https://api.github.com/repos/aces/Loris/labels/UI","name":"UI","color":"064785","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/aces/Loris/pulls/5238/commits","review_comments_url":"https://api.github.com/repos/aces/Loris/pulls/5238/comments","review_comment_url":"https://api.github.com/repos/aces/Loris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aces/Loris/issues/5238/comments","statuses_url":"https://api.github.com/repos/aces/Loris/statuses/0b505970f1319b5ac10e201ec2639ac03e5d6310","head":{"label":"maltheism:major_create_timepoint_react","ref":"major_create_timepoint_react","sha":"0b505970f1319b5ac10e201ec2639ac03e5d6310","user":{"login":"maltheism","id":16293415,"node_id":"MDQ6VXNlcjE2MjkzNDE1","avatar_url":"https://avatars3.githubusercontent.com/u/16293415?v=4","gravatar_id":"","url":"https://api.github.com/users/maltheism","html_url":"https://github.com/maltheism","followers_url":"https://api.github.com/users/maltheism/followers","following_url":"https://api.github.com/users/maltheism/following{/other_user}","gists_url":"https://api.github.com/users/maltheism/gists{/gist_id}","starred_url":"https://api.github.com/users/maltheism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maltheism/subscriptions","organizations_url":"https://api.github.com/users/maltheism/orgs","repos_url":"https://api.github.com/users/maltheism/repos","events_url":"https://api.github.com/users/maltheism/events{/privacy}","received_events_url":"https://api.github.com/users/maltheism/received_events","type":"User","site_admin":false},"repo":{"id":130723427,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA3MjM0Mjc=","name":"Loris","full_name":"maltheism/Loris","private":false,"owner":{"login":"maltheism","id":16293415,"node_id":"MDQ6VXNlcjE2MjkzNDE1","avatar_url":"https://avatars3.githubusercontent.com/u/16293415?v=4","gravatar_id":"","url":"https://api.github.com/users/maltheism","html_url":"https://github.com/maltheism","followers_url":"https://api.github.com/users/maltheism/followers","following_url":"https://api.github.com/users/maltheism/following{/other_user}","gists_url":"https://api.github.com/users/maltheism/gists{/gist_id}","starred_url":"https://api.github.com/users/maltheism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maltheism/subscriptions","organizations_url":"https://api.github.com/users/maltheism/orgs","repos_url":"https://api.github.com/users/maltheism/repos","events_url":"https://api.github.com/users/maltheism/events{/privacy}","received_events_url":"https://api.github.com/users/maltheism/received_events","type":"User","site_admin":false},"html_url":"https://github.com/maltheism/Loris","description":"LORIS is a web-accessible database solution for longitudinal multi-site studies.","fork":true,"url":"https://api.github.com/repos/maltheism/Loris","forks_url":"https://api.github.com/repos/maltheism/Loris/forks","keys_url":"https://api.github.com/repos/maltheism/Loris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maltheism/Loris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maltheism/Loris/teams","hooks_url":"https://api.github.com/repos/maltheism/Loris/hooks","issue_events_url":"https://api.github.com/repos/maltheism/Loris/issues/events{/number}","events_url":"https://api.github.com/repos/maltheism/Loris/events","assignees_url":"https://api.github.com/repos/maltheism/Loris/assignees{/user}","branches_url":"https://api.github.com/repos/maltheism/Loris/branches{/branch}","tags_url":"https://api.github.com/repos/maltheism/Loris/tags","blobs_url":"https://api.github.com/repos/maltheism/Loris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maltheism/Loris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maltheism/Loris/git/refs{/sha}","trees_url":"https://api.github.com/repos/maltheism/Loris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maltheism/Loris/statuses/{sha}","languages_url":"https://api.github.com/repos/maltheism/Loris/languages","stargazers_url":"https://api.github.com/repos/maltheism/Loris/stargazers","contributors_url":"https://api.github.com/repos/maltheism/Loris/contributors","subscribers_url":"https://api.github.com/repos/maltheism/Loris/subscribers","subscription_url":"https://api.github.com/repos/maltheism/Loris/subscription","commits_url":"https://api.github.com/repos/maltheism/Loris/commits{/sha}","git_commits_url":"https://api.github.com/repos/maltheism/Loris/git/commits{/sha}","comments_url":"https://api.github.com/repos/maltheism/Loris/comments{/number}","issue_comment_url":"https://api.github.com/repos/maltheism/Loris/issues/comments{/number}","contents_url":"https://api.github.com/repos/maltheism/Loris/contents/{+path}","compare_url":"https://api.github.com/repos/maltheism/Loris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maltheism/Loris/merges","archive_url":"https://api.github.com/repos/maltheism/Loris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maltheism/Loris/downloads","issues_url":"https://api.github.com/repos/maltheism/Loris/issues{/number}","pulls_url":"https://api.github.com/repos/maltheism/Loris/pulls{/number}","milestones_url":"https://api.github.com/repos/maltheism/Loris/milestones{/number}","notifications_url":"https://api.github.com/repos/maltheism/Loris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maltheism/Loris/labels{/name}","releases_url":"https://api.github.com/repos/maltheism/Loris/releases{/id}","deployments_url":"https://api.github.com/repos/maltheism/Loris/deployments","created_at":"2018-04-23T16:08:30Z","updated_at":"2019-09-23T14:54:05Z","pushed_at":"2019-09-23T16:52:43Z","git_url":"git://github.com/maltheism/Loris.git","ssh_url":"git@github.com:maltheism/Loris.git","clone_url":"https://github.com/maltheism/Loris.git","svn_url":"https://github.com/maltheism/Loris","homepage":"","size":95559,"stargazers_count":0,"watchers_count":0,"language":"TSQL","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"minor"}},"base":{"label":"aces:major","ref":"major","sha":"ee9d1254603901dc05946b5f3bd58085718b6f7c","user":{"login":"aces","id":472868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3Mjg2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/472868?v=4","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"repo":{"id":1125630,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI1NjMw","name":"Loris","full_name":"aces/Loris","private":false,"owner":{"login":"aces","id":472868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3Mjg2OA==","avatar_url":"https://avatars2.githubusercontent.com/u/472868?v=4","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aces/Loris","description":"LORIS is a web-accessible database solution for longitudinal multi-site studies.","fork":false,"url":"https://api.github.com/repos/aces/Loris","forks_url":"https://api.github.com/repos/aces/Loris/forks","keys_url":"https://api.github.com/repos/aces/Loris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aces/Loris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aces/Loris/teams","hooks_url":"https://api.github.com/repos/aces/Loris/hooks","issue_events_url":"https://api.github.com/repos/aces/Loris/issues/events{/number}","events_url":"https://api.github.com/repos/aces/Loris/events","assignees_url":"https://api.github.com/repos/aces/Loris/assignees{/user}","branches_url":"https://api.github.com/repos/aces/Loris/branches{/branch}","tags_url":"https://api.github.com/repos/aces/Loris/tags","blobs_url":"https://api.github.com/repos/aces/Loris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aces/Loris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aces/Loris/git/refs{/sha}","trees_url":"https://api.github.com/repos/aces/Loris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aces/Loris/statuses/{sha}","languages_url":"https://api.github.com/repos/aces/Loris/languages","stargazers_url":"https://api.github.com/repos/aces/Loris/stargazers","contributors_url":"https://api.github.com/repos/aces/Loris/contributors","subscribers_url":"https://api.github.com/repos/aces/Loris/subscribers","subscription_url":"https://api.github.com/repos/aces/Loris/subscription","commits_url":"https://api.github.com/repos/aces/Loris/commits{/sha}","git_commits_url":"https://api.github.com/repos/aces/Loris/git/commits{/sha}","comments_url":"https://api.github.com/repos/aces/Loris/comments{/number}","issue_comment_url":"https://api.github.com/repos/aces/Loris/issues/comments{/number}","contents_url":"https://api.github.com/repos/aces/Loris/contents/{+path}","compare_url":"https://api.github.com/repos/aces/Loris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aces/Loris/merges","archive_url":"https://api.github.com/repos/aces/Loris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aces/Loris/downloads","issues_url":"https://api.github.com/repos/aces/Loris/issues{/number}","pulls_url":"https://api.github.com/repos/aces/Loris/pulls{/number}","milestones_url":"https://api.github.com/repos/aces/Loris/milestones{/number}","notifications_url":"https://api.github.com/repos/aces/Loris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aces/Loris/labels{/name}","releases_url":"https://api.github.com/repos/aces/Loris/releases{/id}","deployments_url":"https://api.github.com/repos/aces/Loris/deployments","created_at":"2010-11-30T14:57:57Z","updated_at":"2019-09-23T14:43:53Z","pushed_at":"2019-09-23T16:55:23Z","git_url":"git://github.com/aces/Loris.git","ssh_url":"git@github.com:aces/Loris.git","clone_url":"https://github.com/aces/Loris.git","svn_url":"https://github.com/aces/Loris","homepage":"","size":89694,"stargazers_count":77,"watchers_count":77,"language":"TSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":363,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":115,"open_issues":363,"watchers":77,"default_branch":"minor"}},"_links":{"self":{"href":"https://api.github.com/repos/aces/Loris/pulls/5238"},"html":{"href":"https://github.com/aces/Loris/pull/5238"},"issue":{"href":"https://api.github.com/repos/aces/Loris/issues/5238"},"comments":{"href":"https://api.github.com/repos/aces/Loris/issues/5238/comments"},"review_comments":{"href":"https://api.github.com/repos/aces/Loris/pulls/5238/comments"},"review_comment":{"href":"https://api.github.com/repos/aces/Loris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aces/Loris/pulls/5238/commits"},"statuses":{"href":"https://api.github.com/repos/aces/Loris/statuses/0b505970f1319b5ac10e201ec2639ac03e5d6310"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"johnsaigle"}}