{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/32195490","id":32195490,"diff_hunk":"@@ -34,32 +30,26 @@ public ActionResult execute() throws EntityDoesNotExistException {\n \n         /* Create a new course in the database */\n         data = new InstructorCoursesPageData(account);\n-        data.newCourse = new CourseAttributes(newCourseId, newCourseName);\n-        createCourse(data.newCourse);\n+        CourseAttributes newCourse = new CourseAttributes(newCourseId, newCourseName);\n+        createCourse(newCourse);\n \n         /* Prepare data for the refreshed page after executing the adding action */\n-        data.allCourses = new ArrayList<CourseDetailsBundle>(logic.getCourseSummariesForInstructor(\n+        ArrayList<CourseDetailsBundle> allCourses = new ArrayList<CourseDetailsBundle>(logic.getCourseSummariesForInstructor(\n                                                                     data.account.googleId).values());\n-        data.archivedCourses = extractArchivedCourses(data.allCourses);\n-        CourseDetailsBundle.sortDetailedCoursesByCourseId(data.allCourses);\n-        data.instructors = new HashMap<String, InstructorAttributes>();\n+        String CourseIdToShowParam = \"\";\n+        String CourseNameToShowParam = \"\";\n         \n-        for (CourseDetailsBundle courseDetails : data.allCourses) {\n-            InstructorAttributes instructor = logic.getInstructorForGoogleId(courseDetails.course.id, \n-                                                                             account.googleId);\n-            data.instructors.put(courseDetails.course.id, instructor);\n-        }\n         if (isError) { // there is error in adding the course\n-            data.courseIdToShow = data.newCourse.id;\n-            data.courseNameToShow = data.newCourse.name;\n+            CourseIdToShowParam = Sanitizer.sanitizeForHtml(newCourse.id);\n+            CourseNameToShowParam = Sanitizer.sanitizeForHtml(newCourse.name);","path":"src/main/java/teammates/ui/controller/InstructorCourseAddAction.java","position":50,"original_position":50,"commit_id":"48136e45a7f2c3d729c42bc91e4da24a9ef5e627","original_commit_id":"48136e45a7f2c3d729c42bc91e4da24a9ef5e627","user":{"login":"yj-soh","id":8586080,"avatar_url":"https://avatars.githubusercontent.com/u/8586080?v=3","gravatar_id":"","url":"https://api.github.com/users/yj-soh","html_url":"https://github.com/yj-soh","followers_url":"https://api.github.com/users/yj-soh/followers","following_url":"https://api.github.com/users/yj-soh/following{/other_user}","gists_url":"https://api.github.com/users/yj-soh/gists{/gist_id}","starred_url":"https://api.github.com/users/yj-soh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yj-soh/subscriptions","organizations_url":"https://api.github.com/users/yj-soh/orgs","repos_url":"https://api.github.com/users/yj-soh/repos","events_url":"https://api.github.com/users/yj-soh/events{/privacy}","received_events_url":"https://api.github.com/users/yj-soh/received_events","type":"User","site_admin":false},"body":"Rather than santising on the Java side, use <c:out> on the tag side.","created_at":"2015-06-11T07:26:02Z","updated_at":"2015-06-11T07:26:02Z","html_url":"https://github.com/TEAMMATES/repo/pull/3677#discussion_r32195490","pull_request_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/32195490"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/3677#discussion_r32195490"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677","id":37383686,"html_url":"https://github.com/TEAMMATES/repo/pull/3677","diff_url":"https://github.com/TEAMMATES/repo/pull/3677.diff","patch_url":"https://github.com/TEAMMATES/repo/pull/3677.patch","issue_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3677","number":3677,"state":"open","locked":false,"title":"JSTL - InstructorCoursesPage","user":{"login":"bamboo3250","id":8078323,"avatar_url":"https://avatars.githubusercontent.com/u/8078323?v=3","gravatar_id":"","url":"https://api.github.com/users/bamboo3250","html_url":"https://github.com/bamboo3250","followers_url":"https://api.github.com/users/bamboo3250/followers","following_url":"https://api.github.com/users/bamboo3250/following{/other_user}","gists_url":"https://api.github.com/users/bamboo3250/gists{/gist_id}","starred_url":"https://api.github.com/users/bamboo3250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bamboo3250/subscriptions","organizations_url":"https://api.github.com/users/bamboo3250/orgs","repos_url":"https://api.github.com/users/bamboo3250/repos","events_url":"https://api.github.com/users/bamboo3250/events{/privacy}","received_events_url":"https://api.github.com/users/bamboo3250/received_events","type":"User","site_admin":false},"body":"@yj-soh Could you review this one? \r\nBasically, this page only has 2 main tables, a panel to add a new course and a status message.\r\n\r\nThe init() function of the __PageData requires a full list of courses of the current instructor then inside the init() function, it will separate this list into 2 sub lists, which are active courses and archived courses. Each sub list will belong to a table.\r\n\r\nDev green.","created_at":"2015-06-10T17:31:27Z","updated_at":"2015-06-11T07:26:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c765978145592dc9cef9ad1b14cdf75d113d81f3","assignee":{"login":"yj-soh","id":8586080,"avatar_url":"https://avatars.githubusercontent.com/u/8586080?v=3","gravatar_id":"","url":"https://api.github.com/users/yj-soh","html_url":"https://github.com/yj-soh","followers_url":"https://api.github.com/users/yj-soh/followers","following_url":"https://api.github.com/users/yj-soh/following{/other_user}","gists_url":"https://api.github.com/users/yj-soh/gists{/gist_id}","starred_url":"https://api.github.com/users/yj-soh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yj-soh/subscriptions","organizations_url":"https://api.github.com/users/yj-soh/orgs","repos_url":"https://api.github.com/users/yj-soh/repos","events_url":"https://api.github.com/users/yj-soh/events{/privacy}","received_events_url":"https://api.github.com/users/yj-soh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3677/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/48136e45a7f2c3d729c42bc91e4da24a9ef5e627","head":{"label":"TEAMMATES:JSTL-InstructorCoursesPage","ref":"JSTL-InstructorCoursesPage","sha":"48136e45a7f2c3d729c42bc91e4da24a9ef5e627","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-05-21T18:54:02Z","pushed_at":"2015-06-11T07:09:16Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":148035,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":393,"forks":125,"open_issues":393,"watchers":43,"default_branch":"master"}},"base":{"label":"TEAMMATES:JSTL-Dev","ref":"JSTL-Dev","sha":"6a28c4b72e448c47916cce2f4fbe64e5834043fc","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-05-21T18:54:02Z","pushed_at":"2015-06-11T07:09:16Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":148035,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":393,"forks":125,"open_issues":393,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/3677"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/3677"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/3677/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3677/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/repo/statuses/48136e45a7f2c3d729c42bc91e4da24a9ef5e627"}}}}