Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix for wrong file download in testcases, switched columns in task submission view and adding github repo link to overview page #46

Merged
merged 3 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codeGrader/frontend/admin/handlers/TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
6 changes: 6 additions & 0 deletions codeGrader/frontend/admin/templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ <h5>Password Reset</h5>
</form>
</div>
</div>
<div class="row">
<div id="source_code">
<h2>Source Code</h2>
<p>The Source code to this application is avaiable in this <a href="https://github.com/ooemperor/CodeGrader">GitHub</a> Repository. </p>
</div>
</div>
<script>
// script for the password visibility
// getting the elements on which we will operate
Expand Down
6 changes: 3 additions & 3 deletions codeGrader/frontend/admin/templates/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ <h2 class="accordion-header">
{{ sub["user"]["username"] }}
</a>
</td>
<td>
{{ sub["state"] }}
</td>
<td>
<a href="{{ url_for('SubmissionFile', id_ = sub['id']) }}" target="_blank"
download="{{ sub['file']['filename'] }}">
{{ sub["file"]["filename"]}}
</a>
</td>
<td>
{{ sub["state"] }}
</td>
<td>
{{ sub["max_score"] }}
</td>
Expand Down
6 changes: 6 additions & 0 deletions codeGrader/frontend/user/templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ <h5 class="card-title">
</div>
</div>
</div>
<div class="row">
<div id="source_code">
<h2>Source Code</h2>
<p>The Source code to this application is avaiable in this <a href="https://github.com/ooemperor/CodeGrader">GitHub</a> Repository. </p>
</div>
</div>
<script>
// script for the password visibility
// getting the elements on which we will operate
Expand Down
Loading