{"action":"created","comment":{"url":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments/65700657","id":65700657,"diff_hunk":"@@ -0,0 +1,145 @@\n+/**********************************************************************************\n+ * $URL$\n+ * $Id$\n+ ***********************************************************************************\n+ *\n+ * Copyright (c) 2004, 2005, 2006, 2008 The Sakai Foundation\n+ *\n+ * Licensed under the Educational Community License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.opensource.org/licenses/ECL-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ **********************************************************************************/\n+\n+\n+\n+package org.sakaiproject.tool.assessment.ui.listener.author;\n+\n+import java.util.ArrayList;\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.Iterator;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+\n+import javax.faces.event.AbortProcessingException;\n+import javax.faces.event.ActionEvent;\n+import javax.faces.event.ActionListener;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import org.sakaiproject.event.cover.EventTrackingService;\n+import org.sakaiproject.tool.assessment.facade.AgentFacade;\n+import org.sakaiproject.tool.assessment.facade.AssessmentFacade;\n+import org.sakaiproject.tool.assessment.facade.ItemFacade;\n+import org.sakaiproject.tool.assessment.facade.SectionFacade;\n+import org.sakaiproject.tool.assessment.services.ItemService;\n+import org.sakaiproject.tool.assessment.services.QuestionPoolService;\n+import org.sakaiproject.tool.assessment.services.assessment.AssessmentService;\n+import org.sakaiproject.tool.assessment.ui.bean.author.AssessmentBean;\n+import org.sakaiproject.tool.assessment.ui.bean.author.ItemAuthorBean;\n+import org.sakaiproject.tool.assessment.ui.bean.authz.AuthorizationBean;\n+import org.sakaiproject.tool.assessment.ui.bean.questionpool.QuestionPoolBean;\n+import org.sakaiproject.tool.assessment.ui.listener.util.ContextUtil;\n+\n+\n+/**\n+ * <p>Title: Samigo</p>\n+ * <p>Description: Sakai Assessment Manager</p>\n+ * <p>Organization: Sakai Project</p>\n+ */\n+\n+public class ItemRemoveListener implements ActionListener\n+{\n+  private static Logger log = LoggerFactory.getLogger(ItemModifyListener.class);\n+  //private String scalename;  // used for multiple choice Survey","path":"samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/listener/author/ItemRemoveListener.java","position":65,"original_position":65,"commit_id":"4b843c527f41ce1c826bf8f053ac17f9e1278ce9","original_commit_id":"4b843c527f41ce1c826bf8f053ac17f9e1278ce9","user":{"login":"bjones86","id":10403943,"avatar_url":"https://avatars.githubusercontent.com/u/10403943?v=3","gravatar_id":"","url":"https://api.github.com/users/bjones86","html_url":"https://github.com/bjones86","followers_url":"https://api.github.com/users/bjones86/followers","following_url":"https://api.github.com/users/bjones86/following{/other_user}","gists_url":"https://api.github.com/users/bjones86/gists{/gist_id}","starred_url":"https://api.github.com/users/bjones86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjones86/subscriptions","organizations_url":"https://api.github.com/users/bjones86/orgs","repos_url":"https://api.github.com/users/bjones86/repos","events_url":"https://api.github.com/users/bjones86/events{/privacy}","received_events_url":"https://api.github.com/users/bjones86/received_events","type":"User","site_admin":false},"body":"If this code is unnecessary, can we just remove it?","created_at":"2016-06-03T12:44:27Z","updated_at":"2016-06-03T12:44:27Z","html_url":"https://github.com/sakaiproject/sakai/pull/2735#discussion_r65700657","pull_request_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735","_links":{"self":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments/65700657"},"html":{"href":"https://github.com/sakaiproject/sakai/pull/2735#discussion_r65700657"},"pull_request":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735"}}},"pull_request":{"url":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735","id":72411510,"html_url":"https://github.com/sakaiproject/sakai/pull/2735","diff_url":"https://github.com/sakaiproject/sakai/pull/2735.diff","patch_url":"https://github.com/sakaiproject/sakai/pull/2735.patch","issue_url":"https://api.github.com/repos/sakaiproject/sakai/issues/2735","number":2735,"state":"open","locked":false,"title":"SAM-2907 - When editing assessment, bean state won't update causing duplicate controller calls if browser is refreshed","user":{"login":"fgeraci","id":4834808,"avatar_url":"https://avatars.githubusercontent.com/u/4834808?v=3","gravatar_id":"","url":"https://api.github.com/users/fgeraci","html_url":"https://github.com/fgeraci","followers_url":"https://api.github.com/users/fgeraci/followers","following_url":"https://api.github.com/users/fgeraci/following{/other_user}","gists_url":"https://api.github.com/users/fgeraci/gists{/gist_id}","starred_url":"https://api.github.com/users/fgeraci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgeraci/subscriptions","organizations_url":"https://api.github.com/users/fgeraci/orgs","repos_url":"https://api.github.com/users/fgeraci/repos","events_url":"https://api.github.com/users/fgeraci/events{/privacy}","received_events_url":"https://api.github.com/users/fgeraci/received_events","type":"User","site_admin":false},"body":"[SAM-2907](https://jira.sakaiproject.org/browse/SAM-2907)\r\n\r\nI did a couple of changes of how the listeners/beans handle deleting an item.\r\n\r\nWhen removing items:\r\nRight now (master) the handler to delete an item is in the bean. I created a new ItemRemoveListener and moved the action pointing from the bean to the new listener in the commandLink of the JSP. Ideally, we should also move the confirmDelete call, but that is just a commandLink to another page, although it sets up the authorbean  for the next call.\r\n\r\nWhen adding items:\r\nI made the itembean which belongs to the scope authorbean to keep track of its Id, and if it is already set, it wont create a new item but it will reaload the new one. Not ideal but it makes sense if a page is immediately refreshed after creating a new question.","created_at":"2016-06-02T20:25:16Z","updated_at":"2016-06-03T12:44:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a068780166a8fb900ecdaf04c6661a0b93f623e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735/commits","review_comments_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735/comments","review_comment_url":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/issues/2735/comments","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/4b843c527f41ce1c826bf8f053ac17f9e1278ce9","head":{"label":"fgeraci:SAM-2907","ref":"SAM-2907","sha":"4b843c527f41ce1c826bf8f053ac17f9e1278ce9","user":{"login":"fgeraci","id":4834808,"avatar_url":"https://avatars.githubusercontent.com/u/4834808?v=3","gravatar_id":"","url":"https://api.github.com/users/fgeraci","html_url":"https://github.com/fgeraci","followers_url":"https://api.github.com/users/fgeraci/followers","following_url":"https://api.github.com/users/fgeraci/following{/other_user}","gists_url":"https://api.github.com/users/fgeraci/gists{/gist_id}","starred_url":"https://api.github.com/users/fgeraci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgeraci/subscriptions","organizations_url":"https://api.github.com/users/fgeraci/orgs","repos_url":"https://api.github.com/users/fgeraci/repos","events_url":"https://api.github.com/users/fgeraci/events{/privacy}","received_events_url":"https://api.github.com/users/fgeraci/received_events","type":"User","site_admin":false},"repo":{"id":58209217,"name":"sakai","full_name":"fgeraci/sakai","owner":{"login":"fgeraci","id":4834808,"avatar_url":"https://avatars.githubusercontent.com/u/4834808?v=3","gravatar_id":"","url":"https://api.github.com/users/fgeraci","html_url":"https://github.com/fgeraci","followers_url":"https://api.github.com/users/fgeraci/followers","following_url":"https://api.github.com/users/fgeraci/following{/other_user}","gists_url":"https://api.github.com/users/fgeraci/gists{/gist_id}","starred_url":"https://api.github.com/users/fgeraci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgeraci/subscriptions","organizations_url":"https://api.github.com/users/fgeraci/orgs","repos_url":"https://api.github.com/users/fgeraci/repos","events_url":"https://api.github.com/users/fgeraci/events{/privacy}","received_events_url":"https://api.github.com/users/fgeraci/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fgeraci/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":true,"url":"https://api.github.com/repos/fgeraci/sakai","forks_url":"https://api.github.com/repos/fgeraci/sakai/forks","keys_url":"https://api.github.com/repos/fgeraci/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fgeraci/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fgeraci/sakai/teams","hooks_url":"https://api.github.com/repos/fgeraci/sakai/hooks","issue_events_url":"https://api.github.com/repos/fgeraci/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/fgeraci/sakai/events","assignees_url":"https://api.github.com/repos/fgeraci/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/fgeraci/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/fgeraci/sakai/tags","blobs_url":"https://api.github.com/repos/fgeraci/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fgeraci/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fgeraci/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/fgeraci/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fgeraci/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/fgeraci/sakai/languages","stargazers_url":"https://api.github.com/repos/fgeraci/sakai/stargazers","contributors_url":"https://api.github.com/repos/fgeraci/sakai/contributors","subscribers_url":"https://api.github.com/repos/fgeraci/sakai/subscribers","subscription_url":"https://api.github.com/repos/fgeraci/sakai/subscription","commits_url":"https://api.github.com/repos/fgeraci/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/fgeraci/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/fgeraci/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/fgeraci/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/fgeraci/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/fgeraci/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fgeraci/sakai/merges","archive_url":"https://api.github.com/repos/fgeraci/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fgeraci/sakai/downloads","issues_url":"https://api.github.com/repos/fgeraci/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/fgeraci/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/fgeraci/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/fgeraci/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fgeraci/sakai/labels{/name}","releases_url":"https://api.github.com/repos/fgeraci/sakai/releases{/id}","deployments_url":"https://api.github.com/repos/fgeraci/sakai/deployments","created_at":"2016-05-06T13:28:48Z","updated_at":"2016-05-06T13:29:29Z","pushed_at":"2016-06-02T20:09:47Z","git_url":"git://github.com/fgeraci/sakai.git","ssh_url":"git@github.com:fgeraci/sakai.git","clone_url":"https://github.com/fgeraci/sakai.git","svn_url":"https://github.com/fgeraci/sakai","homepage":"https://www.sakaiproject.org","size":246298,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"sakaiproject:master","ref":"master","sha":"40cf1dbc07c8279c7a843432d1041c21763c57a8","user":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars.githubusercontent.com/u/314726?v=3","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"repo":{"id":28589709,"name":"sakai","full_name":"sakaiproject/sakai","owner":{"login":"sakaiproject","id":314726,"avatar_url":"https://avatars.githubusercontent.com/u/314726?v=3","gravatar_id":"","url":"https://api.github.com/users/sakaiproject","html_url":"https://github.com/sakaiproject","followers_url":"https://api.github.com/users/sakaiproject/followers","following_url":"https://api.github.com/users/sakaiproject/following{/other_user}","gists_url":"https://api.github.com/users/sakaiproject/gists{/gist_id}","starred_url":"https://api.github.com/users/sakaiproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakaiproject/subscriptions","organizations_url":"https://api.github.com/users/sakaiproject/orgs","repos_url":"https://api.github.com/users/sakaiproject/repos","events_url":"https://api.github.com/users/sakaiproject/events{/privacy}","received_events_url":"https://api.github.com/users/sakaiproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sakaiproject/sakai","description":"Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.","fork":false,"url":"https://api.github.com/repos/sakaiproject/sakai","forks_url":"https://api.github.com/repos/sakaiproject/sakai/forks","keys_url":"https://api.github.com/repos/sakaiproject/sakai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sakaiproject/sakai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sakaiproject/sakai/teams","hooks_url":"https://api.github.com/repos/sakaiproject/sakai/hooks","issue_events_url":"https://api.github.com/repos/sakaiproject/sakai/issues/events{/number}","events_url":"https://api.github.com/repos/sakaiproject/sakai/events","assignees_url":"https://api.github.com/repos/sakaiproject/sakai/assignees{/user}","branches_url":"https://api.github.com/repos/sakaiproject/sakai/branches{/branch}","tags_url":"https://api.github.com/repos/sakaiproject/sakai/tags","blobs_url":"https://api.github.com/repos/sakaiproject/sakai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sakaiproject/sakai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sakaiproject/sakai/git/refs{/sha}","trees_url":"https://api.github.com/repos/sakaiproject/sakai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sakaiproject/sakai/statuses/{sha}","languages_url":"https://api.github.com/repos/sakaiproject/sakai/languages","stargazers_url":"https://api.github.com/repos/sakaiproject/sakai/stargazers","contributors_url":"https://api.github.com/repos/sakaiproject/sakai/contributors","subscribers_url":"https://api.github.com/repos/sakaiproject/sakai/subscribers","subscription_url":"https://api.github.com/repos/sakaiproject/sakai/subscription","commits_url":"https://api.github.com/repos/sakaiproject/sakai/commits{/sha}","git_commits_url":"https://api.github.com/repos/sakaiproject/sakai/git/commits{/sha}","comments_url":"https://api.github.com/repos/sakaiproject/sakai/comments{/number}","issue_comment_url":"https://api.github.com/repos/sakaiproject/sakai/issues/comments{/number}","contents_url":"https://api.github.com/repos/sakaiproject/sakai/contents/{+path}","compare_url":"https://api.github.com/repos/sakaiproject/sakai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sakaiproject/sakai/merges","archive_url":"https://api.github.com/repos/sakaiproject/sakai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sakaiproject/sakai/downloads","issues_url":"https://api.github.com/repos/sakaiproject/sakai/issues{/number}","pulls_url":"https://api.github.com/repos/sakaiproject/sakai/pulls{/number}","milestones_url":"https://api.github.com/repos/sakaiproject/sakai/milestones{/number}","notifications_url":"https://api.github.com/repos/sakaiproject/sakai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sakaiproject/sakai/labels{/name}","releases_url":"https://api.github.com/repos/sakaiproject/sakai/releases{/id}","deployments_url":"https://api.github.com/repos/sakaiproject/sakai/deployments","created_at":"2014-12-29T11:14:17Z","updated_at":"2016-06-02T11:25:29Z","pushed_at":"2016-06-03T12:24:51Z","git_url":"git://github.com/sakaiproject/sakai.git","ssh_url":"git@github.com:sakaiproject/sakai.git","clone_url":"https://github.com/sakaiproject/sakai.git","svn_url":"https://github.com/sakaiproject/sakai","homepage":"https://www.sakaiproject.org","size":272551,"stargazers_count":144,"watchers_count":144,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":256,"mirror_url":null,"open_issues_count":90,"forks":256,"open_issues":90,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735"},"html":{"href":"https://github.com/sakaiproject/sakai/pull/2735"},"issue":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/2735"},"comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/issues/2735/comments"},"review_comments":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735/comments"},"review_comment":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sakaiproject/sakai/pulls/2735/commits"},"statuses":{"href":"https://api.github.com/repos/sakaiproject/sakai/statuses/4b843c527f41ce1c826bf8f053ac17f9e1278ce9"}}}}
{"actor":{"display_login":"bjones86"}}