{"action":"created","comment":{"url":"https://api.github.com/repos/omegaup/omegaup/pulls/comments/171881946","pull_request_review_id":100815210,"id":171881946,"diff_hunk":"@@ -148,4 +148,29 @@ public static function getHideTags($user_id) {\n         global $conn;\n         return $conn->GetOne($sql, $params);\n     }\n+    \n+    public static function getRankingClassName($user_id){\n+        $sql = 'SELECT\n+                    `urc`.`classname`,\n+                    `urc`.`score`,\n+                    `urc`.`percentile`\n+                FROM\n+                    `User_Rank_Cutoffs` `urc`\n+                WHERE\n+                    `urc`.score` =< (\n+                        SELECT\n+                            `ur`.`score`\n+                        FROM\n+                            `User_Rank` `ur`\n+                        WHERE\n+                            `ur`.user_id` = ?\n+                    )\n+                ORDER BY\n+                    `urc`.`percentile` ASC\n+                LIMIT\n+                    1';","path":"frontend/server/libs/dao/Users.dao.php","position":24,"original_position":24,"commit_id":"7ebdc440281e756071e78f0174c84812f4a6bb69","original_commit_id":"7ebdc440281e756071e78f0174c84812f4a6bb69","user":{"login":"lhchavez","id":168028,"avatar_url":"https://avatars0.githubusercontent.com/u/168028?v=4","gravatar_id":"","url":"https://api.github.com/users/lhchavez","html_url":"https://github.com/lhchavez","followers_url":"https://api.github.com/users/lhchavez/followers","following_url":"https://api.github.com/users/lhchavez/following{/other_user}","gists_url":"https://api.github.com/users/lhchavez/gists{/gist_id}","starred_url":"https://api.github.com/users/lhchavez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhchavez/subscriptions","organizations_url":"https://api.github.com/users/lhchavez/orgs","repos_url":"https://api.github.com/users/lhchavez/repos","events_url":"https://api.github.com/users/lhchavez/events{/privacy}","received_events_url":"https://api.github.com/users/lhchavez/received_events","type":"User","site_admin":false},"body":"Can you re-add the semicolon at the end of the query?","created_at":"2018-03-02T15:46:19Z","updated_at":"2018-03-02T15:47:55Z","html_url":"https://github.com/omegaup/omegaup/pull/1792#discussion_r171881946","pull_request_url":"https://api.github.com/repos/omegaup/omegaup/pulls/1792","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/comments/171881946"},"html":{"href":"https://github.com/omegaup/omegaup/pull/1792#discussion_r171881946"},"pull_request":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/1792"}}},"pull_request":{"url":"https://api.github.com/repos/omegaup/omegaup/pulls/1792","id":172269194,"html_url":"https://github.com/omegaup/omegaup/pull/1792","diff_url":"https://github.com/omegaup/omegaup/pull/1792.diff","patch_url":"https://github.com/omegaup/omegaup/pull/1792.patch","issue_url":"https://api.github.com/repos/omegaup/omegaup/issues/1792","number":1792,"state":"open","locked":false,"title":"[Color Hierarchy] make apiProfile() return user's color #1771","user":{"login":"randika96","id":36238140,"avatar_url":"https://avatars0.githubusercontent.com/u/36238140?v=4","gravatar_id":"","url":"https://api.github.com/users/randika96","html_url":"https://github.com/randika96","followers_url":"https://api.github.com/users/randika96/followers","following_url":"https://api.github.com/users/randika96/following{/other_user}","gists_url":"https://api.github.com/users/randika96/gists{/gist_id}","starred_url":"https://api.github.com/users/randika96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randika96/subscriptions","organizations_url":"https://api.github.com/users/randika96/orgs","repos_url":"https://api.github.com/users/randika96/repos","events_url":"https://api.github.com/users/randika96/events{/privacy}","received_events_url":"https://api.github.com/users/randika96/received_events","type":"User","site_admin":false},"body":"Modified `apiProfile()` to return the CSS class name with userinfo. \r\nIn oder to do that I declared a new function in `Users.dao.php` to compute appropriate class name when user name is given. And call it from `aprProfile()` and update userinfo.","created_at":"2018-03-01T15:30:18Z","updated_at":"2018-03-02T15:47:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7ff8aa4ee135577aa8c4eeb1aa4435f0cd024af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/omegaup/omegaup/pulls/1792/commits","review_comments_url":"https://api.github.com/repos/omegaup/omegaup/pulls/1792/comments","review_comment_url":"https://api.github.com/repos/omegaup/omegaup/pulls/comments{/number}","comments_url":"https://api.github.com/repos/omegaup/omegaup/issues/1792/comments","statuses_url":"https://api.github.com/repos/omegaup/omegaup/statuses/7ebdc440281e756071e78f0174c84812f4a6bb69","head":{"label":"randika96:master","ref":"master","sha":"7ebdc440281e756071e78f0174c84812f4a6bb69","user":{"login":"randika96","id":36238140,"avatar_url":"https://avatars0.githubusercontent.com/u/36238140?v=4","gravatar_id":"","url":"https://api.github.com/users/randika96","html_url":"https://github.com/randika96","followers_url":"https://api.github.com/users/randika96/followers","following_url":"https://api.github.com/users/randika96/following{/other_user}","gists_url":"https://api.github.com/users/randika96/gists{/gist_id}","starred_url":"https://api.github.com/users/randika96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randika96/subscriptions","organizations_url":"https://api.github.com/users/randika96/orgs","repos_url":"https://api.github.com/users/randika96/repos","events_url":"https://api.github.com/users/randika96/events{/privacy}","received_events_url":"https://api.github.com/users/randika96/received_events","type":"User","site_admin":false},"repo":{"id":122934552,"name":"omegaup","full_name":"randika96/omegaup","owner":{"login":"randika96","id":36238140,"avatar_url":"https://avatars0.githubusercontent.com/u/36238140?v=4","gravatar_id":"","url":"https://api.github.com/users/randika96","html_url":"https://github.com/randika96","followers_url":"https://api.github.com/users/randika96/followers","following_url":"https://api.github.com/users/randika96/following{/other_user}","gists_url":"https://api.github.com/users/randika96/gists{/gist_id}","starred_url":"https://api.github.com/users/randika96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randika96/subscriptions","organizations_url":"https://api.github.com/users/randika96/orgs","repos_url":"https://api.github.com/users/randika96/repos","events_url":"https://api.github.com/users/randika96/events{/privacy}","received_events_url":"https://api.github.com/users/randika96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/randika96/omegaup","description":"omegaUp automatic programming contest evaluator & arena","fork":true,"url":"https://api.github.com/repos/randika96/omegaup","forks_url":"https://api.github.com/repos/randika96/omegaup/forks","keys_url":"https://api.github.com/repos/randika96/omegaup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/randika96/omegaup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/randika96/omegaup/teams","hooks_url":"https://api.github.com/repos/randika96/omegaup/hooks","issue_events_url":"https://api.github.com/repos/randika96/omegaup/issues/events{/number}","events_url":"https://api.github.com/repos/randika96/omegaup/events","assignees_url":"https://api.github.com/repos/randika96/omegaup/assignees{/user}","branches_url":"https://api.github.com/repos/randika96/omegaup/branches{/branch}","tags_url":"https://api.github.com/repos/randika96/omegaup/tags","blobs_url":"https://api.github.com/repos/randika96/omegaup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/randika96/omegaup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/randika96/omegaup/git/refs{/sha}","trees_url":"https://api.github.com/repos/randika96/omegaup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/randika96/omegaup/statuses/{sha}","languages_url":"https://api.github.com/repos/randika96/omegaup/languages","stargazers_url":"https://api.github.com/repos/randika96/omegaup/stargazers","contributors_url":"https://api.github.com/repos/randika96/omegaup/contributors","subscribers_url":"https://api.github.com/repos/randika96/omegaup/subscribers","subscription_url":"https://api.github.com/repos/randika96/omegaup/subscription","commits_url":"https://api.github.com/repos/randika96/omegaup/commits{/sha}","git_commits_url":"https://api.github.com/repos/randika96/omegaup/git/commits{/sha}","comments_url":"https://api.github.com/repos/randika96/omegaup/comments{/number}","issue_comment_url":"https://api.github.com/repos/randika96/omegaup/issues/comments{/number}","contents_url":"https://api.github.com/repos/randika96/omegaup/contents/{+path}","compare_url":"https://api.github.com/repos/randika96/omegaup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/randika96/omegaup/merges","archive_url":"https://api.github.com/repos/randika96/omegaup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/randika96/omegaup/downloads","issues_url":"https://api.github.com/repos/randika96/omegaup/issues{/number}","pulls_url":"https://api.github.com/repos/randika96/omegaup/pulls{/number}","milestones_url":"https://api.github.com/repos/randika96/omegaup/milestones{/number}","notifications_url":"https://api.github.com/repos/randika96/omegaup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/randika96/omegaup/labels{/name}","releases_url":"https://api.github.com/repos/randika96/omegaup/releases{/id}","deployments_url":"https://api.github.com/repos/randika96/omegaup/deployments","created_at":"2018-02-26T08:01:35Z","updated_at":"2018-02-26T08:01:40Z","pushed_at":"2018-03-02T05:47:06Z","git_url":"git://github.com/randika96/omegaup.git","ssh_url":"git@github.com:randika96/omegaup.git","clone_url":"https://github.com/randika96/omegaup.git","svn_url":"https://github.com/randika96/omegaup","homepage":"https://omegaup.com","size":225206,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"omegaup:master","ref":"master","sha":"a62d6663d7cf8bada2ce4a659a146efd8dd71999","user":{"login":"omegaup","id":558429,"avatar_url":"https://avatars0.githubusercontent.com/u/558429?v=4","gravatar_id":"","url":"https://api.github.com/users/omegaup","html_url":"https://github.com/omegaup","followers_url":"https://api.github.com/users/omegaup/followers","following_url":"https://api.github.com/users/omegaup/following{/other_user}","gists_url":"https://api.github.com/users/omegaup/gists{/gist_id}","starred_url":"https://api.github.com/users/omegaup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omegaup/subscriptions","organizations_url":"https://api.github.com/users/omegaup/orgs","repos_url":"https://api.github.com/users/omegaup/repos","events_url":"https://api.github.com/users/omegaup/events{/privacy}","received_events_url":"https://api.github.com/users/omegaup/received_events","type":"Organization","site_admin":false},"repo":{"id":1243685,"name":"omegaup","full_name":"omegaup/omegaup","owner":{"login":"omegaup","id":558429,"avatar_url":"https://avatars0.githubusercontent.com/u/558429?v=4","gravatar_id":"","url":"https://api.github.com/users/omegaup","html_url":"https://github.com/omegaup","followers_url":"https://api.github.com/users/omegaup/followers","following_url":"https://api.github.com/users/omegaup/following{/other_user}","gists_url":"https://api.github.com/users/omegaup/gists{/gist_id}","starred_url":"https://api.github.com/users/omegaup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omegaup/subscriptions","organizations_url":"https://api.github.com/users/omegaup/orgs","repos_url":"https://api.github.com/users/omegaup/repos","events_url":"https://api.github.com/users/omegaup/events{/privacy}","received_events_url":"https://api.github.com/users/omegaup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/omegaup/omegaup","description":"omegaUp automatic programming contest evaluator & arena","fork":false,"url":"https://api.github.com/repos/omegaup/omegaup","forks_url":"https://api.github.com/repos/omegaup/omegaup/forks","keys_url":"https://api.github.com/repos/omegaup/omegaup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omegaup/omegaup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omegaup/omegaup/teams","hooks_url":"https://api.github.com/repos/omegaup/omegaup/hooks","issue_events_url":"https://api.github.com/repos/omegaup/omegaup/issues/events{/number}","events_url":"https://api.github.com/repos/omegaup/omegaup/events","assignees_url":"https://api.github.com/repos/omegaup/omegaup/assignees{/user}","branches_url":"https://api.github.com/repos/omegaup/omegaup/branches{/branch}","tags_url":"https://api.github.com/repos/omegaup/omegaup/tags","blobs_url":"https://api.github.com/repos/omegaup/omegaup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omegaup/omegaup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omegaup/omegaup/git/refs{/sha}","trees_url":"https://api.github.com/repos/omegaup/omegaup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omegaup/omegaup/statuses/{sha}","languages_url":"https://api.github.com/repos/omegaup/omegaup/languages","stargazers_url":"https://api.github.com/repos/omegaup/omegaup/stargazers","contributors_url":"https://api.github.com/repos/omegaup/omegaup/contributors","subscribers_url":"https://api.github.com/repos/omegaup/omegaup/subscribers","subscription_url":"https://api.github.com/repos/omegaup/omegaup/subscription","commits_url":"https://api.github.com/repos/omegaup/omegaup/commits{/sha}","git_commits_url":"https://api.github.com/repos/omegaup/omegaup/git/commits{/sha}","comments_url":"https://api.github.com/repos/omegaup/omegaup/comments{/number}","issue_comment_url":"https://api.github.com/repos/omegaup/omegaup/issues/comments{/number}","contents_url":"https://api.github.com/repos/omegaup/omegaup/contents/{+path}","compare_url":"https://api.github.com/repos/omegaup/omegaup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omegaup/omegaup/merges","archive_url":"https://api.github.com/repos/omegaup/omegaup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omegaup/omegaup/downloads","issues_url":"https://api.github.com/repos/omegaup/omegaup/issues{/number}","pulls_url":"https://api.github.com/repos/omegaup/omegaup/pulls{/number}","milestones_url":"https://api.github.com/repos/omegaup/omegaup/milestones{/number}","notifications_url":"https://api.github.com/repos/omegaup/omegaup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omegaup/omegaup/labels{/name}","releases_url":"https://api.github.com/repos/omegaup/omegaup/releases{/id}","deployments_url":"https://api.github.com/repos/omegaup/omegaup/deployments","created_at":"2011-01-12T00:11:21Z","updated_at":"2018-03-02T05:27:38Z","pushed_at":"2018-03-02T15:05:42Z","git_url":"git://github.com/omegaup/omegaup.git","ssh_url":"git@github.com:omegaup/omegaup.git","clone_url":"https://github.com/omegaup/omegaup.git","svn_url":"https://github.com/omegaup/omegaup","homepage":"https://omegaup.com","size":225170,"stargazers_count":48,"watchers_count":48,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":219,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":71,"open_issues":219,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/1792"},"html":{"href":"https://github.com/omegaup/omegaup/pull/1792"},"issue":{"href":"https://api.github.com/repos/omegaup/omegaup/issues/1792"},"comments":{"href":"https://api.github.com/repos/omegaup/omegaup/issues/1792/comments"},"review_comments":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/1792/comments"},"review_comment":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/omegaup/omegaup/pulls/1792/commits"},"statuses":{"href":"https://api.github.com/repos/omegaup/omegaup/statuses/7ebdc440281e756071e78f0174c84812f4a6bb69"}},"author_association":"NONE"}}
{"actor":{"display_login":"lhchavez"}}