The following document contains the results of PMD's CPD 4.2.2.
File | Line |
---|---|
com/germinus/merlin/manager/AssignmentManager.java | 114 |
com/germinus/merlin/manager/AssignmentManager.java | 343 |
} else newAssignment.setVisible(false); //Specific assignment attributes if (request.getParameter("type").equals("Online Activity") || request.getParameter("type").equals("Upload a Single File")){ if (request.getParameter("resubmit").equals("true")){ ((AssignmentInteractive) newAssignment).setResubmit(true); } else ((AssignmentInteractive) newAssignment).setResubmit(false); if (request.getParameter("emailsToTeacher").equals("true")){ ((AssignmentInteractive) newAssignment).setEmailsToTeacher(true); } else ((AssignmentInteractive) newAssignment).setEmailsToTeacher(false); if (request.getParameter("preventLateSubmissions").equals("true")){ ((AssignmentInteractive) newAssignment).setPreventLateSubmissions(true); } else ((AssignmentInteractive) newAssignment).setPreventLateSubmissions(false); } if (request.getParameter("type").equals("Upload a Single File")){ ((AssignmentUploadASingleFile) newAssignment).setMaxSize(request.getParameter("maxsize")); if (request.getParameter("allowNotes").equals("true")){ ((AssignmentUploadASingleFile) newAssignment).setAllowNotes(true); } else ((AssignmentUploadASingleFile) newAssignment).setAllowNotes(false); } |
File | Line |
---|---|
com/germinus/merlin/model/ForumTopic.java | 55 |
com/germinus/merlin/model/Label.java | 49 |
} @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "idResourceContainer", nullable = false) public ResourceContainer getResourceContainer() { return this.resourceContainer; } public void setResourceContainer(ResourceContainer resourceContainer) { this.resourceContainer = resourceContainer; } @Column(name = "name", length = 75) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "description", length = 200) public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } } |
File | Line |
---|---|
com/germinus/merlin/manager/AssignmentManager.java | 93 |
com/germinus/merlin/manager/AssignmentManager.java | 321 |
newAssignment.setResourceContainer(resourceContainer); Date date = new Date(); String startDateString = request.getParameter("startDate"); String endDateString = request.getParameter("endDate"); SimpleDateFormat formatoDelTexto= new SimpleDateFormat("dd/MM/yyyy"); try { date = formatoDelTexto.parse(startDateString); newAssignment.setBegintime(date); date = formatoDelTexto.parse(endDateString); newAssignment.setEndtime(date); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (request.getParameter("hideDescriptionBeforeAvailable").equals("true")) newAssignment.setHideDescriptionBeforeAvailable(true); else newAssignment.setHideDescriptionBeforeAvailable(false); if (request.getParameter("visible").equals("true")){ |
File | Line |
---|---|
com/germinus/merlin/manager/AssignmentResultManager.java | 352 |
com/germinus/merlin/manager/AssignmentResultManager.java | 378 |
RenderResponse response, Course course) { Long resultId= new Long(request.getParameter("resultId")); Long assignmentId = new Long(request.getParameter("assignmentId")); Assignment assignment = assignmentManager.getAssignment(assignmentId, course); Set<AssignmentResult> assignmentResultsSet = assignment.getResults(); Iterator<AssignmentResult> assignmentResultIterator = assignmentResultsSet.iterator(); boolean notFound=true; AssignmentResult assignmentResult=null; while (assignmentResultIterator.hasNext() && notFound){ assignmentResult = assignmentResultIterator.next(); if (assignmentResult.getResultid()==resultId){ notFound=false; } } assignmentResultsSet.remove(assignmentResult); |
File | Line |
---|---|
com/germinus/merlin/controller/assignments/AssignmentEditController.java | 144 |
com/germinus/merlin/controller/assignments/AssignmentsListController.java | 88 |
long courseId = liferayUtil.getComunityGroupId(request, response); // get the user type: student or teacher String usertype = merlinUtil.getUserType(request, response, courseId); // get the course Course course = courseManager.getCourse(courseId); Map<String, SearchContainer> model; model = assignmentManager.listAssignment(request, response, course, usertype); if (usertype=="teacher"){ return new ModelAndView("assignments/listAssignment/teacherAssignmentsList", "model", model); } else if (usertype=="student"){ return new ModelAndView("assignments/listAssignment/studentAssignmentsList", "model", model); } else //guest user, user without teacher or student role return new ModelAndView("errors/notAuthorized", "model", model); } /** * @param assignmentManager * the assignmentManager to set */ public void setAssignmentManager( AssignmentManager assignmentManager) { |
File | Line |
---|---|
com/germinus/merlin/model/Advise.java | 56 |
com/germinus/merlin/model/Document.java | 51 |
this.id = adviseid; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "idResourceContainer",nullable = false) public ResourceContainer getResourceContainer() { return this.resourceContainer; } public void setResourceContainer(ResourceContainer resourceContainer) { this.resourceContainer = resourceContainer; } @Column(name = "name", length = 75) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "comments") public String getComments() { return this.description; |