Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9320815d3f | |||
| 795300cb83 |
@ -130,7 +130,18 @@ def get_daily_report_v2(manager: PuzzleManager, gid: int | None = None):
|
|||||||
if re.match(r"^\d+$", u):
|
if re.match(r"^\d+$", u):
|
||||||
uname = get_username(int(u), gid)
|
uname = get_username(int(u), gid)
|
||||||
tries = len(manager.submissions[p.raw_id][u])
|
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
|
return msg
|
||||||
|
|
||||||
|
|||||||
@ -320,7 +320,7 @@ def create_admin_commands():
|
|||||||
if image is not None and image.url is not None:
|
if image is not None and image.url is not None:
|
||||||
b = await download_image_bytes(image.url)
|
b = await download_image_bytes(image.url)
|
||||||
image_manager.remove_puzzle_image(p.img_name)
|
image_manager.remove_puzzle_image(p.img_name)
|
||||||
image_manager.upload_puzzle_image(b.unwrap())
|
p.img_name = image_manager.upload_puzzle_image(b.unwrap())
|
||||||
elif remove_image.available:
|
elif remove_image.available:
|
||||||
image_manager.remove_puzzle_image(p.img_name)
|
image_manager.remove_puzzle_image(p.img_name)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user