Skip to content
Snippets Groups Projects

Resolve "Lecturer schould be able to un-queue students after accepting a queue request"

Files

@@ -424,25 +424,6 @@ public class LabController {
return "redirect:/lab/" + qSession.getId();
}
/**
* Performs the 'revoke request' command and redirects the user back to the lab overview page.
*
* @param student The student that is currently authenticated and is requesting a revoke.
* @param qSession The lab the student is revoking their request in.
* @return A redirect to the lab overview page.
*/
@Transactional
@PostMapping("/lab/{qSession}/revoke")
@PreAuthorize("@permissionService.canRevokeFromSession(#qSession.id)")
public String revokeRequest(@AuthenticatedPerson Person student,
@PathEntity QueueSession<?> qSession) {
qSession.getOpenRequestForPerson(student.getId())
.filter(Request::isRevokable)
.ifPresent(rs::revokeRequest);
return "redirect:/lab/" + qSession.getId();
}
/**
* Gets the lab creation page. This page should be viewable by all teachers and managers (those that are
* allowed to create labs). This page allows for editing a lab before final creation of that lab.
Loading