Skip to content
Snippets Groups Projects
Commit c4c2e8b0 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

also export student_comment, fixes #113

parent 423ea2ef
No related branches found
No related tags found
No related merge requests found
......@@ -511,6 +511,10 @@ class SolutionsController extends StudipController
$columns[] = '';
}
}
if ($exercises[$exercise['id']]->options['comment']) {
$columns[] = _vips('Bemerkungen');
}
}
$data = [$columns];
......@@ -525,13 +529,17 @@ class SolutionsController extends StudipController
if ($solution) {
$has_solution = true;
$response = VipsSolution::find($solution['id'])->response;
$export = $exercises[$exercise['id']]->exportResponse($response);
$vips_solution = VipsSolution::find($solution['id']);
$export = $exercises[$exercise['id']]->exportResponse($vips_solution->response);
}
for ($i = 0; $i < $item_count[$exercise['id']]; ++$i) {
$row[] = isset($export[$i]) ? $export[$i] : '';
}
if ($exercises[$exercise['id']]->options['comment']) {
$row[] = $solution ? $vips_solution->student_comment : '';
}
}
if ($has_solution) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment