讲不清就退一层:迷你先修图(39 知识点/60 边)+讲一遍弹窗(216 测试 + 41/22/21/29 冒烟)
This commit is contained in:
+4
-1
@@ -19,7 +19,7 @@ from contextlib import contextmanager
|
||||
from datetime import date, datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
from . import content, cut, judging, ocr, practice, scheduler, tencent_ocr, wechat
|
||||
from . import content, cut, judging, kp_graph, ocr, practice, scheduler, tencent_ocr, wechat
|
||||
from .db import TZ, add_days, connect, log_event, new_id, now, row_to_dict, rows_to_list, today
|
||||
|
||||
CONSENT_VERSION = "v1"
|
||||
@@ -994,6 +994,8 @@ def explain(conn, gid: str, cid: str, mid: str, channel: str, text: str) -> dict
|
||||
score["rubric_next_time"], int(score["passed"]), now()))
|
||||
_apply(conn, mid, state)
|
||||
log_event(conn, "explain", cid, passed=score["passed"], channel=channel)
|
||||
# 没过 → 给一条「退一层」建议:讲不清常常不是这道题的问题,是前置没打牢
|
||||
retreat = None if score["passed"] else kp_graph.retreat(dict(m).get("kp"))
|
||||
return {
|
||||
"mistake_id": mid,
|
||||
"channel": channel,
|
||||
@@ -1002,6 +1004,7 @@ def explain(conn, gid: str, cid: str, mid: str, channel: str, text: str) -> dict
|
||||
"status": state["status"],
|
||||
"status_zh": scheduler.STATUS_ZH.get(state["status"], state["status"]),
|
||||
"hint": "过了就毕业;没过就换一条路,7 天内还有机会" if not score["passed"] else "这题你不用再做了",
|
||||
"retreat": retreat,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user