Skip to content

Commit

Permalink
remove grades update due to the following reasons: (#127)
Browse files Browse the repository at this point in the history
- check that if a retake a course i can't edit the previous notes
- check that if a passed the current term and was signed in a final exam
- check that i passed the term and and there are not final grades
  • Loading branch information
gibarsin authored Feb 6, 2017
1 parent 9992034 commit 1ecfde0
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,33 +306,6 @@ public Response studentsGradesNew(@PathParam("docket") final Integer docket,
return created(uri).build();
}

@POST
@Consumes(MediaType.APPLICATION_JSON)
@Path("/{docket}/grades/{gradeId}")
public Response studentsGradesUpdate(
@PathParam("docket") final Integer docket,
@Min(1)
@PathParam("gradeId") final Integer gradeId,
@Valid final GradeDTO gradeDTO){

final Student student = ss.getByDocket(docket);
if(student == null){
return status(Status.NOT_FOUND).build();
}

final Course course = cs.getByCourseID(gradeDTO.getCourseId());
if(course == null){
return status(Status.BAD_REQUEST).build();
}

Grade grade = mapper.convertToGrade(gradeDTO, student, course, gradeId);

ss.editGrade(grade);

return noContent().build();

}

@GET
@Path("/{docket}/finalInscriptions")
public Response studentsFinalInscriptionsIndex(@PathParam("docket") final Integer docket){
Expand Down

0 comments on commit 1ecfde0

Please sign in to comment.