/** * Using the Student UUID passed, return the ExternalStudentRecordsLiteTO in its current state, * creating it if necessary. * * @param id Student identifier Any errors will throw this generic exception. * @return Service response with success value, in the JSON format. * @throws ObjectNotFoundException If any reference data could not be loaded. */ @RequestMapping(value = "/test", method = RequestMethod.GET) @PreAuthorize(Permission.SECURITY_PERSON_READ) public @ResponseBody List<ExternalStudentTestTO> loadStudentTestRecords( final @PathVariable UUID id) throws ObjectNotFoundException { String schoolId = getStudentId(id); List<ExternalStudentTestTO> studentTestTOs = externalStudentTestTOFactory.asTOList( externalStudentTestService.getStudentTestResults(schoolId, id)); return studentTestTOs; }
/** * Using the Student UUID passed, return the ExternalStudentRecordsLiteTO in its current state, * creating it if necessary. * * @param id Student identifier Any errors will throw this generic exception. * @return Service response with success value, in the JSON format. * @throws ObjectNotFoundException, IOException If any reference data could not be loaded. */ @RequestMapping(value = "/test/details", method = RequestMethod.GET) @PreAuthorize(Permission.SECURITY_PERSON_READ) public String getTestProviderDetails( final @PathVariable UUID id, final @RequestParam(required = true) String testCode, final @RequestParam(required = false) String subTestCode, HttpServletResponse httpServletResponse) throws ObjectNotFoundException, IOException { Person person = personService.get(id); String url = (String) externalStudentTestService.getTestDetails(testCode, subTestCode, person); return "redirect:" + url; }