- Header: 'Сделать активной' appears when current version is not the sole active one
- Versions table: button shown for all non-current versions regardless of is_active status
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- POST /api/tests/{id}/activate — deactivates all versions in chain, activates selected
- GET /api/tests — simplified to is_active=True only (no parent_id subquery)
- GET/PUT /api/tests/{id} — removed is_active filter, any version accessible by id
- PUT /api/tests/{id} — new version auto-activates, parent deactivates
Frontend:
- Version history table: status column (Активная/Неактивная), 'Сделать активной' button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TestForm now accepts optional onBack/backLabel props.
TestEdit passes 'К просмотру теста' back button when in edit mode.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET /api/tests/{id}/versions — returns full version chain from oldest to newest
- TestEdit: shows 'История версий' table when multiple versions exist,
current version highlighted, links to navigate between versions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- migration 003: add parent_id to tests table
- PUT /api/tests/{id}: edit in place if no attempts, create new version otherwise
- GET /api/tests: show only latest versions (no successor)
Frontend:
- TestForm: extracted reusable form component
- TestCreate: refactored to use TestForm
- TestEdit: full edit mode with pre-populated form, version redirect on new version
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Колонка с названием теста теперь занимает всю свободную ширину.
Три действия (Открыть, Изменить, Пройти тест) убраны в выпадающее меню по кнопке «…».
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- Models: TestAttempt, AttemptAnswer (migration 002)
- POST /api/attempts: start attempt, shuffle questions/answers,
hide is_correct, expose is_multiple for UI hints
- POST /api/attempts/{id}/submit: save answers, calculate score,
strict matching (selected == correct), return full result
- GET /api/attempts/{id}/result: fetch saved result
- Register attempts router in main.py
Frontend:
- api/attempts.ts: types + API functions
- TestTake page: one question at a time, progress bar, timer
with auto-submit, back navigation controlled by test setting,
radio/checkbox based on is_multiple
- AttemptResult page: score, pass/fail, per-question breakdown
with correct/selected/missed answer highlighting
- App.tsx: add /tests/:testId/take and /attempts/:id/result routes
- TestDetail: add "Пройти тест" button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- СПРИНТЫ.md: mark Sprint 1 as completed (✅), check all tasks,
add 4 bugs found and fixed during testing
- ШАГ_006.md: add bugs table with symptoms, causes and fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set docs_url=/api/docs, redoc_url=/api/redoc,
openapi_url=/api/openapi.json so Swagger UI is
accessible through nginx at http://localhost/api/docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
backend/Dockerfile:
- Add ENV PYTHONPATH=/app so alembic can import app.config
- Change CMD to bash entrypoint.sh (volume mount breaks chmod +x)
nginx/nginx.conf:
- Add resolver 127.0.0.11 (Docker internal DNS)
- Use set $backend/$frontend variables so nginx resolves
hostnames per-request instead of at startup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Director role = HR-manager (same permissions)
- Editing assigned test creates new version
- Question order is random per attempt
- Navigation back configurable by test author
- Notifications via MAX messenger (last sprint)
- Export out of scope
- Add step 003 log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Create DOC/ТЗ.md with full system requirements
- Add DOC/ШАГИ/ШАГ_2026-03-21_002.md with step log
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>