在每日答题情况添加记录点显示
This commit is contained in:
@ -130,7 +130,18 @@ def get_daily_report_v2(manager: PuzzleManager, gid: int | None = None):
|
||||
if re.match(r"^\d+$", u):
|
||||
uname = get_username(int(u), gid)
|
||||
tries = len(manager.submissions[p.raw_id][u])
|
||||
msg += f"\n- {uname} [💦 {tries} 提交]"
|
||||
checkpoints_touched = len(set((
|
||||
s.hint_id for s in manager.submissions[p.raw_id][u]
|
||||
if (
|
||||
s.hint_id >= 0
|
||||
and s.hint_id in p.hints
|
||||
and p.hints[s.hint_id].is_checkpoint
|
||||
)
|
||||
)))
|
||||
checkpoint_message = ""
|
||||
if checkpoints_touched > 0:
|
||||
checkpoint_message = f" | 🚩 {checkpoints_touched} 记录点"
|
||||
msg += f"\n- {uname} [💦 {tries} 提交{checkpoint_message}]"
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user