Commits

yangyh committed ae181fb

Cleanup

Comments (0)

Files changed (1)

src/com/servlets/UserAdminServlet.java

 
 		String type = (String) request.getParameter("type");
 		response.setContentType("text/html");
-		
-		System.out.println("Processing " + type + " " + request.getParameter("user_id") + " " + request.getParameter("announcement_id"));
 
 		if(type.equals("create-announcement")) {		
 			ServletContext context = request.getServletContext();
 		}
 		
 		if(type.equals("delete-quiz")) {
-//			System.out.println("Delete quiz id " + request.getParameter("quiz_id"));
 			Quiz quiz = Quiz.fetch(Integer.parseInt(request.getParameter("quiz_id")));
 			quiz.delete();
 		}
 		
-		if(request.getParameter("user_id") != null) {
-//			System.out.println("doing user stuff");
-			
+		if(request.getParameter("user_id") != null) {			
 			int userId = Integer.parseInt((String) request.getParameter("user_id"));
 			
 			User user = new User(userId);
 		}
 		
 		if(request.getParameter("announcement_id") != null) {
-//			System.out.println("doing announcement stuff");
-
 			int announcementId = Integer.parseInt((String) request.getParameter("announcement_id"));
 			
 			if(type.equals("delete-announcement")) {
-//				System.out.println("Deleting announcement: " + announcementId);
 				Announcement.deleteAnnouncement(announcementId);
 			}			
 		}