diff --git a/codeGrader/frontend/admin/handlers/TestCase.py b/codeGrader/frontend/admin/handlers/TestCase.py index 552f197..974e49b 100644 --- a/codeGrader/frontend/admin/handlers/TestCase.py +++ b/codeGrader/frontend/admin/handlers/TestCase.py @@ -197,9 +197,9 @@ def get(self, id_: int) -> Union[str, Response]: task_id = testcase["task"]["profile"]["id"] if self.admin.check_permission('r', task_profile_id): # when admin is allowed to view this File - input_file_id = testcase["input_file_id"] + file_id = testcase[self.file_id_name] - req = self.api.get_file(f"/file/{input_file_id}") + req = self.api.get_file(f"/file/{file_id}") filename = testcase[self.file_type_name]["filename"] req.headers['Content-Disposition'] = f"attachment;filename={filename}" return Response(stream_with_context(req.iter_content(chunk_size=2048)), diff --git a/codeGrader/frontend/admin/templates/settings.html b/codeGrader/frontend/admin/templates/settings.html index eaf318d..55cbcf9 100644 --- a/codeGrader/frontend/admin/templates/settings.html +++ b/codeGrader/frontend/admin/templates/settings.html @@ -115,6 +115,12 @@
The Source code to this application is avaiable in this GitHub Repository.
+