courseRates.setId(enrollment.getId());
courseRates.setPoints(rating);
courseRates.setSysdate(new Date());
courseRates.setEnrollment(enrollment);
CourseratesJpaController courseratesJPAController = new CourseratesJpaController();
try {
courseratesJPAController.create(courseRates);
success = true;
} catch (IllegalOrphanException ex) {
success = false;
Logger.getLogger(RateCourseServlet.class.getName()).log(Level.SEVERE, null, ex);
} catch (PreexistingEntityException ex) {