{"action":"created","comment":{"url":"https://api.github.com/repos/ilios/frontend/pulls/comments/40159934","id":40159934,"diff_hunk":"@@ -122,38 +134,106 @@ export default Ember.Component.extend({\n       promise: defer.promise\n     });\n   }.property('members.[]', 'topLevelGroup', 'topLevelGroup.allDescendants.@each'),\n-  actions: {\n-    changeLearnerGroup: function(groupIdString, userId){\n-      this.set('saving', true);\n-      let groupId = parseInt(groupIdString);\n-      let toSave = [];\n-      this.get('store').find('user', userId).then(\n-        user => {\n-          toSave.pushObject(user);\n-          this.get('topLevelGroup').then(topLevelGroup => {\n-            topLevelGroup.removeUserFromGroupAndAllDescendants(user).then(groups=>{\n-              toSave.pushObjects(groups);\n-              if(groupId === -1){\n-                //we're moving this user out of the group into the cohort\n-                //so just save\n-                Ember.RSVP.all(toSave.uniq().invoke('save')).then(()=>{\n-                  this.set('saving', false);\n-                });\n-              } else {\n-                this.get('store').find('learnerGroup', groupId).then( learnerGroup => {\n-                  learnerGroup.addUserToGroupAndAllParents(user).then(groups =>{\n-                    toSave.pushObjects(groups);\n-                    Ember.RSVP.all(toSave.uniq().invoke('save')).then(()=>{\n-                      this.set('saving', false);\n-                    });\n+\n+  sendPutRequests(groupIdString, userId) {\n+    this.set('saving', true);\n+    let groupId = parseInt(groupIdString);\n+    let toSave = [];\n+    let component = this;\n+\n+    this.get('store').find('user', userId).then(\n+      (user) => {\n+        toSave.pushObject(user);\n+        component.get('topLevelGroup').then((topLevelGroup) => {\n+          topLevelGroup.removeUserFromGroupAndAllDescendants(user).then((groups) => {\n+            toSave.pushObjects(groups);\n+            if (groupId === -1) {\n+              // we're moving this user out of the group into the cohort\n+              // so just save\n+              all(toSave.uniq().invoke('save')).finally(() => {\n+                component.set('saving', false);\n+              });\n+            } else {\n+              component.get('store').find('learnerGroup', groupId).then(learnerGroup => {\n+                learnerGroup.addUserToGroupAndAllParents(user).then(groups =>{\n+                  toSave.pushObjects(groups);\n+                  all(toSave.uniq().invoke('save')).finally(() => {\n+                    component.set('saving', false);\n                   });\n                 });\n-              }\n-              \n-            });\n+              });\n+            }\n           });\n-        }\n-      );\n+        });\n+      }\n+    );\n+  },\n+\n+  actions: {\n+    changeLearnerGroup(groupIdString, userId){\n+      this.sendPutRequests(groupIdString, userId);\n+    },\n+\n+    addStudent(studentId) {\n+      this.get('toBulkSave').pushObject(studentId);\n+    },\n+\n+    removeStudent(studentId) {\n+      this.get('toBulkSave').removeObject(studentId);\n+    },\n+\n+    continueButton() {\n+      if (isEmpty(this.get('toBulkSave'))) {\n+        this.set('errorMessage', 'You must checkmark at least one.');","path":"app/components/learnergroup-members.js","position":104,"original_position":104,"commit_id":"bebedf52471f3fcb54c93aff34c2f7a53ac0a0c8","original_commit_id":"bebedf52471f3fcb54c93aff34c2f7a53ac0a0c8","user":{"login":"djvoa12","id":7553764,"avatar_url":"https://avatars.githubusercontent.com/u/7553764?v=3","gravatar_id":"","url":"https://api.github.com/users/djvoa12","html_url":"https://github.com/djvoa12","followers_url":"https://api.github.com/users/djvoa12/followers","following_url":"https://api.github.com/users/djvoa12/following{/other_user}","gists_url":"https://api.github.com/users/djvoa12/gists{/gist_id}","starred_url":"https://api.github.com/users/djvoa12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djvoa12/subscriptions","organizations_url":"https://api.github.com/users/djvoa12/orgs","repos_url":"https://api.github.com/users/djvoa12/repos","events_url":"https://api.github.com/users/djvoa12/events{/privacy}","received_events_url":"https://api.github.com/users/djvoa12/received_events","type":"User","site_admin":false},"body":"Okay. Users might be confused initially, but I suppose they can figure it out.","created_at":"2015-09-23T00:03:59Z","updated_at":"2015-09-23T00:03:59Z","html_url":"https://github.com/ilios/frontend/pull/836#discussion_r40159934","pull_request_url":"https://api.github.com/repos/ilios/frontend/pulls/836","_links":{"self":{"href":"https://api.github.com/repos/ilios/frontend/pulls/comments/40159934"},"html":{"href":"https://github.com/ilios/frontend/pull/836#discussion_r40159934"},"pull_request":{"href":"https://api.github.com/repos/ilios/frontend/pulls/836"}}},"pull_request":{"url":"https://api.github.com/repos/ilios/frontend/pulls/836","id":45607471,"html_url":"https://github.com/ilios/frontend/pull/836","diff_url":"https://github.com/ilios/frontend/pull/836.diff","patch_url":"https://github.com/ilios/frontend/pull/836.patch","issue_url":"https://api.github.com/repos/ilios/frontend/issues/836","number":836,"state":"open","locked":false,"title":"added multi-edit functionality","user":{"login":"djvoa12","id":7553764,"avatar_url":"https://avatars.githubusercontent.com/u/7553764?v=3","gravatar_id":"","url":"https://api.github.com/users/djvoa12","html_url":"https://github.com/djvoa12","followers_url":"https://api.github.com/users/djvoa12/followers","following_url":"https://api.github.com/users/djvoa12/following{/other_user}","gists_url":"https://api.github.com/users/djvoa12/gists{/gist_id}","starred_url":"https://api.github.com/users/djvoa12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djvoa12/subscriptions","organizations_url":"https://api.github.com/users/djvoa12/orgs","repos_url":"https://api.github.com/users/djvoa12/repos","events_url":"https://api.github.com/users/djvoa12/events{/privacy}","received_events_url":"https://api.github.com/users/djvoa12/received_events","type":"User","site_admin":false},"body":"Additional Notes:\r\n- added `ui-select` (dropdown select) addon dependency (see `package.json`)\r\n  - created new `learner-select-field.hbs` which replaces default select-field that `ui-select` provides to fit our needs\r\n- refactored, where applicable\r\n- added styles, where applicable\r\n- added new words to `locales` for translation purposes\r\n\r\nfixes #612 ","created_at":"2015-09-21T22:18:07Z","updated_at":"2015-09-23T00:04:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41d39cff2f107634c9c5ae1eaf59a42bafabf019","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ilios/frontend/pulls/836/commits","review_comments_url":"https://api.github.com/repos/ilios/frontend/pulls/836/comments","review_comment_url":"https://api.github.com/repos/ilios/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ilios/frontend/issues/836/comments","statuses_url":"https://api.github.com/repos/ilios/frontend/statuses/bebedf52471f3fcb54c93aff34c2f7a53ac0a0c8","head":{"label":"djvoa12:multi-edit","ref":"multi-edit","sha":"bebedf52471f3fcb54c93aff34c2f7a53ac0a0c8","user":{"login":"djvoa12","id":7553764,"avatar_url":"https://avatars.githubusercontent.com/u/7553764?v=3","gravatar_id":"","url":"https://api.github.com/users/djvoa12","html_url":"https://github.com/djvoa12","followers_url":"https://api.github.com/users/djvoa12/followers","following_url":"https://api.github.com/users/djvoa12/following{/other_user}","gists_url":"https://api.github.com/users/djvoa12/gists{/gist_id}","starred_url":"https://api.github.com/users/djvoa12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djvoa12/subscriptions","organizations_url":"https://api.github.com/users/djvoa12/orgs","repos_url":"https://api.github.com/users/djvoa12/repos","events_url":"https://api.github.com/users/djvoa12/events{/privacy}","received_events_url":"https://api.github.com/users/djvoa12/received_events","type":"User","site_admin":false},"repo":{"id":42668770,"name":"frontend","full_name":"djvoa12/frontend","owner":{"login":"djvoa12","id":7553764,"avatar_url":"https://avatars.githubusercontent.com/u/7553764?v=3","gravatar_id":"","url":"https://api.github.com/users/djvoa12","html_url":"https://github.com/djvoa12","followers_url":"https://api.github.com/users/djvoa12/followers","following_url":"https://api.github.com/users/djvoa12/following{/other_user}","gists_url":"https://api.github.com/users/djvoa12/gists{/gist_id}","starred_url":"https://api.github.com/users/djvoa12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djvoa12/subscriptions","organizations_url":"https://api.github.com/users/djvoa12/orgs","repos_url":"https://api.github.com/users/djvoa12/repos","events_url":"https://api.github.com/users/djvoa12/events{/privacy}","received_events_url":"https://api.github.com/users/djvoa12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djvoa12/frontend","description":"Ilios Frontend (in development)","fork":true,"url":"https://api.github.com/repos/djvoa12/frontend","forks_url":"https://api.github.com/repos/djvoa12/frontend/forks","keys_url":"https://api.github.com/repos/djvoa12/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djvoa12/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djvoa12/frontend/teams","hooks_url":"https://api.github.com/repos/djvoa12/frontend/hooks","issue_events_url":"https://api.github.com/repos/djvoa12/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/djvoa12/frontend/events","assignees_url":"https://api.github.com/repos/djvoa12/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/djvoa12/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/djvoa12/frontend/tags","blobs_url":"https://api.github.com/repos/djvoa12/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djvoa12/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djvoa12/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/djvoa12/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djvoa12/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/djvoa12/frontend/languages","stargazers_url":"https://api.github.com/repos/djvoa12/frontend/stargazers","contributors_url":"https://api.github.com/repos/djvoa12/frontend/contributors","subscribers_url":"https://api.github.com/repos/djvoa12/frontend/subscribers","subscription_url":"https://api.github.com/repos/djvoa12/frontend/subscription","commits_url":"https://api.github.com/repos/djvoa12/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/djvoa12/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/djvoa12/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/djvoa12/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/djvoa12/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/djvoa12/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djvoa12/frontend/merges","archive_url":"https://api.github.com/repos/djvoa12/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djvoa12/frontend/downloads","issues_url":"https://api.github.com/repos/djvoa12/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/djvoa12/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/djvoa12/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/djvoa12/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djvoa12/frontend/labels{/name}","releases_url":"https://api.github.com/repos/djvoa12/frontend/releases{/id}","created_at":"2015-09-17T16:48:32Z","updated_at":"2015-09-17T16:48:34Z","pushed_at":"2015-09-22T01:14:08Z","git_url":"git://github.com/djvoa12/frontend.git","ssh_url":"git@github.com:djvoa12/frontend.git","clone_url":"https://github.com/djvoa12/frontend.git","svn_url":"https://github.com/djvoa12/frontend","homepage":null,"size":8834,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ilios:master","ref":"master","sha":"29b98a757e3aae83922b7fc2483a977e716e403b","user":{"login":"ilios","id":2955721,"avatar_url":"https://avatars.githubusercontent.com/u/2955721?v=3","gravatar_id":"","url":"https://api.github.com/users/ilios","html_url":"https://github.com/ilios","followers_url":"https://api.github.com/users/ilios/followers","following_url":"https://api.github.com/users/ilios/following{/other_user}","gists_url":"https://api.github.com/users/ilios/gists{/gist_id}","starred_url":"https://api.github.com/users/ilios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilios/subscriptions","organizations_url":"https://api.github.com/users/ilios/orgs","repos_url":"https://api.github.com/users/ilios/repos","events_url":"https://api.github.com/users/ilios/events{/privacy}","received_events_url":"https://api.github.com/users/ilios/received_events","type":"Organization","site_admin":false},"repo":{"id":23928410,"name":"frontend","full_name":"ilios/frontend","owner":{"login":"ilios","id":2955721,"avatar_url":"https://avatars.githubusercontent.com/u/2955721?v=3","gravatar_id":"","url":"https://api.github.com/users/ilios","html_url":"https://github.com/ilios","followers_url":"https://api.github.com/users/ilios/followers","following_url":"https://api.github.com/users/ilios/following{/other_user}","gists_url":"https://api.github.com/users/ilios/gists{/gist_id}","starred_url":"https://api.github.com/users/ilios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilios/subscriptions","organizations_url":"https://api.github.com/users/ilios/orgs","repos_url":"https://api.github.com/users/ilios/repos","events_url":"https://api.github.com/users/ilios/events{/privacy}","received_events_url":"https://api.github.com/users/ilios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ilios/frontend","description":"Ilios Frontend (in development)","fork":false,"url":"https://api.github.com/repos/ilios/frontend","forks_url":"https://api.github.com/repos/ilios/frontend/forks","keys_url":"https://api.github.com/repos/ilios/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilios/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilios/frontend/teams","hooks_url":"https://api.github.com/repos/ilios/frontend/hooks","issue_events_url":"https://api.github.com/repos/ilios/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/ilios/frontend/events","assignees_url":"https://api.github.com/repos/ilios/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/ilios/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/ilios/frontend/tags","blobs_url":"https://api.github.com/repos/ilios/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilios/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilios/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilios/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilios/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/ilios/frontend/languages","stargazers_url":"https://api.github.com/repos/ilios/frontend/stargazers","contributors_url":"https://api.github.com/repos/ilios/frontend/contributors","subscribers_url":"https://api.github.com/repos/ilios/frontend/subscribers","subscription_url":"https://api.github.com/repos/ilios/frontend/subscription","commits_url":"https://api.github.com/repos/ilios/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilios/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilios/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilios/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilios/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/ilios/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilios/frontend/merges","archive_url":"https://api.github.com/repos/ilios/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilios/frontend/downloads","issues_url":"https://api.github.com/repos/ilios/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/ilios/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/ilios/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/ilios/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilios/frontend/labels{/name}","releases_url":"https://api.github.com/repos/ilios/frontend/releases{/id}","created_at":"2014-09-11T17:31:12Z","updated_at":"2015-07-14T23:19:44Z","pushed_at":"2015-09-22T01:14:08Z","git_url":"git://github.com/ilios/frontend.git","ssh_url":"git@github.com:ilios/frontend.git","clone_url":"https://github.com/ilios/frontend.git","svn_url":"https://github.com/ilios/frontend","homepage":null,"size":10598,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":225,"forks":10,"open_issues":225,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ilios/frontend/pulls/836"},"html":{"href":"https://github.com/ilios/frontend/pull/836"},"issue":{"href":"https://api.github.com/repos/ilios/frontend/issues/836"},"comments":{"href":"https://api.github.com/repos/ilios/frontend/issues/836/comments"},"review_comments":{"href":"https://api.github.com/repos/ilios/frontend/pulls/836/comments"},"review_comment":{"href":"https://api.github.com/repos/ilios/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ilios/frontend/pulls/836/commits"},"statuses":{"href":"https://api.github.com/repos/ilios/frontend/statuses/bebedf52471f3fcb54c93aff34c2f7a53ac0a0c8"}}}}