Phase 7: deployment, data import, UI hardening and security fixes

Docker/prod deployment:
- multi-stage Dockerfile (JDK21 build, JRE21 run), docker-compose.prod.yml,
  nginx config for lms.our-place.ru, deploy.sh; DEPLOY/IMPORT guides (UI flow)
- Fix Docker 401: LMS_JWT_JWK_SET_URI for academic/progress; forward-headers

Variant distribution (lab page only):
- round-robin by student level, shared random queue across selected groups,
  least-used variants, manual pins always preserved; occupied/dup labels
- setup page: single form + one «Сохранить всё», batch level/variant for
  selected students (checkboxes)

Grades, defense, materials:
- publication gate + comment lists; defense CSV import (2/3 cols, quotes)
- additional task after defense ("начать заново"); enroll/unenroll students
  from group page; temporary-password lock (no navigation until changed) and
  persistent "Смена пароля"; forced change once
- chapter page /learn/{c}; header: LMS home, Войти, user -> dashboard,
  compact theme toggle; responsive mobile header
- markdown: single newlines are soft breaks; highlight.js with light/dark themes
- lab/content imports ZIP-only (lab.yaml+README+variants/assets,
  chapters tree+assets); duplicate lab numbers rejected; variant ordering
  and date defaults honored

Fixes:
- 500 on student create (@MapsId set before persist); broken dialogs/JS refs in group page
This commit is contained in:
2026-09-14 22:01:46 +03:00
parent 08830c67f1
commit d04207302a
58 changed files with 3967 additions and 884 deletions

View File

@@ -47,7 +47,13 @@ a:hover { color: var(--c-text-link-hover); }
/* Layout */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.page-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.page-header-inner { max-width: 1152px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; }
.page-header-inner { max-width: 1152px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; padding: 0.75rem 1.5rem; }
@media (max-width: 640px) {
.page-header-inner { padding: 0.5rem 0.75rem; }
.nav { width: 100%; gap: 0.5rem 0.75rem; flex-wrap: wrap; font-size: 0.8125rem; }
.nav .btn { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.nav-user { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.page-main { flex: 1; width: 100%; max-width: 1152px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-footer { border-top: 1px solid var(--c-border); padding: 1rem; text-align: center; font-size: 0.75rem; color: var(--c-text-muted); }
@@ -57,6 +63,12 @@ a:hover { color: var(--c-text-link-hover); }
.nav-link:hover { color: var(--c-text-link-hover); }
.nav-sep { color: var(--c-text-muted); }
.logo { font-size: 1.125rem; font-weight: 600; color: var(--c-text); text-decoration: none; }
.nav-user { font-weight: 500; }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.3rem 0.5rem; }
.theme-icon { width: 1.05rem; height: 1.05rem; display: block; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.breadcrumb .nav-sep { user-select: none; }
.check-list { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.25rem; max-height: 12rem; overflow-y: auto; }
/* Buttons */
.btn {
@@ -244,3 +256,76 @@ details.sub-acc > summary::-webkit-details-marker { display: none; }
.sub-arrow { display: inline-block; width: 8px; height: 8px; border-right: 2px solid var(--c-text-muted); border-bottom: 2px solid var(--c-text-muted); transform: rotate(45deg); transition: transform 0.2s; margin-right: 6px; vertical-align: 2px;}
details.sub-acc[open] > summary .sub-arrow { transform: rotate(-135deg); }
.sub-actions { margin: 0 0 2px 18px; }
/* ---- Матрица группы и карточки защиты ---- */
.m-0 { margin: 0; }
.mb-8 { margin-bottom: 2rem; }
.mb-0 { margin-bottom: 0; }
.text-strong { font-weight: 600; color: var(--c-text); }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.scroll-x { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 0; }
.matrix th, .matrix td { vertical-align: top; }
.matrix th.lab-col { min-width: 9.5rem; border-left: 1px solid var(--c-border); }
.matrix td.cell-lab { min-width: 9.5rem; border-left: 1px solid var(--c-border); }
.matrix td.student-cell { min-width: 12rem; }
.lab-col-head { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.cell-line { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; text-align: left; }
.cell-label { color: var(--c-text-muted); min-width: 3.5rem; }
.cell-link { font-size: 0.8125rem; }
.cell-edit { padding: 0 0.4rem; }
.cell-grade-line { font-weight: 500; }
.defense-cell-actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; }
.th-w-sm { width: 4rem; }
.th-w-md { width: 12rem; }
.span-2 { grid-column: 1 / -1; }
.preview { max-width: 34rem; }
.md-preview { max-width: 22rem; }
/* ---- Комментарии к оценке (ЛК студента) ---- */
.review-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.review-col h3 { margin-bottom: 0.35rem; }
.review-list { margin: 0; padding-left: 1.15rem; }
.review-list li { margin: 0.15rem 0; }
.tone-positive-text { color: #166534; }
.tone-negative-text { color: #991b1b; }
[data-theme="dark"] .tone-positive-text { color: #6ee7b7; }
[data-theme="dark"] .tone-negative-text { color: #fca5a5; }
.tone-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
/* Редактируемая матрица: закреплённый столбец и компактные селекты */
.matrix-sticky { position: sticky; left: 0; z-index: 2; background: var(--c-surface); }
.matrix thead .matrix-sticky { z-index: 3; }
.level-form { margin: 0; }
.level-select {
width: auto; min-width: 6rem; max-width: 9.5rem;
padding: 0.15rem 1.5rem 0.15rem 0.4rem; font-size: 0.75rem;
}
.cell-level { justify-content: center; }
.pin-hint { font-size: 0.75rem; }
/* Компактные ячейки матрицы группы */
.btn-xs { padding: 0.05rem 0.4rem; font-size: 0.7rem; line-height: 1.5; }
.badge-xs { font-size: 0.65rem; padding: 0.05rem 0.4rem; }
.chip-xs { font-size: 0.65rem; padding: 0.05rem 0.4rem; }
.cell-top { display: flex; align-items: center; justify-content: center; gap: 0.25rem; }
.cell-chips { display: flex; flex-wrap: wrap; gap: 0.18rem; justify-content: center; margin-top: 0.25rem; }
.cell-chip {
display: inline-flex; align-items: center; gap: 0.15rem;
font-size: 0.72rem; line-height: 1.7; padding: 0.05rem 0.45rem;
border: 1px solid var(--c-border); border-radius: 99px;
background: var(--c-bg); color: var(--c-text); white-space: nowrap; cursor: pointer;
text-decoration: none; font-family: inherit;
}
.cell-chip:hover { border-color: var(--c-border-strong, var(--c-border)); filter: brightness(0.97); }
.chip-dim { color: var(--c-text-muted); }
.chip-warn { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.chip-ok { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.chip-link:hover { color: var(--c-text-link); }
[data-theme="dark"] .chip-warn { color: #fcd34d; background: rgba(146, 64, 14, 0.25); border-color: rgba(146, 64, 14, 0.5); }
[data-theme="dark"] .chip-ok { color: #86efac; background: rgba(22, 101, 52, 0.25); border-color: rgba(22, 101, 52, 0.5); }
.lab-head-row { display: flex; align-items: center; justify-content: center; gap: 0.3rem; }
.actions-cell { white-space: nowrap; }
.actions-cell .inline-form { display: inline-block; }