From 7393e7e82a29e88ab4c39f328414bdce99a5d830 Mon Sep 17 00:00:00 2001 From: Drobysh Date: Tue, 22 Sep 2026 10:33:54 +0000 Subject: [PATCH] =?UTF-8?q?fix(learning):=20hint=5Fused=20=D1=87=D0=B8?= =?UTF-8?q?=D1=82=D0=B0=D0=B5=D1=82=D1=81=D1=8F=20=D0=B8=D0=B7=20body,=20?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B5=20=D0=B7=D0=B0=D1=85=D0=B0=D1=80=D0=B4?= =?UTF-8?q?=D0=BA=D0=BE=D0=B6=D0=B5=D0=BD=20(22.09.2026)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/learning.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routers/learning.py b/routers/learning.py index 66a0f69..353abd9 100644 --- a/routers/learning.py +++ b/routers/learning.py @@ -563,6 +563,9 @@ async def save_answer(request: Request): selected_answer = body.get("answer", "") time_taken_ms = body.get("time_taken_ms", 0) is_final = body.get("is_final_answer", True) + # πŸ”§ ЀИКБ (22.09.2026): Ρ€Π°Π½ΡŒΡˆΠ΅ hint_used Π±Ρ‹Π» Π·Π°Ρ…Π°Ρ€Π΄ΠΊΠΎΠΆΠ΅Π½ False, + # поэтому подсказки Π½Π΅ ΠΏΠΎΠΏΠ°Π΄Π°Π»ΠΈ Π² Π°Π½Π°Π»ΠΈΡ‚ΠΈΠΊΡƒ (hint_dependency всСгда 0). + hint_used = body.get("hint_used", False) if not session_id or not question_id: raise HTTPException(400, "session_id and question_id required") @@ -589,7 +592,7 @@ async def save_answer(request: Request): await conn.execute(""" INSERT INTO user_learning_answers (user_id, session_id, level_code, topic_id, lesson_id, question_id, selected_answer, correct, skill_tag, question_type, context_type, difficulty, time_taken_ms, hint_used, wrong_because, is_final_answer) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) - """, telegram_id, session_id, session["level_code"], session["topic_id"], question["lesson_id"], question_id, selected_answer, correct, question["skill_tag"], question["question_type"], question["context_type"], question["difficulty"], time_taken_ms, False, wrong_because, is_final) + """, telegram_id, session_id, session["level_code"], session["topic_id"], question["lesson_id"], question_id, selected_answer, correct, question["skill_tag"], question["question_type"], question["context_type"], question["difficulty"], time_taken_ms, hint_used, wrong_because, is_final) return {"correct": correct, "wrong_because": wrong_because}