{"action":"created","comment":{"url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/comments/69927445","id":69927445,"diff_hunk":"@@ -0,0 +1,79 @@\n+angular.module('starter')\n+\t\n+\t// Controls the Positive Factors page\n+\t.controller('StudyCtrl', function($scope, $ionicModal, $timeout, measurementService, $ionicLoading,\n+                                         $state, $ionicPopup, correlationService, $rootScope,\n+                                         localStorageService, utilsService, authService, $stateParams) {\n+\n+        $scope.loading = true;\n+        $scope.title = $stateParams.factor;\n+\n+        if(!$rootScope.user){\n+            console.debug(\"studyCtrl: not logged in, going to default state\");\n+            $state.go(config.appSettings.defaultState);\n+            // app wide signal to sibling controllers that the state has changed\n+            $rootScope.$broadcast('transition');\n+        }\n+        \n+\t\t$scope.controller_name = \"StudyCtrl\";\n+        \n+        $scope.init = function(){\n+\n+            var isAuthorized = authService.checkAuthOrSendToLogin();\n+            if (typeof analytics !== 'undefined')  {\n+                analytics.trackView(\"Study Controller\");\n+            }\n+            if (isAuthorized){\n+                if ($stateParams.factorObject) {\n+                    $rootScope.studyPage = {\n+                        factor: $stateParams.factorObject\n+                    };\n+                    $scope.factor = $rootScope.studyPage.factor;\n+                    $scope.title = $scope.factor.cause;\n+                    $scope.showStudy = true;\n+                }\n+                else {\n+                    console.debug(\"studyCtrl: no factor, going to default state\");\n+                    // FIXME go to fromUrl or fromState instead?\n+                    $state.go(config.appSettings.defaultState);\n+                    // app wide signal to sibling controllers that the state has changed\n+                    $rootScope.$broadcast('transition');\n+                }\n+            }\n+            else {\n+                console.debug(\"studyCtrl: not logged in, going to default state\");\n+                $state.go(config.appSettings.defaultState);\n+                // app wide signal to sibling controllers that the state has changed\n+                $rootScope.$broadcast('transition');\n+            }\n+        };\n+\n+        // when view is changed\n+        $scope.$on('$ionicView.enter', function(e){","path":"www/js/controllers/studyCtrl.js","position":52,"original_position":52,"commit_id":"6ec20aa49cad48642bc0e2010eb3122f92ae2cdf","original_commit_id":"6ec20aa49cad48642bc0e2010eb3122f92ae2cdf","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [Strings must use doublequote. (quotes)](https://www.codacy.com/app/m_2/QuantiModo-Ionic-Template-App/file/2934832710/issues/source?bid=3248947&fileBranchId=3413107#l52)","created_at":"2016-07-07T15:24:19Z","updated_at":"2016-07-07T15:24:19Z","html_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265#discussion_r69927445","pull_request_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/comments/69927445"},"html":{"href":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265#discussion_r69927445"},"pull_request":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265","id":76614444,"html_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265","diff_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265.diff","patch_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265.patch","issue_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/265","number":265,"state":"closed","locked":false,"title":"Feature/study page","user":{"login":"KellyStathis","id":17298577,"avatar_url":"https://avatars.githubusercontent.com/u/17298577?v=3","gravatar_id":"","url":"https://api.github.com/users/KellyStathis","html_url":"https://github.com/KellyStathis","followers_url":"https://api.github.com/users/KellyStathis/followers","following_url":"https://api.github.com/users/KellyStathis/following{/other_user}","gists_url":"https://api.github.com/users/KellyStathis/gists{/gist_id}","starred_url":"https://api.github.com/users/KellyStathis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KellyStathis/subscriptions","organizations_url":"https://api.github.com/users/KellyStathis/orgs","repos_url":"https://api.github.com/users/KellyStathis/repos","events_url":"https://api.github.com/users/KellyStathis/events{/privacy}","received_events_url":"https://api.github.com/users/KellyStathis/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-07T15:22:03Z","updated_at":"2016-07-07T15:24:19Z","closed_at":"2016-07-07T15:22:09Z","merged_at":"2016-07-07T15:22:09Z","merge_commit_sha":"554cfde565c2bf67602cc2c964c199a1613d47f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265/commits","review_comments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265/comments","review_comment_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/265/comments","statuses_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/statuses/6ec20aa49cad48642bc0e2010eb3122f92ae2cdf","head":{"label":"Abolitionist-Project:feature/study-page","ref":"feature/study-page","sha":"6ec20aa49cad48642bc0e2010eb3122f92ae2cdf","user":{"login":"Abolitionist-Project","id":5904153,"avatar_url":"https://avatars.githubusercontent.com/u/5904153?v=3","gravatar_id":"","url":"https://api.github.com/users/Abolitionist-Project","html_url":"https://github.com/Abolitionist-Project","followers_url":"https://api.github.com/users/Abolitionist-Project/followers","following_url":"https://api.github.com/users/Abolitionist-Project/following{/other_user}","gists_url":"https://api.github.com/users/Abolitionist-Project/gists{/gist_id}","starred_url":"https://api.github.com/users/Abolitionist-Project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abolitionist-Project/subscriptions","organizations_url":"https://api.github.com/users/Abolitionist-Project/orgs","repos_url":"https://api.github.com/users/Abolitionist-Project/repos","events_url":"https://api.github.com/users/Abolitionist-Project/events{/privacy}","received_events_url":"https://api.github.com/users/Abolitionist-Project/received_events","type":"Organization","site_admin":false},"repo":{"id":41497171,"name":"QuantiModo-Ionic-Template-App","full_name":"Abolitionist-Project/QuantiModo-Ionic-Template-App","owner":{"login":"Abolitionist-Project","id":5904153,"avatar_url":"https://avatars.githubusercontent.com/u/5904153?v=3","gravatar_id":"","url":"https://api.github.com/users/Abolitionist-Project","html_url":"https://github.com/Abolitionist-Project","followers_url":"https://api.github.com/users/Abolitionist-Project/followers","following_url":"https://api.github.com/users/Abolitionist-Project/following{/other_user}","gists_url":"https://api.github.com/users/Abolitionist-Project/gists{/gist_id}","starred_url":"https://api.github.com/users/Abolitionist-Project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abolitionist-Project/subscriptions","organizations_url":"https://api.github.com/users/Abolitionist-Project/orgs","repos_url":"https://api.github.com/users/Abolitionist-Project/repos","events_url":"https://api.github.com/users/Abolitionist-Project/events{/privacy}","received_events_url":"https://api.github.com/users/Abolitionist-Project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App","description":"A generic app that can be easily configured to help the user track and optimize any given outcome variable.","fork":false,"url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App","forks_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/forks","keys_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/teams","hooks_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/hooks","issue_events_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/events{/number}","events_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/events","assignees_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/assignees{/user}","branches_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/branches{/branch}","tags_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/tags","blobs_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/statuses/{sha}","languages_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/languages","stargazers_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/stargazers","contributors_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/contributors","subscribers_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/subscribers","subscription_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/subscription","commits_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/contents/{+path}","compare_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/merges","archive_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/downloads","issues_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues{/number}","pulls_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls{/number}","milestones_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/milestones{/number}","notifications_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/labels{/name}","releases_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/releases{/id}","deployments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/deployments","created_at":"2015-08-27T16:07:22Z","updated_at":"2016-05-12T14:04:42Z","pushed_at":"2016-07-07T15:24:00Z","git_url":"git://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App.git","ssh_url":"git@github.com:Abolitionist-Project/QuantiModo-Ionic-Template-App.git","clone_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App.git","svn_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App","homepage":"https://quantimo.do","size":85753,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"develop"}},"base":{"label":"Abolitionist-Project:develop","ref":"develop","sha":"77f2c502a254b31741cbcbd6743b6ead78435fd5","user":{"login":"Abolitionist-Project","id":5904153,"avatar_url":"https://avatars.githubusercontent.com/u/5904153?v=3","gravatar_id":"","url":"https://api.github.com/users/Abolitionist-Project","html_url":"https://github.com/Abolitionist-Project","followers_url":"https://api.github.com/users/Abolitionist-Project/followers","following_url":"https://api.github.com/users/Abolitionist-Project/following{/other_user}","gists_url":"https://api.github.com/users/Abolitionist-Project/gists{/gist_id}","starred_url":"https://api.github.com/users/Abolitionist-Project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abolitionist-Project/subscriptions","organizations_url":"https://api.github.com/users/Abolitionist-Project/orgs","repos_url":"https://api.github.com/users/Abolitionist-Project/repos","events_url":"https://api.github.com/users/Abolitionist-Project/events{/privacy}","received_events_url":"https://api.github.com/users/Abolitionist-Project/received_events","type":"Organization","site_admin":false},"repo":{"id":41497171,"name":"QuantiModo-Ionic-Template-App","full_name":"Abolitionist-Project/QuantiModo-Ionic-Template-App","owner":{"login":"Abolitionist-Project","id":5904153,"avatar_url":"https://avatars.githubusercontent.com/u/5904153?v=3","gravatar_id":"","url":"https://api.github.com/users/Abolitionist-Project","html_url":"https://github.com/Abolitionist-Project","followers_url":"https://api.github.com/users/Abolitionist-Project/followers","following_url":"https://api.github.com/users/Abolitionist-Project/following{/other_user}","gists_url":"https://api.github.com/users/Abolitionist-Project/gists{/gist_id}","starred_url":"https://api.github.com/users/Abolitionist-Project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abolitionist-Project/subscriptions","organizations_url":"https://api.github.com/users/Abolitionist-Project/orgs","repos_url":"https://api.github.com/users/Abolitionist-Project/repos","events_url":"https://api.github.com/users/Abolitionist-Project/events{/privacy}","received_events_url":"https://api.github.com/users/Abolitionist-Project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App","description":"A generic app that can be easily configured to help the user track and optimize any given outcome variable.","fork":false,"url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App","forks_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/forks","keys_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/teams","hooks_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/hooks","issue_events_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/events{/number}","events_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/events","assignees_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/assignees{/user}","branches_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/branches{/branch}","tags_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/tags","blobs_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/refs{/sha}","trees_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/statuses/{sha}","languages_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/languages","stargazers_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/stargazers","contributors_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/contributors","subscribers_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/subscribers","subscription_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/subscription","commits_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/commits{/sha}","git_commits_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/git/commits{/sha}","comments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/comments{/number}","issue_comment_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/comments{/number}","contents_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/contents/{+path}","compare_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/merges","archive_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/downloads","issues_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues{/number}","pulls_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls{/number}","milestones_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/milestones{/number}","notifications_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/labels{/name}","releases_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/releases{/id}","deployments_url":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/deployments","created_at":"2015-08-27T16:07:22Z","updated_at":"2016-05-12T14:04:42Z","pushed_at":"2016-07-07T15:24:00Z","git_url":"git://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App.git","ssh_url":"git@github.com:Abolitionist-Project/QuantiModo-Ionic-Template-App.git","clone_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App.git","svn_url":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App","homepage":"https://quantimo.do","size":85753,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265"},"html":{"href":"https://github.com/Abolitionist-Project/QuantiModo-Ionic-Template-App/pull/265"},"issue":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/265"},"comments":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/Abolitionist-Project/QuantiModo-Ionic-Template-App/statuses/6ec20aa49cad48642bc0e2010eb3122f92ae2cdf"}}}}
{"actor":{"display_login":"codacy-bot"}}