From 0500a4a37c6ac519552fc7b03fecef8c1c560c05 Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Sat, 30 May 2026 16:51:32 +0300 Subject: [PATCH] =?UTF-8?q?fix(tests):=20=D1=81=D0=BA=D1=80=D1=8B=D1=82?= =?UTF-8?q?=D1=8C=20=D1=8D=D0=BA=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=B2=D0=B0=D1=80=D0=B8?= =?UTF-8?q?=D0=B0=D0=BD=D1=82=D1=8B=20(exam9)=20=D0=B8=D0=B7=20=D0=B0?= =?UTF-8?q?=D0=B4=D0=BC=D0=B8=D0=BD-=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B8=20=C2=AB=D0=A2=D0=B5=D1=81=D1=82=D1=8B=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/controllers/testController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/controllers/testController.js b/backend/src/controllers/testController.js index c4196d0..284165f 100644 --- a/backend/src/controllers/testController.js +++ b/backend/src/controllers/testController.js @@ -8,6 +8,9 @@ function list(req, res) { let where = '1=1'; if (subject) { where += ' AND t.subject_slug = ?'; args.push(subject); } if (role !== 'admin') { where += ' AND t.created_by = ?'; args.push(uid); } + // Экзаменационные варианты — это служебные строки в tests (см. import-exam9.js), + // не показываем их во вкладке «Тесты (шаблоны)» админки. + where += ' AND t.id NOT IN (SELECT test_id FROM exam9_variant_tests)'; const rows = db.prepare(` SELECT t.id, t.title, t.subject_slug, t.description, t.created_at,