Skip to content
Snippets Groups Projects

Resolve Amount of requests per TA In a single lab + the time taken since the last lab.

Files

@@ -993,4 +993,35 @@ public class LabController {
return "redirect:/lab/{session}";
}
/**
* Endpoint for the status page of an individual lab/session
*
* @param qSession The lab/session we are interested about.
* @param model The model to fill
* @return The view name
*/
@GetMapping("/lab/{qSession}/status")
@PreAuthorize("@permissionService.canManageSession(#qSession)")
public String status(@PathEntity QueueSession<?> qSession,
Model model) {
var session = qSession.getSessionDto();
if (session.getEdition() != null) {
model.addAttribute("edition", eCache.getRequired(session.getEdition().getId()));
} else {
model.addAttribute("ec", ecCache.getRequired(session.getEditionCollection().getId()));
model.addAttribute("editionsToCourses", session.getEditions().stream()
.collect(Collectors.toMap(EditionSummaryDTO::getId,
edition -> eCache.getRequired(edition.getId()).getCourse())));
}
model.addAttribute("qSession", qSession.toViewDTO());
model.addAttribute("rooms",
rCache.getAndIgnoreMissing(session.getRooms().stream().map(RoomDetailsDTO::getId)));
model.addAttribute("assignments",
aCache.getAndIgnoreMissing(
session.getAssignments().stream().map(AssignmentSummaryDTO::getId)));
return "/lab/view/status";
}
}
Loading