{"action":"created","comment":{"url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/comments/53554240","id":53554240,"diff_hunk":"@@ -0,0 +1,432 @@\n+<?php\n+\n+$include_path = get_include_path();\n+include_once $include_path . '/includes/db_functions.php';\n+include_once $include_path . '/includes/session_functions.php';\n+include_once $include_path . '/public_html/classes/AllClasses.php';\n+include_once $include_path . '/public_html/requests/core.php';\n+\n+$requestType = filter_input(INPUT_POST,'type',FILTER_SANITIZE_STRING);\n+$startDate = filter_input(INPUT_POST,'startDate',FILTER_SANITIZE_STRING);\n+$endDate = filter_input(INPUT_POST,'endDate',FILTER_SANITIZE_STRING);\n+$studentId = filter_input(INPUT_POST,'student',FILTER_SANITIZE_NUMBER_INT);\n+$staffId = filter_input(INPUT_POST,'staff',FILTER_SANITIZE_NUMBER_INT);\n+$setId = filter_input(INPUT_POST,'set',FILTER_SANITIZE_NUMBER_INT);\n+//$tagsArrayString = filter_input(INPUT_POST,'tags',FILTER_SANITIZE_STRING);\n+\n+//$requestType = \"STUDENTREPORT\";\n+//$startDate = \"01/01/2016\";\n+//$endDate = \"01/03/2016\";\n+//$studentId = 291;\n+//$staffId = 1;\n+//$setId = 411;\n+$tagsArrayString = \"\";\n+$questions = [];\n+$tags = [];\n+$reliabilityConstant = 0.2;\n+$reliabilityBase = 0.2;\n+$diffRelWeight = 1;\n+$userRelWeight = 1;\n+$numRelWeight = 2;\n+$quesRelWeight = 1;\n+$timeBase = 0.1;\n+$timeConstant = 0.0004;\n+\n+switch ($requestType){\n+    case \"STUDENTREPORT\":\n+        getReportForStudent($startDate, $endDate, $studentId, $setId, $staffId, $tagsArrayString);\n+        break;\n+    default:\n+        break;\n+}\n+\n+function getReportForStudent($startDate, $endDate, $studentId, $setId, $staffId, $tagsArrayString){\n+    global $questions, $returns, $tags;\n+    \n+    validateAndReturnInputs($startDate, $endDate, $studentId, $setId, $staffId, $tagsArrayString);\n+    unset($startDate, $endDate, $studentId, $setId, $staffId, $tagsArrayString);\n+    \n+    //$relevantTags = createRelevantTags($returns);\n+    //createRelevantQuestions($returns);\n+    getAnsweredQuestions();\n+    \n+    if(count($questions) === 0){\n+        succeedRequest(null);\n+    }\n+    //getGlobalStandard($relevantQuestions);\n+    setDifficultyScores();","path":"public_html/requests/getStudentSummary.php","position":57,"original_position":57,"commit_id":"06c9c5695abe806066f740575286ee7fe9526190","original_commit_id":"06c9c5695abe806066f740575286ee7fe9526190","user":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"body":"Remove unnecessary lines","created_at":"2016-02-20T17:49:41Z","updated_at":"2016-02-20T17:49:41Z","html_url":"https://github.com/benwhite10/Smarkbook/pull/21#discussion_r53554240","pull_request_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/comments/53554240"},"html":{"href":"https://github.com/benwhite10/Smarkbook/pull/21#discussion_r53554240"},"pull_request":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21","id":60054254,"html_url":"https://github.com/benwhite10/Smarkbook/pull/21","diff_url":"https://github.com/benwhite10/Smarkbook/pull/21.diff","patch_url":"https://github.com/benwhite10/Smarkbook/pull/21.patch","issue_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/21","number":21,"state":"open","locked":false,"title":"Add basic student reports","user":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"body":"First stage of addition of reports for students. Includes a request to get the reports and the first iteration of a user interface to display them.","created_at":"2016-02-20T17:25:52Z","updated_at":"2016-02-20T17:49:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5100d582bb414bf76358cea77bea02117ae237b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21/commits","review_comments_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21/comments","review_comment_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/21/comments","statuses_url":"https://api.github.com/repos/benwhite10/Smarkbook/statuses/06c9c5695abe806066f740575286ee7fe9526190","head":{"label":"benwhite10:studentReports","ref":"studentReports","sha":"06c9c5695abe806066f740575286ee7fe9526190","user":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"repo":{"id":43209443,"name":"Smarkbook","full_name":"benwhite10/Smarkbook","owner":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benwhite10/Smarkbook","description":"","fork":false,"url":"https://api.github.com/repos/benwhite10/Smarkbook","forks_url":"https://api.github.com/repos/benwhite10/Smarkbook/forks","keys_url":"https://api.github.com/repos/benwhite10/Smarkbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benwhite10/Smarkbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benwhite10/Smarkbook/teams","hooks_url":"https://api.github.com/repos/benwhite10/Smarkbook/hooks","issue_events_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/events{/number}","events_url":"https://api.github.com/repos/benwhite10/Smarkbook/events","assignees_url":"https://api.github.com/repos/benwhite10/Smarkbook/assignees{/user}","branches_url":"https://api.github.com/repos/benwhite10/Smarkbook/branches{/branch}","tags_url":"https://api.github.com/repos/benwhite10/Smarkbook/tags","blobs_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benwhite10/Smarkbook/statuses/{sha}","languages_url":"https://api.github.com/repos/benwhite10/Smarkbook/languages","stargazers_url":"https://api.github.com/repos/benwhite10/Smarkbook/stargazers","contributors_url":"https://api.github.com/repos/benwhite10/Smarkbook/contributors","subscribers_url":"https://api.github.com/repos/benwhite10/Smarkbook/subscribers","subscription_url":"https://api.github.com/repos/benwhite10/Smarkbook/subscription","commits_url":"https://api.github.com/repos/benwhite10/Smarkbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/benwhite10/Smarkbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/benwhite10/Smarkbook/contents/{+path}","compare_url":"https://api.github.com/repos/benwhite10/Smarkbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benwhite10/Smarkbook/merges","archive_url":"https://api.github.com/repos/benwhite10/Smarkbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benwhite10/Smarkbook/downloads","issues_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues{/number}","pulls_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls{/number}","milestones_url":"https://api.github.com/repos/benwhite10/Smarkbook/milestones{/number}","notifications_url":"https://api.github.com/repos/benwhite10/Smarkbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benwhite10/Smarkbook/labels{/name}","releases_url":"https://api.github.com/repos/benwhite10/Smarkbook/releases{/id}","deployments_url":"https://api.github.com/repos/benwhite10/Smarkbook/deployments","created_at":"2015-09-26T14:57:27Z","updated_at":"2016-02-06T17:36:42Z","pushed_at":"2016-02-20T17:37:28Z","git_url":"git://github.com/benwhite10/Smarkbook.git","ssh_url":"git@github.com:benwhite10/Smarkbook.git","clone_url":"https://github.com/benwhite10/Smarkbook.git","svn_url":"https://github.com/benwhite10/Smarkbook","homepage":null,"size":1836,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":0,"default_branch":"master"}},"base":{"label":"benwhite10:master","ref":"master","sha":"85748476f58aba66187bcd1eb88d10cefcbe7f20","user":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"repo":{"id":43209443,"name":"Smarkbook","full_name":"benwhite10/Smarkbook","owner":{"login":"benwhite10","id":13818584,"avatar_url":"https://avatars.githubusercontent.com/u/13818584?v=3","gravatar_id":"","url":"https://api.github.com/users/benwhite10","html_url":"https://github.com/benwhite10","followers_url":"https://api.github.com/users/benwhite10/followers","following_url":"https://api.github.com/users/benwhite10/following{/other_user}","gists_url":"https://api.github.com/users/benwhite10/gists{/gist_id}","starred_url":"https://api.github.com/users/benwhite10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwhite10/subscriptions","organizations_url":"https://api.github.com/users/benwhite10/orgs","repos_url":"https://api.github.com/users/benwhite10/repos","events_url":"https://api.github.com/users/benwhite10/events{/privacy}","received_events_url":"https://api.github.com/users/benwhite10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benwhite10/Smarkbook","description":"","fork":false,"url":"https://api.github.com/repos/benwhite10/Smarkbook","forks_url":"https://api.github.com/repos/benwhite10/Smarkbook/forks","keys_url":"https://api.github.com/repos/benwhite10/Smarkbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benwhite10/Smarkbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benwhite10/Smarkbook/teams","hooks_url":"https://api.github.com/repos/benwhite10/Smarkbook/hooks","issue_events_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/events{/number}","events_url":"https://api.github.com/repos/benwhite10/Smarkbook/events","assignees_url":"https://api.github.com/repos/benwhite10/Smarkbook/assignees{/user}","branches_url":"https://api.github.com/repos/benwhite10/Smarkbook/branches{/branch}","tags_url":"https://api.github.com/repos/benwhite10/Smarkbook/tags","blobs_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benwhite10/Smarkbook/statuses/{sha}","languages_url":"https://api.github.com/repos/benwhite10/Smarkbook/languages","stargazers_url":"https://api.github.com/repos/benwhite10/Smarkbook/stargazers","contributors_url":"https://api.github.com/repos/benwhite10/Smarkbook/contributors","subscribers_url":"https://api.github.com/repos/benwhite10/Smarkbook/subscribers","subscription_url":"https://api.github.com/repos/benwhite10/Smarkbook/subscription","commits_url":"https://api.github.com/repos/benwhite10/Smarkbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/benwhite10/Smarkbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/benwhite10/Smarkbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/benwhite10/Smarkbook/contents/{+path}","compare_url":"https://api.github.com/repos/benwhite10/Smarkbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benwhite10/Smarkbook/merges","archive_url":"https://api.github.com/repos/benwhite10/Smarkbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benwhite10/Smarkbook/downloads","issues_url":"https://api.github.com/repos/benwhite10/Smarkbook/issues{/number}","pulls_url":"https://api.github.com/repos/benwhite10/Smarkbook/pulls{/number}","milestones_url":"https://api.github.com/repos/benwhite10/Smarkbook/milestones{/number}","notifications_url":"https://api.github.com/repos/benwhite10/Smarkbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benwhite10/Smarkbook/labels{/name}","releases_url":"https://api.github.com/repos/benwhite10/Smarkbook/releases{/id}","deployments_url":"https://api.github.com/repos/benwhite10/Smarkbook/deployments","created_at":"2015-09-26T14:57:27Z","updated_at":"2016-02-06T17:36:42Z","pushed_at":"2016-02-20T17:37:28Z","git_url":"git://github.com/benwhite10/Smarkbook.git","ssh_url":"git@github.com:benwhite10/Smarkbook.git","clone_url":"https://github.com/benwhite10/Smarkbook.git","svn_url":"https://github.com/benwhite10/Smarkbook","homepage":null,"size":1836,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21"},"html":{"href":"https://github.com/benwhite10/Smarkbook/pull/21"},"issue":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/issues/21"},"comments":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/benwhite10/Smarkbook/statuses/06c9c5695abe806066f740575286ee7fe9526190"}}}}