@RequestMapping(value = "/candidate-session/{xid}/terminate", method = RequestMethod.POST) public String terminateCandidateSession( @PathVariable final long xid, final RedirectAttributes redirectAttributes) throws PrivilegeException, DomainEntityNotFoundException { assessmentProctoringService.terminateCandidateSession(xid); GlobalRouter.addFlashMessage(redirectAttributes, "Terminated Candidate Session #" + xid); return ltiInstructorRouter.buildInstructorRedirect("/candidate-session/" + xid); }
@RequestMapping(value = "/delete-all-sessions", method = RequestMethod.POST) public String deleteAllCandidateSessions(final RedirectAttributes redirectAttributes) throws PrivilegeException, DomainEntityNotFoundException { final Delivery thisDelivery = identityService.getCurrentThreadLtiResource().getDelivery(); final int deletedCount = assessmentProctoringService.deleteCandidateSessionsForDelivery(thisDelivery.getId()); GlobalRouter.addFlashMessage( redirectAttributes, "Deleted " + deletedCount + " candidate session" + (deletedCount != 1 ? "s" : "")); return ltiInstructorRouter.buildInstructorRedirect("/candidate-sessions"); }