Skip to content

Commit

Permalink
feature: Show IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
worldbeater committed Jun 10, 2024
1 parent 5b68aab commit fd37979
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions webapp/dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,15 @@ def __init__(
code: str,
checked: str,
sent: str,
ip: str,
student: Student | None
):
self.status = status
self.code = code
self.checked = checked
self.sent = sent
self.student = student
self.ip = ip


class GroupInRatingDto:
Expand Down
2 changes: 1 addition & 1 deletion webapp/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def __get_submissions(
output=check.output,
status=check.status,
achievements=[]
), []), message.code, check.time, message.time, student)
), []), message.code, check.time, message.time, message.ip, student)

def __get_task_status_dto(
self,
Expand Down
1 change: 1 addition & 0 deletions webapp/templates/teacher/submissions.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<span class="badge alert-{{ submission.status.color }}">{{ submission.status.name }}</span>
<span class="badge alert-light">Отправлено: {{ submission.sent.strftime('%d.%m.%Y %H:%M') }}</span>
<span class="badge alert-light">Проверено: {{ submission.checked.strftime('%d.%m.%Y %H:%M') }}</span>
<span class="badge alert-light">IP: {{ submission.ip }}</span>
</div>
{% if submission.status.error_message is not none and submission.status.error_message %}
<div>Подробные сведения об ошибке:</div>
Expand Down

0 comments on commit fd37979

Please sign in to comment.