@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");
  }
  @RequestMapping(value = "/candidate-sessions", method = RequestMethod.GET)
  public String showCandidateSummaryReport(final Model model)
      throws PrivilegeException, DomainEntityNotFoundException {
    final Delivery thisDelivery = identityService.getCurrentThreadLtiResource().getDelivery();
    final DeliveryCandidateSummaryReport report =
        assessmentReportingService.buildDeliveryCandidateSummaryReport(thisDelivery.getId());

    model.addAttribute(report);
    model.addAttribute(
        "candidateSessionListRouting",
        ltiInstructorRouter.buildCandidateSessionListRouting(report));
    return "instructor/listCandidateSessions";
  }