{"action":"created","comment":{"url":"https://api.github.com/repos/SlateFoundation/slate/pulls/comments/54953298","id":54953298,"diff_hunk":"@@ -71,4 +71,85 @@ class Report extends \\VersionedRecord\n             'class' => \\Slate\\Term::class\n         ]\n     ];\n-}\n\\ No newline at end of file\n+\n+    public static $searchConditions = array(\n+        'narrativeID' => array(\n+            'qualifiers' => array('narrativeid')\n+            ,'points' => 2\n+            ,'sql' => 'ID=%u'\n+        )\n+        ,'termID' => array(\n+            'qualifiers' => array('termid')\n+            ,'points' => 2\n+            ,'sql' => 'TermID=%u'\n+        )\n+        ,'studentID' => array(\n+            'qualifiers' => array('studentid')\n+            ,'points' => 2\n+            ,'sql' => 'StudentID=%u'\n+        )\n+        ,'authorID' => array(\n+            'qualifiers' => array('authorid')\n+            ,'points' => 2\n+            ,'sql' => 'CreatorID=%u'\n+        )\n+        ,'advisorID' => array(\n+            'qualifiers' => array('advisorid')\n+            ,'points' => 2\n+            ,'sql' => 'StudentID in (Select ID from people where AdvisorID=%u)'\n+        )\n+    );\n+\n+    public static $dynamicFields = array(\n+        'Student'\n+        ,'EmailRecipients' => array(\n+            'method' => 'getEmailRecipients'\n+        )\n+    );\n+\n+    public function getEmailRecipients()\n+    {\n+        $recipients = [];\n+        $student = $this->Student;\n+\n+        if ($student->PrimaryEmailID && \\Validators::email($student->Email))\n+        {\n+            // TODO: do we want the email address or recipient name?\n+            $recipients[] = $student->EmailRecipient;\n+            //$recipients[] = $student->Email;\n+        }\n+\n+        $recipientTypes = explode(',' , $_REQUEST['Recipients']);","path":"php-classes/Slate/Progress/Narratives/Report.php","position":54,"original_position":54,"commit_id":"0d94f9da8a182a3f5af0e488a60b12f5cd5b3b1e","original_commit_id":"0d94f9da8a182a3f5af0e488a60b12f5cd5b3b1e","user":{"login":"themightychris","id":458494,"avatar_url":"https://avatars.githubusercontent.com/u/458494?v=3","gravatar_id":"","url":"https://api.github.com/users/themightychris","html_url":"https://github.com/themightychris","followers_url":"https://api.github.com/users/themightychris/followers","following_url":"https://api.github.com/users/themightychris/following{/other_user}","gists_url":"https://api.github.com/users/themightychris/gists{/gist_id}","starred_url":"https://api.github.com/users/themightychris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themightychris/subscriptions","organizations_url":"https://api.github.com/users/themightychris/orgs","repos_url":"https://api.github.com/users/themightychris/repos","events_url":"https://api.github.com/users/themightychris/events{/privacy}","received_events_url":"https://api.github.com/users/themightychris/received_events","type":"User","site_admin":false},"body":"@BillClinton what's this for? Something is wrong if you're reading `$_REQUEST` from a model","created_at":"2016-03-03T21:43:56Z","updated_at":"2016-03-03T21:43:56Z","html_url":"https://github.com/SlateFoundation/slate/pull/64#discussion_r54953298","pull_request_url":"https://api.github.com/repos/SlateFoundation/slate/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/comments/54953298"},"html":{"href":"https://github.com/SlateFoundation/slate/pull/64#discussion_r54953298"},"pull_request":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/SlateFoundation/slate/pulls/64","id":61630276,"html_url":"https://github.com/SlateFoundation/slate/pull/64","diff_url":"https://github.com/SlateFoundation/slate/pull/64.diff","patch_url":"https://github.com/SlateFoundation/slate/pull/64.patch","issue_url":"https://api.github.com/repos/SlateFoundation/slate/issues/64","number":64,"state":"open","locked":false,"title":"Release: slate v2.1.8","user":{"login":"themightychris","id":458494,"avatar_url":"https://avatars.githubusercontent.com/u/458494?v=3","gravatar_id":"","url":"https://api.github.com/users/themightychris","html_url":"https://github.com/themightychris","followers_url":"https://api.github.com/users/themightychris/followers","following_url":"https://api.github.com/users/themightychris/following{/other_user}","gists_url":"https://api.github.com/users/themightychris/gists{/gist_id}","starred_url":"https://api.github.com/users/themightychris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/themightychris/subscriptions","organizations_url":"https://api.github.com/users/themightychris/orgs","repos_url":"https://api.github.com/users/themightychris/repos","events_url":"https://api.github.com/users/themightychris/events{/privacy}","received_events_url":"https://api.github.com/users/themightychris/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-03T21:43:37Z","updated_at":"2016-03-03T21:43:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00821bea4bc40375e4aceaa636e7090d55203dcc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SlateFoundation/slate/pulls/64/commits","review_comments_url":"https://api.github.com/repos/SlateFoundation/slate/pulls/64/comments","review_comment_url":"https://api.github.com/repos/SlateFoundation/slate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SlateFoundation/slate/issues/64/comments","statuses_url":"https://api.github.com/repos/SlateFoundation/slate/statuses/0d94f9da8a182a3f5af0e488a60b12f5cd5b3b1e","head":{"label":"SlateFoundation:development","ref":"development","sha":"0d94f9da8a182a3f5af0e488a60b12f5cd5b3b1e","user":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":16211083,"name":"slate","full_name":"SlateFoundation/slate","owner":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SlateFoundation/slate","description":"An open-source foundation for schools","fork":false,"url":"https://api.github.com/repos/SlateFoundation/slate","forks_url":"https://api.github.com/repos/SlateFoundation/slate/forks","keys_url":"https://api.github.com/repos/SlateFoundation/slate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SlateFoundation/slate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SlateFoundation/slate/teams","hooks_url":"https://api.github.com/repos/SlateFoundation/slate/hooks","issue_events_url":"https://api.github.com/repos/SlateFoundation/slate/issues/events{/number}","events_url":"https://api.github.com/repos/SlateFoundation/slate/events","assignees_url":"https://api.github.com/repos/SlateFoundation/slate/assignees{/user}","branches_url":"https://api.github.com/repos/SlateFoundation/slate/branches{/branch}","tags_url":"https://api.github.com/repos/SlateFoundation/slate/tags","blobs_url":"https://api.github.com/repos/SlateFoundation/slate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SlateFoundation/slate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SlateFoundation/slate/git/refs{/sha}","trees_url":"https://api.github.com/repos/SlateFoundation/slate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SlateFoundation/slate/statuses/{sha}","languages_url":"https://api.github.com/repos/SlateFoundation/slate/languages","stargazers_url":"https://api.github.com/repos/SlateFoundation/slate/stargazers","contributors_url":"https://api.github.com/repos/SlateFoundation/slate/contributors","subscribers_url":"https://api.github.com/repos/SlateFoundation/slate/subscribers","subscription_url":"https://api.github.com/repos/SlateFoundation/slate/subscription","commits_url":"https://api.github.com/repos/SlateFoundation/slate/commits{/sha}","git_commits_url":"https://api.github.com/repos/SlateFoundation/slate/git/commits{/sha}","comments_url":"https://api.github.com/repos/SlateFoundation/slate/comments{/number}","issue_comment_url":"https://api.github.com/repos/SlateFoundation/slate/issues/comments{/number}","contents_url":"https://api.github.com/repos/SlateFoundation/slate/contents/{+path}","compare_url":"https://api.github.com/repos/SlateFoundation/slate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SlateFoundation/slate/merges","archive_url":"https://api.github.com/repos/SlateFoundation/slate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SlateFoundation/slate/downloads","issues_url":"https://api.github.com/repos/SlateFoundation/slate/issues{/number}","pulls_url":"https://api.github.com/repos/SlateFoundation/slate/pulls{/number}","milestones_url":"https://api.github.com/repos/SlateFoundation/slate/milestones{/number}","notifications_url":"https://api.github.com/repos/SlateFoundation/slate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SlateFoundation/slate/labels{/name}","releases_url":"https://api.github.com/repos/SlateFoundation/slate/releases{/id}","deployments_url":"https://api.github.com/repos/SlateFoundation/slate/deployments","created_at":"2014-01-24T17:12:20Z","updated_at":"2016-01-21T16:49:58Z","pushed_at":"2016-03-03T21:43:37Z","git_url":"git://github.com/SlateFoundation/slate.git","ssh_url":"git@github.com:SlateFoundation/slate.git","clone_url":"https://github.com/SlateFoundation/slate.git","svn_url":"https://github.com/SlateFoundation/slate","homepage":"http://slate.is","size":28580,"stargazers_count":27,"watchers_count":27,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":20,"forks":8,"open_issues":20,"watchers":27,"default_branch":"development"}},"base":{"label":"SlateFoundation:releases/v2","ref":"releases/v2","sha":"f89c663295a69ea281e480d3fecf8c36ed29ea51","user":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":16211083,"name":"slate","full_name":"SlateFoundation/slate","owner":{"login":"SlateFoundation","id":6454564,"avatar_url":"https://avatars.githubusercontent.com/u/6454564?v=3","gravatar_id":"","url":"https://api.github.com/users/SlateFoundation","html_url":"https://github.com/SlateFoundation","followers_url":"https://api.github.com/users/SlateFoundation/followers","following_url":"https://api.github.com/users/SlateFoundation/following{/other_user}","gists_url":"https://api.github.com/users/SlateFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/SlateFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlateFoundation/subscriptions","organizations_url":"https://api.github.com/users/SlateFoundation/orgs","repos_url":"https://api.github.com/users/SlateFoundation/repos","events_url":"https://api.github.com/users/SlateFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/SlateFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SlateFoundation/slate","description":"An open-source foundation for schools","fork":false,"url":"https://api.github.com/repos/SlateFoundation/slate","forks_url":"https://api.github.com/repos/SlateFoundation/slate/forks","keys_url":"https://api.github.com/repos/SlateFoundation/slate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SlateFoundation/slate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SlateFoundation/slate/teams","hooks_url":"https://api.github.com/repos/SlateFoundation/slate/hooks","issue_events_url":"https://api.github.com/repos/SlateFoundation/slate/issues/events{/number}","events_url":"https://api.github.com/repos/SlateFoundation/slate/events","assignees_url":"https://api.github.com/repos/SlateFoundation/slate/assignees{/user}","branches_url":"https://api.github.com/repos/SlateFoundation/slate/branches{/branch}","tags_url":"https://api.github.com/repos/SlateFoundation/slate/tags","blobs_url":"https://api.github.com/repos/SlateFoundation/slate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SlateFoundation/slate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SlateFoundation/slate/git/refs{/sha}","trees_url":"https://api.github.com/repos/SlateFoundation/slate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SlateFoundation/slate/statuses/{sha}","languages_url":"https://api.github.com/repos/SlateFoundation/slate/languages","stargazers_url":"https://api.github.com/repos/SlateFoundation/slate/stargazers","contributors_url":"https://api.github.com/repos/SlateFoundation/slate/contributors","subscribers_url":"https://api.github.com/repos/SlateFoundation/slate/subscribers","subscription_url":"https://api.github.com/repos/SlateFoundation/slate/subscription","commits_url":"https://api.github.com/repos/SlateFoundation/slate/commits{/sha}","git_commits_url":"https://api.github.com/repos/SlateFoundation/slate/git/commits{/sha}","comments_url":"https://api.github.com/repos/SlateFoundation/slate/comments{/number}","issue_comment_url":"https://api.github.com/repos/SlateFoundation/slate/issues/comments{/number}","contents_url":"https://api.github.com/repos/SlateFoundation/slate/contents/{+path}","compare_url":"https://api.github.com/repos/SlateFoundation/slate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SlateFoundation/slate/merges","archive_url":"https://api.github.com/repos/SlateFoundation/slate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SlateFoundation/slate/downloads","issues_url":"https://api.github.com/repos/SlateFoundation/slate/issues{/number}","pulls_url":"https://api.github.com/repos/SlateFoundation/slate/pulls{/number}","milestones_url":"https://api.github.com/repos/SlateFoundation/slate/milestones{/number}","notifications_url":"https://api.github.com/repos/SlateFoundation/slate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SlateFoundation/slate/labels{/name}","releases_url":"https://api.github.com/repos/SlateFoundation/slate/releases{/id}","deployments_url":"https://api.github.com/repos/SlateFoundation/slate/deployments","created_at":"2014-01-24T17:12:20Z","updated_at":"2016-01-21T16:49:58Z","pushed_at":"2016-03-03T21:43:37Z","git_url":"git://github.com/SlateFoundation/slate.git","ssh_url":"git@github.com:SlateFoundation/slate.git","clone_url":"https://github.com/SlateFoundation/slate.git","svn_url":"https://github.com/SlateFoundation/slate","homepage":"http://slate.is","size":28580,"stargazers_count":27,"watchers_count":27,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":20,"forks":8,"open_issues":20,"watchers":27,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/64"},"html":{"href":"https://github.com/SlateFoundation/slate/pull/64"},"issue":{"href":"https://api.github.com/repos/SlateFoundation/slate/issues/64"},"comments":{"href":"https://api.github.com/repos/SlateFoundation/slate/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SlateFoundation/slate/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/SlateFoundation/slate/statuses/0d94f9da8a182a3f5af0e488a60b12f5cd5b3b1e"}}}}