{"action":"created","comment":{"url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/comments/57818551","id":57818551,"diff_hunk":"@@ -430,4 +426,150 @@ $('.evideos.show').ready ->\n     $(document).on 'click', '#edit_btn', ->\n         id = $(this).parent().parent(\"tr\").attr(\"id\")\n         $(tbody).append()\n-        console.log id\n+\n+\n+    during_the_test = false\n+    question_number = 5\n+    collect_answer = 0\n+    # テストボタンをクリックしたらテスト開始\n+    $(document).on 'click', '.test_btn.start_test', ->\n+        return if during_the_test\n+        $(this).text(\"テスト中...\")\n+        $(this).addClass(\"during_test\")\n+        $(this).removeClass(\"start_test\")\n+        $.ajax(\n+            url: \"/evideos/#{gon.evideo_id}/set_questions\"\n+            async: true\n+            type: \"GET\"\n+            error: (jqXHR, textStatus, errorThrown) ->\n+                console.log errorThrown\n+                alert \"何らかのエラーにより、テストができません。\"\n+            success: (data, textStatus, jqXHR) ->\n+                if data.length < 1\n+                    alert \"字幕が登録されていないので、テストできません。\"\n+                else\n+                    set_questions data\n+        )\n+    $(document).on 'click', '.test_btn.during_test', ->\n+        $that = $(this)\n+        if during_the_test\n+            swal({\n+                text: \"テストを完了しなければ結果は反映されませんが、終了してもよろしいですか？\"\n+                type: \"warning\"                \n+                showCancelButton: true\n+                confirmButtonColor: \"#3085d6\"\n+                cancelButtonColor: \"#d33\"\n+                confirmButtonClass: \"sweet_alert confirm_btn\"\n+                cancelButtonClass: \"sweet_alert cancel_btn\"\n+                buttonsStyling: false\n+                background: \"rgba(255, 255, 255, 0.8)\"\n+            }\n+            (isConfirm) =>","path":"app/assets/javascripts/evideos.coffee","position":120,"original_position":120,"commit_id":"cd2032ca7e8610579ffeb90541d4e4adc90257dc","original_commit_id":"cd2032ca7e8610579ffeb90541d4e4adc90257dc","user":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"body":"__[coffeelint]__\n* [warn] Unnecessary fat arrow","created_at":"2016-03-29T23:38:19Z","updated_at":"2016-03-29T23:38:19Z","html_url":"https://github.com/hyde2able/TsuiMana/pull/100#discussion_r57818551","pull_request_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/comments/57818551"},"html":{"href":"https://github.com/hyde2able/TsuiMana/pull/100#discussion_r57818551"},"pull_request":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100","id":64551332,"html_url":"https://github.com/hyde2able/TsuiMana/pull/100","diff_url":"https://github.com/hyde2able/TsuiMana/pull/100.diff","patch_url":"https://github.com/hyde2able/TsuiMana/pull/100.patch","issue_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/100","number":100,"state":"open","locked":false,"title":"テスト機能など","user":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-29T23:36:41Z","updated_at":"2016-03-29T23:38:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8fcc33ba008fa6cd76fbe8ee50cb44f46d46db4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100/commits","review_comments_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100/comments","review_comment_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/100/comments","statuses_url":"https://api.github.com/repos/hyde2able/TsuiMana/statuses/cd2032ca7e8610579ffeb90541d4e4adc90257dc","head":{"label":"hyde2able:develop","ref":"develop","sha":"cd2032ca7e8610579ffeb90541d4e4adc90257dc","user":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"repo":{"id":46860235,"name":"TsuiMana","full_name":"hyde2able/TsuiMana","owner":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hyde2able/TsuiMana","description":"英語学習に役立つ動画のプラットフォーム（がんばるぞー）","fork":false,"url":"https://api.github.com/repos/hyde2able/TsuiMana","forks_url":"https://api.github.com/repos/hyde2able/TsuiMana/forks","keys_url":"https://api.github.com/repos/hyde2able/TsuiMana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyde2able/TsuiMana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyde2able/TsuiMana/teams","hooks_url":"https://api.github.com/repos/hyde2able/TsuiMana/hooks","issue_events_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/events{/number}","events_url":"https://api.github.com/repos/hyde2able/TsuiMana/events","assignees_url":"https://api.github.com/repos/hyde2able/TsuiMana/assignees{/user}","branches_url":"https://api.github.com/repos/hyde2able/TsuiMana/branches{/branch}","tags_url":"https://api.github.com/repos/hyde2able/TsuiMana/tags","blobs_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyde2able/TsuiMana/statuses/{sha}","languages_url":"https://api.github.com/repos/hyde2able/TsuiMana/languages","stargazers_url":"https://api.github.com/repos/hyde2able/TsuiMana/stargazers","contributors_url":"https://api.github.com/repos/hyde2able/TsuiMana/contributors","subscribers_url":"https://api.github.com/repos/hyde2able/TsuiMana/subscribers","subscription_url":"https://api.github.com/repos/hyde2able/TsuiMana/subscription","commits_url":"https://api.github.com/repos/hyde2able/TsuiMana/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyde2able/TsuiMana/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyde2able/TsuiMana/contents/{+path}","compare_url":"https://api.github.com/repos/hyde2able/TsuiMana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyde2able/TsuiMana/merges","archive_url":"https://api.github.com/repos/hyde2able/TsuiMana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyde2able/TsuiMana/downloads","issues_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues{/number}","pulls_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls{/number}","milestones_url":"https://api.github.com/repos/hyde2able/TsuiMana/milestones{/number}","notifications_url":"https://api.github.com/repos/hyde2able/TsuiMana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyde2able/TsuiMana/labels{/name}","releases_url":"https://api.github.com/repos/hyde2able/TsuiMana/releases{/id}","deployments_url":"https://api.github.com/repos/hyde2able/TsuiMana/deployments","created_at":"2015-11-25T12:27:49Z","updated_at":"2016-03-16T11:31:26Z","pushed_at":"2016-03-29T23:36:42Z","git_url":"git://github.com/hyde2able/TsuiMana.git","ssh_url":"git@github.com:hyde2able/TsuiMana.git","clone_url":"https://github.com/hyde2able/TsuiMana.git","svn_url":"https://github.com/hyde2able/TsuiMana","homepage":"","size":15235,"stargazers_count":4,"watchers_count":4,"language":"Groff","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"base":{"label":"hyde2able:master","ref":"master","sha":"397d60e7387bae8d32b469f5f80c86e340493ad3","user":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"repo":{"id":46860235,"name":"TsuiMana","full_name":"hyde2able/TsuiMana","owner":{"login":"hyde2able","id":11733664,"avatar_url":"https://avatars.githubusercontent.com/u/11733664?v=3","gravatar_id":"","url":"https://api.github.com/users/hyde2able","html_url":"https://github.com/hyde2able","followers_url":"https://api.github.com/users/hyde2able/followers","following_url":"https://api.github.com/users/hyde2able/following{/other_user}","gists_url":"https://api.github.com/users/hyde2able/gists{/gist_id}","starred_url":"https://api.github.com/users/hyde2able/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyde2able/subscriptions","organizations_url":"https://api.github.com/users/hyde2able/orgs","repos_url":"https://api.github.com/users/hyde2able/repos","events_url":"https://api.github.com/users/hyde2able/events{/privacy}","received_events_url":"https://api.github.com/users/hyde2able/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hyde2able/TsuiMana","description":"英語学習に役立つ動画のプラットフォーム（がんばるぞー）","fork":false,"url":"https://api.github.com/repos/hyde2able/TsuiMana","forks_url":"https://api.github.com/repos/hyde2able/TsuiMana/forks","keys_url":"https://api.github.com/repos/hyde2able/TsuiMana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyde2able/TsuiMana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyde2able/TsuiMana/teams","hooks_url":"https://api.github.com/repos/hyde2able/TsuiMana/hooks","issue_events_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/events{/number}","events_url":"https://api.github.com/repos/hyde2able/TsuiMana/events","assignees_url":"https://api.github.com/repos/hyde2able/TsuiMana/assignees{/user}","branches_url":"https://api.github.com/repos/hyde2able/TsuiMana/branches{/branch}","tags_url":"https://api.github.com/repos/hyde2able/TsuiMana/tags","blobs_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyde2able/TsuiMana/statuses/{sha}","languages_url":"https://api.github.com/repos/hyde2able/TsuiMana/languages","stargazers_url":"https://api.github.com/repos/hyde2able/TsuiMana/stargazers","contributors_url":"https://api.github.com/repos/hyde2able/TsuiMana/contributors","subscribers_url":"https://api.github.com/repos/hyde2able/TsuiMana/subscribers","subscription_url":"https://api.github.com/repos/hyde2able/TsuiMana/subscription","commits_url":"https://api.github.com/repos/hyde2able/TsuiMana/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyde2able/TsuiMana/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyde2able/TsuiMana/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyde2able/TsuiMana/contents/{+path}","compare_url":"https://api.github.com/repos/hyde2able/TsuiMana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyde2able/TsuiMana/merges","archive_url":"https://api.github.com/repos/hyde2able/TsuiMana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyde2able/TsuiMana/downloads","issues_url":"https://api.github.com/repos/hyde2able/TsuiMana/issues{/number}","pulls_url":"https://api.github.com/repos/hyde2able/TsuiMana/pulls{/number}","milestones_url":"https://api.github.com/repos/hyde2able/TsuiMana/milestones{/number}","notifications_url":"https://api.github.com/repos/hyde2able/TsuiMana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyde2able/TsuiMana/labels{/name}","releases_url":"https://api.github.com/repos/hyde2able/TsuiMana/releases{/id}","deployments_url":"https://api.github.com/repos/hyde2able/TsuiMana/deployments","created_at":"2015-11-25T12:27:49Z","updated_at":"2016-03-16T11:31:26Z","pushed_at":"2016-03-29T23:36:42Z","git_url":"git://github.com/hyde2able/TsuiMana.git","ssh_url":"git@github.com:hyde2able/TsuiMana.git","clone_url":"https://github.com/hyde2able/TsuiMana.git","svn_url":"https://github.com/hyde2able/TsuiMana","homepage":"","size":15235,"stargazers_count":4,"watchers_count":4,"language":"Groff","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":20,"forks":0,"open_issues":20,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100"},"html":{"href":"https://github.com/hyde2able/TsuiMana/pull/100"},"issue":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/issues/100"},"comments":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/hyde2able/TsuiMana/statuses/cd2032ca7e8610579ffeb90541d4e4adc90257dc"}}}}