Skip to content
Snippets Groups Projects
Commit c94126e0 authored by Tom Käsler's avatar Tom Käsler
Browse files

let jackson create the list

parent 79d6689f
1 merge request!16Refac export
......@@ -272,15 +272,14 @@ public class SessionController extends PaginationController {
@ApiOperation(value = "export sessions", nickname = "exportSession")
@RequestMapping(value = "/export", method = RequestMethod.GET)
public List<ImportExportSession> exportSession(
@ApiParam(value = "comma seperated list of sessionkeys", required = true) @RequestParam(value = "sessionkeys", defaultValue = "") final String sessionkeys,
@ApiParam(value = "sessionkey", required = true) @RequestParam(value = "sessionkey", defaultValue = "") final List<String> sessionkey,
@ApiParam(value = "wether statistics shall be exported", required = true) @RequestParam(value = "withAnswerStatistics", defaultValue = "false") final Boolean withAnswerStatistics,
@ApiParam(value = "wether interposed questions shall be exported", required = true) @RequestParam(value = "withFeedbackQuestions", defaultValue = "false") final Boolean withFeedbackQuestions,
@ApiParam(value = "http servlet response", required = true) final HttpServletResponse response
) {
List<ImportExportSession> sessions = new ArrayList<ImportExportSession>();
ImportExportSession temp;
String[] splittedKeys = sessionkeys.split(",");
for (String key : splittedKeys) {
for (String key : sessionkey) {
sessionService.setActive(key, false);
temp = sessionService.exportSession(key, withAnswerStatistics, withFeedbackQuestions);
if (temp != null) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment