{"action":"created","comment":{"url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/comments/34411839","id":34411839,"diff_hunk":"@@ -679,5 +751,236 @@ public function toJsonObject($relations = true)\n         $object->name = $this->getName();\r\n         return $object;\r\n     }\r\n+    \r\n+    /**\r\n+     * Биография\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getBiography() {\r\n+    \t$result = new CArrayList();\r\n+    \tforeach ($this->biography->getItems() as $biography) {\r\n+    \t\t$result->add($biography->getId(), $biography);\r\n+    \t}\r\n+    \treturn $result;\r\n+    }\r\n+    \r\n+    /**\r\n+     * Дипломники текущего учебного года\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getGraduatesCurrentYear() {\r\n+    \tif (is_null($this->_graduatesCurrentYear)) {\r\n+    \t\t$this->_graduatesCurrentYear = new CArrayList();\r\n+    \t\t$query = new CQuery();\r\n+    \t\t$query->select(\"diploms.*\")\r\n+\t    \t\t->from(TABLE_DIPLOMS.\" as diploms\")\r\n+\t    \t\t->leftJoin(TABLE_STUDENTS.\" as students\", \"diploms.student_id=students.id\")\r\n+\t    \t\t->condition('kadri_id = \"'.$this->id.'\" and (date_act>=\"'.CUtils::getCurrentYear()->date_start.'\" or date_act is NULL)')\r\n+\t    \t\t->order(\"students.fio asc\");\r\n+    \t\tforeach ($query->execute()->getItems() as $item) {\r\n+    \t\t\t$diplom = new CDiplom(new CActiveRecord($item));\r\n+    \t\t\t$this->_graduatesCurrentYear->add($diplom->getId(), $diplom);\r\n+    \t\t}\r\n+    \t}\r\n+    \treturn $this->_graduatesCurrentYear;\r\n+    }\r\n+    /**\r\n+     * Дипломники предыдущих учебных лет\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getGraduatesOld() {\r\n+    \tif (is_null($this->_graduatesOld)) {\r\n+    \t\t$this->_graduatesOld = new CArrayList();\r\n+   \t\t\t$query = new CQuery();\r\n+\t    \t$query->select(\"diploms.*\")\r\n+\t\t    \t->from(TABLE_DIPLOMS.\" as diploms\")\r\n+\t\t    \t->leftJoin(TABLE_STUDENTS.\" as students\", \"diploms.student_id=students.id\")\r\n+\t\t    \t->condition('kadri_id = \"'.$this->id.'\" and date_act<\"'.CUtils::getCurrentYear()->date_start.'\"')\r\n+\t\t    \t->order(\"students.fio asc\");\r\n+    \t\tforeach ($query->execute()->getItems() as $item) {\r\n+    \t\t\t$diplom = new CDiplom(new CActiveRecord($item));\r\n+    \t\t\t$this->_graduatesOld->add($diplom->getId(), $diplom);\r\n+    \t\t}\r\n+    \t}\r\n+    \treturn $this->_graduatesOld;\r\n+    }\r\n+    /**\r\n+     * Предметы\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getDoc() {\r\n+    \t$result = new CArrayList();\r\n+    \tforeach ($this->documents->getItems() as $document) {\r\n+    \t\t$result->add($document->getId(), $document);\r\n+    \t}\r\n+    \treturn $result;\r\n+    }\r\n+    \r\n+    /**\r\n+     * Объявления\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getNews() {\r\n+    \t$result = new CArrayList();\r\n+    \tforeach ($this->news->getItems() as $new) {\r\n+    \t\t$result->add($new->getId(), $new);\r\n+    \t}\r\n+    \treturn $result;\r\n+    }\r\n+    \r\n+    /**\r\n+     * Объявления текущего учебного года\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getNewsCurrentYear() {\r\n+    \t$result = new CArrayList();\r\n+    \tforeach ($this->newsCurrentYear->getItems() as $new) {\r\n+    \t\t$result->add($new->getId(), $new);\r\n+    \t}\r\n+    \treturn $result;\r\n+    }\r\n+    \r\n+    /**\r\n+     * Объявления прошлых учебных лет\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getNewsOld() {\r\n+    \t$result = new CArrayList();\r\n+    \tforeach ($this->newsOld->getItems() as $new) {\r\n+    \t\t$result->add($new->getId(), $new);\r\n+    \t}\r\n+    \treturn $result;\r\n+    }\r\n+    \r\n+    /**\r\n+     * Расписание\r\n+     * \r\n+     * @return CArrayList\r\n+     */\r\n+    public function getTime() {\r","path":"_core/_models/staff/CPerson.class.php","position":205,"original_position":205,"commit_id":"63d54268177207c21d6cb07c11f7bff86f4fe75e","original_commit_id":"63d54268177207c21d6cb07c11f7bff86f4fe75e","user":{"login":"alexbarmin","id":965970,"avatar_url":"https://avatars.githubusercontent.com/u/965970?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbarmin","html_url":"https://github.com/alexbarmin","followers_url":"https://api.github.com/users/alexbarmin/followers","following_url":"https://api.github.com/users/alexbarmin/following{/other_user}","gists_url":"https://api.github.com/users/alexbarmin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbarmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbarmin/subscriptions","organizations_url":"https://api.github.com/users/alexbarmin/orgs","repos_url":"https://api.github.com/users/alexbarmin/repos","events_url":"https://api.github.com/users/alexbarmin/events{/privacy}","received_events_url":"https://api.github.com/users/alexbarmin/received_events","type":"User","site_admin":false},"body":"getTime - это дайВремя, а не дайРасписание","created_at":"2015-07-11T11:09:49Z","updated_at":"2015-07-11T11:09:49Z","html_url":"https://github.com/ASUPortal/ASUPortalPHP/pull/61#discussion_r34411839","pull_request_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/comments/34411839"},"html":{"href":"https://github.com/ASUPortal/ASUPortalPHP/pull/61#discussion_r34411839"},"pull_request":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61","id":38730060,"html_url":"https://github.com/ASUPortal/ASUPortalPHP/pull/61","diff_url":"https://github.com/ASUPortal/ASUPortalPHP/pull/61.diff","patch_url":"https://github.com/ASUPortal/ASUPortalPHP/pull/61.patch","issue_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/61","number":61,"state":"open","locked":false,"title":"Страница Преподаватели","user":{"login":"shamidanow","id":9052480,"avatar_url":"https://avatars.githubusercontent.com/u/9052480?v=3","gravatar_id":"","url":"https://api.github.com/users/shamidanow","html_url":"https://github.com/shamidanow","followers_url":"https://api.github.com/users/shamidanow/followers","following_url":"https://api.github.com/users/shamidanow/following{/other_user}","gists_url":"https://api.github.com/users/shamidanow/gists{/gist_id}","starred_url":"https://api.github.com/users/shamidanow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamidanow/subscriptions","organizations_url":"https://api.github.com/users/shamidanow/orgs","repos_url":"https://api.github.com/users/shamidanow/repos","events_url":"https://api.github.com/users/shamidanow/events{/privacy}","received_events_url":"https://api.github.com/users/shamidanow/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-28T18:57:27Z","updated_at":"2015-07-11T11:09:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71c8266dd8810829e3cdf50e92a1f08f0d4333ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61/commits","review_comments_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61/comments","review_comment_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/61/comments","statuses_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/statuses/63d54268177207c21d6cb07c11f7bff86f4fe75e","head":{"label":"shamidanow:master","ref":"master","sha":"63d54268177207c21d6cb07c11f7bff86f4fe75e","user":{"login":"shamidanow","id":9052480,"avatar_url":"https://avatars.githubusercontent.com/u/9052480?v=3","gravatar_id":"","url":"https://api.github.com/users/shamidanow","html_url":"https://github.com/shamidanow","followers_url":"https://api.github.com/users/shamidanow/followers","following_url":"https://api.github.com/users/shamidanow/following{/other_user}","gists_url":"https://api.github.com/users/shamidanow/gists{/gist_id}","starred_url":"https://api.github.com/users/shamidanow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamidanow/subscriptions","organizations_url":"https://api.github.com/users/shamidanow/orgs","repos_url":"https://api.github.com/users/shamidanow/repos","events_url":"https://api.github.com/users/shamidanow/events{/privacy}","received_events_url":"https://api.github.com/users/shamidanow/received_events","type":"User","site_admin":false},"repo":{"id":25765758,"name":"ASUPortalPHP","full_name":"shamidanow/ASUPortalPHP","owner":{"login":"shamidanow","id":9052480,"avatar_url":"https://avatars.githubusercontent.com/u/9052480?v=3","gravatar_id":"","url":"https://api.github.com/users/shamidanow","html_url":"https://github.com/shamidanow","followers_url":"https://api.github.com/users/shamidanow/followers","following_url":"https://api.github.com/users/shamidanow/following{/other_user}","gists_url":"https://api.github.com/users/shamidanow/gists{/gist_id}","starred_url":"https://api.github.com/users/shamidanow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamidanow/subscriptions","organizations_url":"https://api.github.com/users/shamidanow/orgs","repos_url":"https://api.github.com/users/shamidanow/repos","events_url":"https://api.github.com/users/shamidanow/events{/privacy}","received_events_url":"https://api.github.com/users/shamidanow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shamidanow/ASUPortalPHP","description":"","fork":true,"url":"https://api.github.com/repos/shamidanow/ASUPortalPHP","forks_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/forks","keys_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/teams","hooks_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/hooks","issue_events_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/issues/events{/number}","events_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/events","assignees_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/assignees{/user}","branches_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/branches{/branch}","tags_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/tags","blobs_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/git/refs{/sha}","trees_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/statuses/{sha}","languages_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/languages","stargazers_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/stargazers","contributors_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/contributors","subscribers_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/subscribers","subscription_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/subscription","commits_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/commits{/sha}","git_commits_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/git/commits{/sha}","comments_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/comments{/number}","issue_comment_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/issues/comments{/number}","contents_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/contents/{+path}","compare_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/merges","archive_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/downloads","issues_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/issues{/number}","pulls_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/pulls{/number}","milestones_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/milestones{/number}","notifications_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/labels{/name}","releases_url":"https://api.github.com/repos/shamidanow/ASUPortalPHP/releases{/id}","created_at":"2014-10-26T09:43:08Z","updated_at":"2015-04-27T11:37:01Z","pushed_at":"2015-07-04T19:49:23Z","git_url":"git://github.com/shamidanow/ASUPortalPHP.git","ssh_url":"git@github.com:shamidanow/ASUPortalPHP.git","clone_url":"https://github.com/shamidanow/ASUPortalPHP.git","svn_url":"https://github.com/shamidanow/ASUPortalPHP","homepage":null,"size":116721,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ASUPortal:master","ref":"master","sha":"760bf36443e081b3c15d767c1a3408c47eef0bd7","user":{"login":"ASUPortal","id":8296512,"avatar_url":"https://avatars.githubusercontent.com/u/8296512?v=3","gravatar_id":"","url":"https://api.github.com/users/ASUPortal","html_url":"https://github.com/ASUPortal","followers_url":"https://api.github.com/users/ASUPortal/followers","following_url":"https://api.github.com/users/ASUPortal/following{/other_user}","gists_url":"https://api.github.com/users/ASUPortal/gists{/gist_id}","starred_url":"https://api.github.com/users/ASUPortal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASUPortal/subscriptions","organizations_url":"https://api.github.com/users/ASUPortal/orgs","repos_url":"https://api.github.com/users/ASUPortal/repos","events_url":"https://api.github.com/users/ASUPortal/events{/privacy}","received_events_url":"https://api.github.com/users/ASUPortal/received_events","type":"User","site_admin":false},"repo":{"id":8646816,"name":"ASUPortalPHP","full_name":"ASUPortal/ASUPortalPHP","owner":{"login":"ASUPortal","id":8296512,"avatar_url":"https://avatars.githubusercontent.com/u/8296512?v=3","gravatar_id":"","url":"https://api.github.com/users/ASUPortal","html_url":"https://github.com/ASUPortal","followers_url":"https://api.github.com/users/ASUPortal/followers","following_url":"https://api.github.com/users/ASUPortal/following{/other_user}","gists_url":"https://api.github.com/users/ASUPortal/gists{/gist_id}","starred_url":"https://api.github.com/users/ASUPortal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASUPortal/subscriptions","organizations_url":"https://api.github.com/users/ASUPortal/orgs","repos_url":"https://api.github.com/users/ASUPortal/repos","events_url":"https://api.github.com/users/ASUPortal/events{/privacy}","received_events_url":"https://api.github.com/users/ASUPortal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ASUPortal/ASUPortalPHP","description":"","fork":false,"url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP","forks_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/forks","keys_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/teams","hooks_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/hooks","issue_events_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/events{/number}","events_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/events","assignees_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/assignees{/user}","branches_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/branches{/branch}","tags_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/tags","blobs_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/git/refs{/sha}","trees_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/statuses/{sha}","languages_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/languages","stargazers_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/stargazers","contributors_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/contributors","subscribers_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/subscribers","subscription_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/subscription","commits_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/commits{/sha}","git_commits_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/git/commits{/sha}","comments_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/comments{/number}","issue_comment_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/comments{/number}","contents_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/contents/{+path}","compare_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/merges","archive_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/downloads","issues_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues{/number}","pulls_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls{/number}","milestones_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/milestones{/number}","notifications_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/labels{/name}","releases_url":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/releases{/id}","created_at":"2013-03-08T08:26:07Z","updated_at":"2015-04-27T11:54:18Z","pushed_at":"2015-07-04T19:49:23Z","git_url":"git://github.com/ASUPortal/ASUPortalPHP.git","ssh_url":"git@github.com:ASUPortal/ASUPortalPHP.git","clone_url":"https://github.com/ASUPortal/ASUPortalPHP.git","svn_url":"https://github.com/ASUPortal/ASUPortalPHP","homepage":null,"size":122481,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61"},"html":{"href":"https://github.com/ASUPortal/ASUPortalPHP/pull/61"},"issue":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/61"},"comments":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/ASUPortal/ASUPortalPHP/statuses/63d54268177207c21d6cb07c11f7bff86f4fe75e"}}}}