Enhance task numbers, enable late submissions with badges, and fix overdue badges

This commit is contained in:
Dmitry Belan
2026-09-28 21:13:19 +03:00
parent aa8894df59
commit 6371b3202f
5 changed files with 44 additions and 18 deletions
@@ -166,10 +166,20 @@
<svg class="w-5 h-5 text-rose-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg>
Прием ответов завершен
</h4>
<p class="text-sm">Вы больше не можете отправлять ответы, так как дедлайн истек или время на выполнение закончилось.</p>
<p class="text-sm">Вы больше не можете отправлять ответы, так как время на выполнение закончилось.</p>
</div>
{% else %}
{% if is_late %}
<div class="mb-6 p-4 rounded-lg border bg-rose-950/20 text-rose-300 border-rose-800/40 flex items-start gap-3 shadow-sm">
<svg class="w-5 h-5 text-rose-400 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path></svg>
<div>
<h4 class="font-bold text-rose-300 mb-1 font-heading">Дедлайн прошел</h4>
<p class="text-sm text-rose-300/80">Вы выполняете это задание после дедлайна (дорешивание).</p>
</div>
</div>
{% endif %}
{% if time_left_seconds is not None %}
<div id="timer-banner" class="sticky top-16 sm:top-20 z-40 mb-8 p-4 rounded-xl border bg-obsidian-base border-accent-blue shadow-lg shadow-accent-blue/10 flex justify-between items-center transition-colors duration-300">
<div class="flex items-center gap-2.5">
+20 -9
View File
@@ -22,29 +22,40 @@
</span>
{% if sub %}
{% if sub.is_late %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-rose-950/40 text-rose-400 border border-rose-800/50">
После дедлайна
</span>
{% endif %}
{% if sub.status == 'GRADED' %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-emerald-950/40 text-emerald-300 border border-emerald-800/50">
<svg class="w-3 h-3 text-emerald-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-status-emeraldBg text-status-emerald border border-status-emerald/30">
<svg class="w-3 h-3 text-status-emerald" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path d="M5 13l4 4L19 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"></path>
</svg>
Принято ({{ sub.grade|default:"-" }})
</span>
{% elif sub.status == 'IN_PROGRESS' %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-accent-blue/20 text-accent-blue border border-accent-blue/30">
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-accent-blueSubtle text-accent-blue border border-accent-blueBorder">
<span class="w-1.5 h-1.5 rounded-full bg-accent-blue"></span>
В процессе
</span>
{% else %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-amber-950/40 text-amber-300 border border-amber-800/50">
<span class="w-1.5 h-1.5 rounded-full bg-amber-400"></span>
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-status-amberBg text-status-amber border border-status-amber/30">
<span class="w-1.5 h-1.5 rounded-full bg-status-amber"></span>
Ожидает проверки
</span>
{% endif %}
{% else %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-rose-950/40 text-rose-400 border border-rose-800/50">
<span class="w-1.5 h-1.5 rounded-full bg-rose-400"></span>
Требует сдачи
</span>
{% if assignment.deadline and now > assignment.deadline %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-obsidian-borderLight/20 text-txt-muted border border-obsidian-borderLight/50">
Дедлайн прошел
</span>
{% else %}
<span class="inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono font-medium bg-status-roseBg text-status-rose border border-status-rose/30">
<span class="w-1.5 h-1.5 rounded-full bg-status-rose"></span>
Требует сдачи
</span>
{% endif %}
{% endif %}
</div>