Skip to content
Snippets Groups Projects
Commit 058f34fd authored by uhensler's avatar uhensler
Browse files

OO-4245: Better exception handling when archiving a survey course node

parent 23d0a241
No related branches found
No related tags found
No related merge requests found
......@@ -268,17 +268,17 @@ public class SurveyCourseNode extends AbstractAccessableCourseNode {
ZipOutputStream exportStream, String archivePath, String charset) {
EvaluationFormManager evaluationFormManager = CoreSpringFactory.getImpl(EvaluationFormManager.class);
RepositoryEntry ores = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
EvaluationFormSurvey survey = evaluationFormManager.loadSurvey(of(ores, getIdent()));
SessionFilter filter = SessionFilterFactory.createSelectDone(survey);
Form form = evaluationFormManager.loadForm(survey.getFormEntry());
LegendNameGenerator legendNameGenerator = new SessionInformationLegendNameGenerator(filter);
ReportHelper reportHelper = ReportHelper.builder(locale).withLegendNameGenrator(legendNameGenerator).build();
EvaluationFormExcelExport evaluationFormExport = new EvaluationFormExcelExport(form, filter, reportHelper,
getShortName());
try {
RepositoryEntry ores = RepositoryManager.getInstance().lookupRepositoryEntry(course, true);
EvaluationFormSurvey survey = evaluationFormManager.loadSurvey(of(ores, getIdent()));
SessionFilter filter = SessionFilterFactory.createSelectDone(survey);
Form form = evaluationFormManager.loadForm(survey.getFormEntry());
LegendNameGenerator legendNameGenerator = new SessionInformationLegendNameGenerator(filter);
ReportHelper reportHelper = ReportHelper.builder(locale).withLegendNameGenrator(legendNameGenerator).build();
EvaluationFormExcelExport evaluationFormExport = new EvaluationFormExcelExport(form, filter, reportHelper,
getShortName());
evaluationFormExport.export(exportStream, archivePath);
} catch (IOException e) {
log.error("", e);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment