diff --git a/lmsege/lms/__pycache__/models.cpython-314.pyc b/lmsege/lms/__pycache__/models.cpython-314.pyc index 31e22cb..372675d 100644 Binary files a/lmsege/lms/__pycache__/models.cpython-314.pyc and b/lmsege/lms/__pycache__/models.cpython-314.pyc differ diff --git a/lmsege/lms/forms.py b/lmsege/lms/forms.py index bb358db..b231d50 100644 --- a/lmsege/lms/forms.py +++ b/lmsege/lms/forms.py @@ -9,7 +9,7 @@ class AnswersForm(forms.Form): label='Ответ:', required=False, widget=forms.Textarea(attrs={ - 'class': 'w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500', + 'class': 'w-full px-4 py-3 bg-obsidian-base border border-obsidian-border rounded-lg text-white placeholder-txt-faint focus:outline-none focus:ring-2 focus:ring-accent-blue/30 focus:border-accent-blue transition-colors font-mono text-sm', 'rows': 3, 'placeholder': 'Введите ваш ответ здесь...' }) @@ -21,7 +21,8 @@ class AnswersForm(forms.Form): self.fields[f'answer_{q.id}_r{i}_c{j}'] = forms.CharField( required=False, widget=forms.TextInput(attrs={ - 'class': 'w-full px-2 py-1 border rounded focus:outline-none focus:ring-1 focus:ring-blue-500', + 'class': 'w-full px-3 py-2 bg-transparent border-0 focus:ring-0 text-white font-mono text-sm', + 'placeholder': '...' }) ) else: @@ -29,7 +30,7 @@ class AnswersForm(forms.Form): label='Прикрепить файл:', required=False, widget=forms.ClearableFileInput(attrs={ - 'class': 'block w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100' + 'class': 'block w-full text-sm text-txt-secondary file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-semibold file:bg-obsidian-border file:text-white hover:file:bg-obsidian-borderLight transition-colors cursor-pointer' }) ) diff --git a/lmsege/lms/templates/lms/assignment_detail.html b/lmsege/lms/templates/lms/assignment_detail.html index 9385c98..1462d00 100644 --- a/lmsege/lms/templates/lms/assignment_detail.html +++ b/lmsege/lms/templates/lms/assignment_detail.html @@ -1,126 +1,182 @@ {% extends 'lms/base.html' %} +{% load lms_tags %} {% block title %}{{ assignment.title }} | ЕГЭ LMS{% endblock %} {% block content %} -
- ← Назад к списку -

{{ assignment.title }}

-
- Предмет: {{ assignment.subject.name }} + +
+ + + + + Назад к списку + + +
+
+

{{ assignment.title }}

+
+ + Предмет: {{ assignment.subject.name }} + +
+
-
-

Описание задания

-
+ +
+

Описание задания

+
{{ assignment.description|safe }}
-
-
-

Ваш ответ

+
+

Ваш ответ

{% if submission and submission.status != 'IN_PROGRESS' %} -
+
{% if submission.status == 'GRADED' %} -

Оценка: {{ submission.grade|default:"Не выставлена" }}

+

+ + + + Оценка: {{ submission.grade|default:"Не выставлена" }} +

{% else %} -

Ваша работа отправлена и ожидает проверки.

+

+ + Ваша работа отправлена и ожидает проверки. +

{% endif %} {% if submission.teacher_feedback %} -

Общий комментарий: {{ submission.teacher_feedback }}

+
+

Общий комментарий преподавателя:

+

{{ submission.teacher_feedback }}

+
{% endif %}
-

Ваши ответы на задачи:

-
+

Ваши ответы на задачи:

+
{% for answer in submission.answers.all %} -
-
Задача {{ forloop.counter }}: {{ answer.question.text|striptags|truncatewords:10 }}
- {% if answer.question.question_type == 'TEXT_AUTO' %} -

Ваш ответ: {{ answer.text_answer|default:"Нет" }}

-

- {% if answer.is_correct %} - check_circle Верно - {% elif answer.is_correct == False %} - cancel Неверно - {% else %} - help_outline Ожидает проверки - {% endif %} -

- {% elif answer.question.question_type == 'TABLE_AUTO' %} -

Ваш ответ:

- {% load lms_tags %} - {% with table_data=answer.text_answer|parse_json %} - {% if table_data %} - - {% for row in table_data %} - - - - - {% endfor %} -
{{ row.0 }}{{ row.1 }}
- {% else %} -

Нет ответа

- {% endif %} - {% endwith %} -

- {% if answer.is_correct %} - check_circle Верно - {% elif answer.is_correct == False %} - cancel Неверно - {% else %} - help_outline Ожидает проверки - {% endif %} -

- {% else %} - {% if answer.file_answer %} -

Прикрепленный файл: Скачать

- {% else %} -

Файл не прикреплен

- {% endif %} - {% endif %} +
+ +
- {% if answer.points is not None %} -

Баллы: {{ answer.points }}

- {% endif %} - {% if answer.comment %} -

Комментарий: {{ answer.comment }}

- {% endif %} +
Задача {{ forloop.counter }}: {{ answer.question.text|striptags|truncatewords:10 }}
+ +
+ {% if answer.question.question_type == 'TEXT_AUTO' %} +
+ Ваш ответ +

{{ answer.text_answer|default:"Нет" }}

+
+ {% elif answer.question.question_type == 'TABLE_AUTO' %} + Ваш ответ (Таблица) + {% with table_data=answer.text_answer|parse_json %} + {% if table_data %} +
+ + {% for row in table_data %} + + + + + {% endfor %} +
{{ row.0 }}{{ row.1 }}
+
+ {% else %} +

Нет ответа

+ {% endif %} + {% endwith %} + {% else %} + {% if answer.file_answer %} +

+ Прикрепленный файл: + + + Скачать + +

+ {% else %} +

Файл не прикреплен

+ {% endif %} + {% endif %} + +
+
+ {% if answer.is_correct %} + + Верно + {% elif answer.is_correct == False %} + + Неверно + {% else %} + + Ожидает проверки + {% endif %} +
+ + {% if answer.points is not None %} +
+ Баллы: {{ answer.points }} +
+ {% endif %} +
+ + {% if answer.comment %} +
+ Комментарий преподавателя + {{ answer.comment }} +
+ {% endif %} +
{% endfor %}
+ {% elif needs_start %} -
- hourglass_top -

Задание на время

-

На выполнение этого задания отводится {{ assignment.time_limit }} минут(ы). Как только вы нажмете кнопку ниже, запустится обратный отсчет. По истечении времени ваши ответы будут отправлены автоматически.

+
+
-
+ + + + +

Задание на время

+

На выполнение этого задания отводится {{ assignment.time_limit }} мин. Как только вы нажмете кнопку ниже, запустится обратный отсчет. По истечении времени ваши ответы будут отправлены автоматически.

+ + {% csrf_token %} -
+ {% elif not can_submit %} -
-

Прием ответов завершен

-

Вы больше не можете отправлять ответы, так как дедлайн истек или время на выполнение закончилось.

+
+

+ + Прием ответов завершен +

+

Вы больше не можете отправлять ответы, так как дедлайн истек или время на выполнение закончилось.

+ {% else %} {% if time_left_seconds is not None %} -
-
- timer - Осталось времени: +
+
+ + Осталось времени:
-
+
--:--:--
@@ -128,20 +184,23 @@ document.addEventListener('DOMContentLoaded', function() { let timeLeft = {{ time_left_seconds }}; const display = document.getElementById('countdown-display'); + const banner = document.getElementById('timer-banner'); const form = document.getElementById('assignment-form'); function updateTimer() { if (timeLeft <= 0) { display.textContent = '00:00:00'; - display.classList.add('text-red-300'); + display.classList.add('text-rose-400', 'border-rose-500/50', 'bg-rose-950/30'); + display.classList.remove('text-white', 'bg-obsidian-card', 'border-obsidian-border'); + banner.classList.add('border-rose-500', 'shadow-rose-500/20'); + banner.classList.remove('border-accent-blue', 'shadow-accent-blue/10'); + // Auto submit if (form) { - // Prevent multiple submissions form.onsubmit = null; const btn = form.querySelector('button[type="submit"]'); if (btn) btn.disabled = true; - // Append a hidden flag const input = document.createElement('input'); input.type = 'hidden'; input.name = 'auto_submit'; @@ -161,8 +220,10 @@ (m < 10 ? '0' + m : m) + ':' + (s < 10 ? '0' + s : s); - if (timeLeft < 60) { - display.classList.add('text-red-300', 'animate-pulse'); + if (timeLeft < 60 && !banner.classList.contains('border-rose-500')) { + display.classList.add('text-rose-400'); + banner.classList.add('border-rose-500', 'bg-rose-950/10'); + banner.classList.remove('border-accent-blue', 'bg-obsidian-base'); } timeLeft--; @@ -180,44 +241,61 @@ {% csrf_token %} {% for q, field_type, field in question_fields %} -
-

Задача {{ forloop.counter }}

-
+
+
+ + {{ forloop.counter }} + +

Задача

+
+ +
{{ q.text|safe }}
{% if q.attached_file %} -
- - attach_file Скачать файл к задаче + {% endif %} -
+
{% if field_type == 'table' %} -

Заполните таблицу:

- - {% for row_fields in field %} - - - - - {% endfor %} -
{{ row_fields.0 }}{{ row_fields.1 }}
+

Заполните таблицу:

+
+ + {% for row_fields in field %} + + + + + {% endfor %} +
+
{{ row_fields.0 }}
+
+
{{ row_fields.1 }}
+
+
{% else %} - + {{ field }} {% if field.errors %} -

{{ field.errors.0 }}

+

+ + {{ field.errors.0 }} +

{% endif %} {% endif %}
{% endfor %} -
-
diff --git a/lmsege/lms/templates/lms/base.html b/lmsege/lms/templates/lms/base.html index d111c77..72941a6 100644 --- a/lmsege/lms/templates/lms/base.html +++ b/lmsege/lms/templates/lms/base.html @@ -1,14 +1,70 @@ - + - - + + {% block title %}ЕГЭ LMS{% endblock %} - - + + + + + + + - - - - + - -
+ +
{% block content %} {% endblock %}
+ + + +
+
+
+ © 2026 ЕГЭ LMS. Все права защищены. +
+
+ + + Системы работают штатно + +
+
+
+ diff --git a/lmsege/lms/templates/lms/dashboard.html b/lmsege/lms/templates/lms/dashboard.html index b5857ce..2a771b4 100644 --- a/lmsege/lms/templates/lms/dashboard.html +++ b/lmsege/lms/templates/lms/dashboard.html @@ -4,80 +4,123 @@ {% block title %}Мои задания | ЕГЭ LMS{% endblock %} {% block content %} -
-
-

Мои задания

-

Список всех доступных заданий для выполнения.

-
+
+

Мои задания

+

Список всех доступных заданий для выполнения.

{% if assignments %} -
+
{% for assignment in assignments %} {% get_submission submissions assignment.id as sub %} -
-
-
- - {{ assignment.subject.name }} +
+
+ +
+ + {{ assignment.subject.name|default:"Предмет" }} {% if sub %} {% if sub.status == 'GRADED' %} - - done_all Проверено ({{ sub.grade|default:"-" }}) + + + + + Принято ({{ sub.grade|default:"-" }}) + + {% elif sub.status == 'IN_PROGRESS' %} + + + В процессе {% else %} - - schedule Ожидает проверки + + + Ожидает проверки {% endif %} {% else %} - - Не сдано + + + Требует сдачи {% endif %}
- -

+ + +

{{ assignment.title }} -

-

- {{ assignment.description|striptags|truncatewords:20 }} -

- -
- - event - Добавлено: {{ assignment.created_at|date:"d M Y" }} - + + + {% if assignment.description %} +
+ {{ assignment.description|striptags }} +
+ {% endif %} + + +
+
+ + + + + Добавлено: + + {{ assignment.created_at|date:"d M Y" }} +
{% if assignment.deadline %} - - timer - Дедлайн: {{ assignment.deadline|date:"d M Y, H:i" }} - +
+ + + + + Дедлайн: + + {{ assignment.deadline|date:"d M Y, H:i" }} +
{% endif %} {% if assignment.time_limit %} - - hourglass_empty - Время на решение: {{ assignment.time_limit }} мин. - +
+ + + + + Лимит времени: + + {{ assignment.time_limit }} мин. +
{% endif %}
- -
+ {% else %} + + Смотреть ответ + + {% endif %} + {% else %} + + Приступить к решению + + {% endif %} +
{% endfor %}
{% else %} -
- assignment_turned_in -

Пока заданий нет

-

Учитель еще не добавил новые задания.

+
+ + + +

Пока заданий нет

+

Учитель еще не добавил новые задания.

{% endif %} diff --git a/lmsege/lmsege/__pycache__/settings.cpython-314.pyc b/lmsege/lmsege/__pycache__/settings.cpython-314.pyc index 958a2c3..19f8bad 100644 Binary files a/lmsege/lmsege/__pycache__/settings.cpython-314.pyc and b/lmsege/lmsege/__pycache__/settings.cpython-314.pyc differ