Key points on questions link into article sections (AMBOSS-style) with samples; difficulty tagging with builder/bank filters; adaptive session algorithm prefers unanswered questions then recycles older incorrect ones, weakest categories first with damping; question create/edit is now admin/educator only; expired exams no longer auto-submit on resume; exam suspend messaging updated. Migrations k4f5a6b7c819, l5a6b7c8d920, m6a7b8c9d031. 63 backend and 97 frontend tests pass.
19 lines
442 B
Python
19 lines
442 B
Python
"""Quiz origin tracking for uploads and AI-generated tests.
|
|
|
|
Revision ID: k4f5a6b7c819
|
|
Revises: j3e4f5a6b708
|
|
"""
|
|
from alembic import op
|
|
|
|
revision = "k4f5a6b7c819"
|
|
down_revision = "j3e4f5a6b708"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.execute("ALTER TABLE quizzes ADD COLUMN IF NOT EXISTS origin VARCHAR(20) NOT NULL DEFAULT 'bank'")
|
|
|
|
|
|
def downgrade():
|
|
op.execute("ALTER TABLE quizzes DROP COLUMN IF EXISTS origin")
|