{"action":"created","comment":{"url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments/197624500","pull_request_review_id":131407669,"id":197624500,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzYyNDUwMA==","diff_hunk":"@@ -0,0 +1,348 @@\n+\n+/****** functions exclusive for bible_tracker page ******/\n+function setWeeks() {\n+    var firstDayofWeek = moment(first_day_term, \"YYYYMMDD\");\n+    var lastDayofWeek = firstDayofWeek.clone().add(6, \"days\");\n+    for (i = 0; i <= current_week; i++) {\n+        $(\"#week_select\").append($(\"<option />\").val(\"week-\" + i).text(\"Week \" + i + \": \" + firstDayofWeek.format(\"ddd MMM D\") + \" - \" + lastDayofWeek.format(\"ddd MMM D\")).attr(\"id\", i));\n+        firstDayofWeek = lastDayofWeek.add(1, \"day\");\n+        lastDayofWeek = firstDayofWeek.clone().add(6, \"days\");\n+    }\n+}\n+\n+function setDatesforWeek(week) {\n+    enableButtons();\n+    var firstDay = moment(first_day_term, \"YYYYMMDD\");\n+    var firstDayofWeek = firstDay.add(week, \"weeks\");\n+    var WedofNextWeek = firstDayofWeek.clone().add(9, \"days\");\n+    var lastDayofWeek = firstDayofWeek.clone().add(6, \"days\");\n+    var currentDayofWeek = firstDayofWeek.clone();\n+    var now = moment();\n+    for (var i = 0; i < 7; i++) {\n+        $(\"#day-\" + i).html(currentDayofWeek.format(\"ddd - MMM D\"));\n+        currentDayofWeek.add(1, \"days\");\n+    }\n+    //finalize is disabled on Wednesday of next week (with HH:mm of 00:00) or before week is over (Sunday midnight+20 minutes)\n+    if (is_trainee && (now > WedofNextWeek || now < lastDayofWeek.clone().add(20, \"minutes\"))) {\n+        $(\"#finalize\").prop(\"disabled\", true);\n+    }\n+    //save button is disabled for more than this week\"s Bible reading\n+    if (is_trainee && lastDayofWeek >= now.clone().add(6, \"days\")) {\n+        $(\"#save\").prop(\"disabled\", true);\n+    }\n+}\n+\n+function modify_boxes(classname) {\n+    var x = document.getElementsByClassName(classname)[0];\n+    x.setAttribute(\"checked\", \"true\");\n+}\n+\n+function updateProgressBar(selector, data) {\n+    $(selector).css(\"width\", data + \"%\");\n+    $(selector).html(data + \"%\");\n+    $(selector).attr(\"aria-valuenow\", data);\n+}\n+\n+function unfinalizeStatus() {\n+    var week_id = $(\"#week_select\").find(\":selected\").attr(\"id\");\n+    var userId = $(\"input#userId\").val();\n+    $.ajax({\n+        type: \"POST\",\n+        url: finalize_status_url,\n+        data: {\n+            \"week_id\": week_id,\n+            csrfmiddlewaretoken: \"{{ csrf_token }}\",\n+            \"action\": \"unfinalize\",\n+            \"userId\": userId,\n+        },\n+        success: function (data) {\n+            enableButtons();\n+            $(\"#unfinalize\").prop(\"disabled\", true);\n+        },// success\n+        error: function (data) {\n+            alert(\"Sorry, there was an error processing this request.\"); // <- this should run if user is not activated\n+        } // error\n+    });\n+}\n+\n+function toggleCheckbox(classname, id, year) {\n+    var checked = document.getElementsByClassName(classname)[0].checked;\n+    var userId = $(\"input#userId\").val();\n+    $.ajax({\n+        type: \"POST\",\n+        url: update_books_url,\n+        data: {\n+            \"book\": id,\n+            \"year\": year,\n+            \"checked\": checked,\n+            csrfmiddlewaretoken: \"{{ csrf_token }}\",\n+            \"userId\": userId,\n+        },\n+        success: function (data) {\n+            let text = checked ? \"Saved\" : \"Deleted\";\n+            new Notification(Notification.SUCCESS, text).show();\n+            if (year == 1) {","path":"ap/bible_tracker/static/bible_tracker/js/bible_reading.js","position":84,"original_position":84,"commit_id":"a0a15d8723e50cf1d1bd44c4407d018304d423ef","original_commit_id":"a0a15d8723e50cf1d1bd44c4407d018304d423ef","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","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://app.codacy.com/assets/images/favicon.png) Issue found: [Expected '===' and instead saw '=='. (eqeqeq)](https://app.codacy.com/app/jontey/djattendance/pullRequest?prid=1444129)","created_at":"2018-06-23T23:02:18Z","updated_at":"2018-06-23T23:02:18Z","html_url":"https://github.com/attendanceproject/djattendance/pull/869#discussion_r197624500","pull_request_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments/197624500"},"html":{"href":"https://github.com/attendanceproject/djattendance/pull/869#discussion_r197624500"},"pull_request":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869"}}},"pull_request":{"url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869","id":175725520,"node_id":"MDExOlB1bGxSZXF1ZXN0MTc1NzI1NTIw","html_url":"https://github.com/attendanceproject/djattendance/pull/869","diff_url":"https://github.com/attendanceproject/djattendance/pull/869.diff","patch_url":"https://github.com/attendanceproject/djattendance/pull/869.patch","issue_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/869","number":869,"state":"open","locked":false,"title":"Trainee homepage","user":{"login":"berlyseria","id":25711911,"node_id":"MDQ6VXNlcjI1NzExOTEx","avatar_url":"https://avatars3.githubusercontent.com/u/25711911?v=4","gravatar_id":"","url":"https://api.github.com/users/berlyseria","html_url":"https://github.com/berlyseria","followers_url":"https://api.github.com/users/berlyseria/followers","following_url":"https://api.github.com/users/berlyseria/following{/other_user}","gists_url":"https://api.github.com/users/berlyseria/gists{/gist_id}","starred_url":"https://api.github.com/users/berlyseria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berlyseria/subscriptions","organizations_url":"https://api.github.com/users/berlyseria/orgs","repos_url":"https://api.github.com/users/berlyseria/repos","events_url":"https://api.github.com/users/berlyseria/events{/privacy}","received_events_url":"https://api.github.com/users/berlyseria/received_events","type":"User","site_admin":false},"body":"Working on the functionality of the trainee homepage","created_at":"2018-03-17T22:53:02Z","updated_at":"2018-06-23T23:02:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fea581133b56862b40eaf2fefaac30152b6d6a78","assignee":{"login":"berlyseria","id":25711911,"node_id":"MDQ6VXNlcjI1NzExOTEx","avatar_url":"https://avatars3.githubusercontent.com/u/25711911?v=4","gravatar_id":"","url":"https://api.github.com/users/berlyseria","html_url":"https://github.com/berlyseria","followers_url":"https://api.github.com/users/berlyseria/followers","following_url":"https://api.github.com/users/berlyseria/following{/other_user}","gists_url":"https://api.github.com/users/berlyseria/gists{/gist_id}","starred_url":"https://api.github.com/users/berlyseria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berlyseria/subscriptions","organizations_url":"https://api.github.com/users/berlyseria/orgs","repos_url":"https://api.github.com/users/berlyseria/repos","events_url":"https://api.github.com/users/berlyseria/events{/privacy}","received_events_url":"https://api.github.com/users/berlyseria/received_events","type":"User","site_admin":false},"assignees":[{"login":"berlyseria","id":25711911,"node_id":"MDQ6VXNlcjI1NzExOTEx","avatar_url":"https://avatars3.githubusercontent.com/u/25711911?v=4","gravatar_id":"","url":"https://api.github.com/users/berlyseria","html_url":"https://github.com/berlyseria","followers_url":"https://api.github.com/users/berlyseria/followers","following_url":"https://api.github.com/users/berlyseria/following{/other_user}","gists_url":"https://api.github.com/users/berlyseria/gists{/gist_id}","starred_url":"https://api.github.com/users/berlyseria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berlyseria/subscriptions","organizations_url":"https://api.github.com/users/berlyseria/orgs","repos_url":"https://api.github.com/users/berlyseria/repos","events_url":"https://api.github.com/users/berlyseria/events{/privacy}","received_events_url":"https://api.github.com/users/berlyseria/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869/commits","review_comments_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869/comments","review_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/869/comments","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/a0a15d8723e50cf1d1bd44c4407d018304d423ef","head":{"label":"attendanceproject:trainee_homepage","ref":"trainee_homepage","sha":"a0a15d8723e50cf1d1bd44c4407d018304d423ef","user":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"repo":{"id":11232995,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMjk5NQ==","name":"djattendance","full_name":"attendanceproject/djattendance","owner":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/attendanceproject/djattendance","description":"A rewrite of the original attendance project in Python","fork":false,"url":"https://api.github.com/repos/attendanceproject/djattendance","forks_url":"https://api.github.com/repos/attendanceproject/djattendance/forks","keys_url":"https://api.github.com/repos/attendanceproject/djattendance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/attendanceproject/djattendance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/attendanceproject/djattendance/teams","hooks_url":"https://api.github.com/repos/attendanceproject/djattendance/hooks","issue_events_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/events{/number}","events_url":"https://api.github.com/repos/attendanceproject/djattendance/events","assignees_url":"https://api.github.com/repos/attendanceproject/djattendance/assignees{/user}","branches_url":"https://api.github.com/repos/attendanceproject/djattendance/branches{/branch}","tags_url":"https://api.github.com/repos/attendanceproject/djattendance/tags","blobs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/attendanceproject/djattendance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/refs{/sha}","trees_url":"https://api.github.com/repos/attendanceproject/djattendance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/{sha}","languages_url":"https://api.github.com/repos/attendanceproject/djattendance/languages","stargazers_url":"https://api.github.com/repos/attendanceproject/djattendance/stargazers","contributors_url":"https://api.github.com/repos/attendanceproject/djattendance/contributors","subscribers_url":"https://api.github.com/repos/attendanceproject/djattendance/subscribers","subscription_url":"https://api.github.com/repos/attendanceproject/djattendance/subscription","commits_url":"https://api.github.com/repos/attendanceproject/djattendance/commits{/sha}","git_commits_url":"https://api.github.com/repos/attendanceproject/djattendance/git/commits{/sha}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/comments{/number}","issue_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/comments{/number}","contents_url":"https://api.github.com/repos/attendanceproject/djattendance/contents/{+path}","compare_url":"https://api.github.com/repos/attendanceproject/djattendance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/attendanceproject/djattendance/merges","archive_url":"https://api.github.com/repos/attendanceproject/djattendance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/attendanceproject/djattendance/downloads","issues_url":"https://api.github.com/repos/attendanceproject/djattendance/issues{/number}","pulls_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls{/number}","milestones_url":"https://api.github.com/repos/attendanceproject/djattendance/milestones{/number}","notifications_url":"https://api.github.com/repos/attendanceproject/djattendance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/attendanceproject/djattendance/labels{/name}","releases_url":"https://api.github.com/repos/attendanceproject/djattendance/releases{/id}","deployments_url":"https://api.github.com/repos/attendanceproject/djattendance/deployments","created_at":"2013-07-07T12:16:10Z","updated_at":"2018-06-23T20:30:12Z","pushed_at":"2018-06-23T22:59:39Z","git_url":"git://github.com/attendanceproject/djattendance.git","ssh_url":"git@github.com:attendanceproject/djattendance.git","clone_url":"https://github.com/attendanceproject/djattendance.git","svn_url":"https://github.com/attendanceproject/djattendance","homepage":"","size":185465,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":111,"license":null,"forks":16,"open_issues":111,"watchers":27,"default_branch":"dev"}},"base":{"label":"attendanceproject:dev","ref":"dev","sha":"f6e5fcc4089d825d624b8517699a0b30d5427d6e","user":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"repo":{"id":11232995,"node_id":"MDEwOlJlcG9zaXRvcnkxMTIzMjk5NQ==","name":"djattendance","full_name":"attendanceproject/djattendance","owner":{"login":"attendanceproject","id":5070936,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA5MzY=","avatar_url":"https://avatars1.githubusercontent.com/u/5070936?v=4","gravatar_id":"","url":"https://api.github.com/users/attendanceproject","html_url":"https://github.com/attendanceproject","followers_url":"https://api.github.com/users/attendanceproject/followers","following_url":"https://api.github.com/users/attendanceproject/following{/other_user}","gists_url":"https://api.github.com/users/attendanceproject/gists{/gist_id}","starred_url":"https://api.github.com/users/attendanceproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attendanceproject/subscriptions","organizations_url":"https://api.github.com/users/attendanceproject/orgs","repos_url":"https://api.github.com/users/attendanceproject/repos","events_url":"https://api.github.com/users/attendanceproject/events{/privacy}","received_events_url":"https://api.github.com/users/attendanceproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/attendanceproject/djattendance","description":"A rewrite of the original attendance project in Python","fork":false,"url":"https://api.github.com/repos/attendanceproject/djattendance","forks_url":"https://api.github.com/repos/attendanceproject/djattendance/forks","keys_url":"https://api.github.com/repos/attendanceproject/djattendance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/attendanceproject/djattendance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/attendanceproject/djattendance/teams","hooks_url":"https://api.github.com/repos/attendanceproject/djattendance/hooks","issue_events_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/events{/number}","events_url":"https://api.github.com/repos/attendanceproject/djattendance/events","assignees_url":"https://api.github.com/repos/attendanceproject/djattendance/assignees{/user}","branches_url":"https://api.github.com/repos/attendanceproject/djattendance/branches{/branch}","tags_url":"https://api.github.com/repos/attendanceproject/djattendance/tags","blobs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/attendanceproject/djattendance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/attendanceproject/djattendance/git/refs{/sha}","trees_url":"https://api.github.com/repos/attendanceproject/djattendance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/attendanceproject/djattendance/statuses/{sha}","languages_url":"https://api.github.com/repos/attendanceproject/djattendance/languages","stargazers_url":"https://api.github.com/repos/attendanceproject/djattendance/stargazers","contributors_url":"https://api.github.com/repos/attendanceproject/djattendance/contributors","subscribers_url":"https://api.github.com/repos/attendanceproject/djattendance/subscribers","subscription_url":"https://api.github.com/repos/attendanceproject/djattendance/subscription","commits_url":"https://api.github.com/repos/attendanceproject/djattendance/commits{/sha}","git_commits_url":"https://api.github.com/repos/attendanceproject/djattendance/git/commits{/sha}","comments_url":"https://api.github.com/repos/attendanceproject/djattendance/comments{/number}","issue_comment_url":"https://api.github.com/repos/attendanceproject/djattendance/issues/comments{/number}","contents_url":"https://api.github.com/repos/attendanceproject/djattendance/contents/{+path}","compare_url":"https://api.github.com/repos/attendanceproject/djattendance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/attendanceproject/djattendance/merges","archive_url":"https://api.github.com/repos/attendanceproject/djattendance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/attendanceproject/djattendance/downloads","issues_url":"https://api.github.com/repos/attendanceproject/djattendance/issues{/number}","pulls_url":"https://api.github.com/repos/attendanceproject/djattendance/pulls{/number}","milestones_url":"https://api.github.com/repos/attendanceproject/djattendance/milestones{/number}","notifications_url":"https://api.github.com/repos/attendanceproject/djattendance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/attendanceproject/djattendance/labels{/name}","releases_url":"https://api.github.com/repos/attendanceproject/djattendance/releases{/id}","deployments_url":"https://api.github.com/repos/attendanceproject/djattendance/deployments","created_at":"2013-07-07T12:16:10Z","updated_at":"2018-06-23T20:30:12Z","pushed_at":"2018-06-23T22:59:39Z","git_url":"git://github.com/attendanceproject/djattendance.git","ssh_url":"git@github.com:attendanceproject/djattendance.git","clone_url":"https://github.com/attendanceproject/djattendance.git","svn_url":"https://github.com/attendanceproject/djattendance","homepage":"","size":185465,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":111,"license":null,"forks":16,"open_issues":111,"watchers":27,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869"},"html":{"href":"https://github.com/attendanceproject/djattendance/pull/869"},"issue":{"href":"https://api.github.com/repos/attendanceproject/djattendance/issues/869"},"comments":{"href":"https://api.github.com/repos/attendanceproject/djattendance/issues/869/comments"},"review_comments":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869/comments"},"review_comment":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/attendanceproject/djattendance/pulls/869/commits"},"statuses":{"href":"https://api.github.com/repos/attendanceproject/djattendance/statuses/a0a15d8723e50cf1d1bd44c4407d018304d423ef"}},"author_association":"NONE"}}
{"actor":{"display_login":"codacy-bot"}}