{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/tms_79/pulls/comments/217762817","pull_request_review_id":155559547,"id":217762817,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzc2MjgxNw==","diff_hunk":"@@ -44,6 +44,28 @@ def destroy\n     redirect_to courses_path\n   end\n \n+  def member_remaining\n+    @users = User.user_not_exit_on_course @course.id\n+    respond_to :js\n+  end\n+\n+  def add_member\n+    users_id = params[:usersChecked]\n+    course_id = params[:courseId]\n+    @course = Course.find_by id: course_id\n+    users_id.each do |user_id|\n+      UserCourse.create!(user_id: user_id.to_i, course_id: course_id.to_i,\n+        status: :active, date_join: Time.now)\n+    end","path":"app/controllers/courses_controller.rb","position":23,"original_position":23,"commit_id":"46af4f11eb617f63943027445567165216f6393d","original_commit_id":"46af4f11eb617f63943027445567165216f6393d","user":{"login":"VuThiTranVan","id":27009821,"node_id":"MDQ6VXNlcjI3MDA5ODIx","avatar_url":"https://avatars3.githubusercontent.com/u/27009821?v=4","gravatar_id":"","url":"https://api.github.com/users/VuThiTranVan","html_url":"https://github.com/VuThiTranVan","followers_url":"https://api.github.com/users/VuThiTranVan/followers","following_url":"https://api.github.com/users/VuThiTranVan/following{/other_user}","gists_url":"https://api.github.com/users/VuThiTranVan/gists{/gist_id}","starred_url":"https://api.github.com/users/VuThiTranVan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VuThiTranVan/subscriptions","organizations_url":"https://api.github.com/users/VuThiTranVan/orgs","repos_url":"https://api.github.com/users/VuThiTranVan/repos","events_url":"https://api.github.com/users/VuThiTranVan/events{/privacy}","received_events_url":"https://api.github.com/users/VuThiTranVan/received_events","type":"User","site_admin":false},"body":"Nếu như list có 5 record mak insert tới record thứ 4 thì lỗi...thì 3 record đã insert thành công truicws đó sẽ thế nào?... liệu có nên rollback data ko?\r\n(Gợi ý: tìm hiểu transaction )\r\nNgoài ra nếu create lỗi thì liệu gọi load lại trainee và suppervisors có thừa ko","created_at":"2018-09-14T16:02:21Z","updated_at":"2018-09-14T16:07:40Z","html_url":"https://github.com/framgia/tms_79/pull/13#discussion_r217762817","pull_request_url":"https://api.github.com/repos/framgia/tms_79/pulls/13","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/comments/217762817"},"html":{"href":"https://github.com/framgia/tms_79/pull/13#discussion_r217762817"},"pull_request":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/tms_79/pulls/13","id":215492945,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1NDkyOTQ1","html_url":"https://github.com/framgia/tms_79/pull/13","diff_url":"https://github.com/framgia/tms_79/pull/13.diff","patch_url":"https://github.com/framgia/tms_79/pull/13.patch","issue_url":"https://api.github.com/repos/framgia/tms_79/issues/13","number":13,"state":"open","locked":false,"title":"assign trainee and suppervisor to course","user":{"login":"vovanquang12cntt","id":23720878,"node_id":"MDQ6VXNlcjIzNzIwODc4","avatar_url":"https://avatars3.githubusercontent.com/u/23720878?v=4","gravatar_id":"","url":"https://api.github.com/users/vovanquang12cntt","html_url":"https://github.com/vovanquang12cntt","followers_url":"https://api.github.com/users/vovanquang12cntt/followers","following_url":"https://api.github.com/users/vovanquang12cntt/following{/other_user}","gists_url":"https://api.github.com/users/vovanquang12cntt/gists{/gist_id}","starred_url":"https://api.github.com/users/vovanquang12cntt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vovanquang12cntt/subscriptions","organizations_url":"https://api.github.com/users/vovanquang12cntt/orgs","repos_url":"https://api.github.com/users/vovanquang12cntt/repos","events_url":"https://api.github.com/users/vovanquang12cntt/events{/privacy}","received_events_url":"https://api.github.com/users/vovanquang12cntt/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-14T06:26:29Z","updated_at":"2018-09-14T16:07:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5496f0932ef785aebe80c157346851e7a340a9e0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/tms_79/pulls/13/commits","review_comments_url":"https://api.github.com/repos/framgia/tms_79/pulls/13/comments","review_comment_url":"https://api.github.com/repos/framgia/tms_79/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/tms_79/issues/13/comments","statuses_url":"https://api.github.com/repos/framgia/tms_79/statuses/46af4f11eb617f63943027445567165216f6393d","head":{"label":"vovanquang12cntt:add-trainee-to-course","ref":"add-trainee-to-course","sha":"46af4f11eb617f63943027445567165216f6393d","user":{"login":"vovanquang12cntt","id":23720878,"node_id":"MDQ6VXNlcjIzNzIwODc4","avatar_url":"https://avatars3.githubusercontent.com/u/23720878?v=4","gravatar_id":"","url":"https://api.github.com/users/vovanquang12cntt","html_url":"https://github.com/vovanquang12cntt","followers_url":"https://api.github.com/users/vovanquang12cntt/followers","following_url":"https://api.github.com/users/vovanquang12cntt/following{/other_user}","gists_url":"https://api.github.com/users/vovanquang12cntt/gists{/gist_id}","starred_url":"https://api.github.com/users/vovanquang12cntt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vovanquang12cntt/subscriptions","organizations_url":"https://api.github.com/users/vovanquang12cntt/orgs","repos_url":"https://api.github.com/users/vovanquang12cntt/repos","events_url":"https://api.github.com/users/vovanquang12cntt/events{/privacy}","received_events_url":"https://api.github.com/users/vovanquang12cntt/received_events","type":"User","site_admin":false},"repo":{"id":148088700,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgwODg3MDA=","name":"tms_79","full_name":"vovanquang12cntt/tms_79","owner":{"login":"vovanquang12cntt","id":23720878,"node_id":"MDQ6VXNlcjIzNzIwODc4","avatar_url":"https://avatars3.githubusercontent.com/u/23720878?v=4","gravatar_id":"","url":"https://api.github.com/users/vovanquang12cntt","html_url":"https://github.com/vovanquang12cntt","followers_url":"https://api.github.com/users/vovanquang12cntt/followers","following_url":"https://api.github.com/users/vovanquang12cntt/following{/other_user}","gists_url":"https://api.github.com/users/vovanquang12cntt/gists{/gist_id}","starred_url":"https://api.github.com/users/vovanquang12cntt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vovanquang12cntt/subscriptions","organizations_url":"https://api.github.com/users/vovanquang12cntt/orgs","repos_url":"https://api.github.com/users/vovanquang12cntt/repos","events_url":"https://api.github.com/users/vovanquang12cntt/events{/privacy}","received_events_url":"https://api.github.com/users/vovanquang12cntt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vovanquang12cntt/tms_79","description":null,"fork":true,"url":"https://api.github.com/repos/vovanquang12cntt/tms_79","forks_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/forks","keys_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/teams","hooks_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/hooks","issue_events_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/issues/events{/number}","events_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/events","assignees_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/assignees{/user}","branches_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/branches{/branch}","tags_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/tags","blobs_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/git/refs{/sha}","trees_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/statuses/{sha}","languages_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/languages","stargazers_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/stargazers","contributors_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/contributors","subscribers_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/subscribers","subscription_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/subscription","commits_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/commits{/sha}","git_commits_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/git/commits{/sha}","comments_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/comments{/number}","issue_comment_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/issues/comments{/number}","contents_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/contents/{+path}","compare_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/merges","archive_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/downloads","issues_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/issues{/number}","pulls_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/pulls{/number}","milestones_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/milestones{/number}","notifications_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/labels{/name}","releases_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/releases{/id}","deployments_url":"https://api.github.com/repos/vovanquang12cntt/tms_79/deployments","created_at":"2018-09-10T02:35:02Z","updated_at":"2018-09-11T09:09:54Z","pushed_at":"2018-09-14T15:25:24Z","git_url":"git://github.com/vovanquang12cntt/tms_79.git","ssh_url":"git@github.com:vovanquang12cntt/tms_79.git","clone_url":"https://github.com/vovanquang12cntt/tms_79.git","svn_url":"https://github.com/vovanquang12cntt/tms_79","homepage":null,"size":14634,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"framgia:develop","ref":"develop","sha":"360ccb48465b9defeafba293ad4882fec621e877","user":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":148085423,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgwODU0MjM=","name":"tms_79","full_name":"framgia/tms_79","owner":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/tms_79","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/tms_79","forks_url":"https://api.github.com/repos/framgia/tms_79/forks","keys_url":"https://api.github.com/repos/framgia/tms_79/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/tms_79/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/tms_79/teams","hooks_url":"https://api.github.com/repos/framgia/tms_79/hooks","issue_events_url":"https://api.github.com/repos/framgia/tms_79/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/tms_79/events","assignees_url":"https://api.github.com/repos/framgia/tms_79/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/tms_79/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/tms_79/tags","blobs_url":"https://api.github.com/repos/framgia/tms_79/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/tms_79/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/tms_79/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/tms_79/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/tms_79/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/tms_79/languages","stargazers_url":"https://api.github.com/repos/framgia/tms_79/stargazers","contributors_url":"https://api.github.com/repos/framgia/tms_79/contributors","subscribers_url":"https://api.github.com/repos/framgia/tms_79/subscribers","subscription_url":"https://api.github.com/repos/framgia/tms_79/subscription","commits_url":"https://api.github.com/repos/framgia/tms_79/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/tms_79/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/tms_79/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/tms_79/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/tms_79/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/tms_79/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/tms_79/merges","archive_url":"https://api.github.com/repos/framgia/tms_79/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/tms_79/downloads","issues_url":"https://api.github.com/repos/framgia/tms_79/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/tms_79/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/tms_79/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/tms_79/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/tms_79/labels{/name}","releases_url":"https://api.github.com/repos/framgia/tms_79/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/tms_79/deployments","created_at":"2018-09-10T02:02:07Z","updated_at":"2018-09-14T07:28:07Z","pushed_at":"2018-09-14T15:25:25Z","git_url":"git://github.com/framgia/tms_79.git","ssh_url":"git@github.com:framgia/tms_79.git","clone_url":"https://github.com/framgia/tms_79.git","svn_url":"https://github.com/framgia/tms_79","homepage":null,"size":203,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/13"},"html":{"href":"https://github.com/framgia/tms_79/pull/13"},"issue":{"href":"https://api.github.com/repos/framgia/tms_79/issues/13"},"comments":{"href":"https://api.github.com/repos/framgia/tms_79/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/tms_79/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/tms_79/statuses/46af4f11eb617f63943027445567165216f6393d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"VuThiTranVan"}}