4.5 and clear checkboxes

This commit is contained in:
2026-03-28 15:52:13 +01:00
parent f9d43e3ad9
commit 8a1eea6b3b
3 changed files with 26 additions and 2 deletions
+8
View File
@@ -50,6 +50,14 @@ def apply_actions_and_regenerate_grouped(root_dir, data, student_id, actions, la
dirty_labels.add(label)
logs.append(f" > Updated score for {label} to {act['value']}")
elif act['type'] == 'clear_all':
for fb in feedbacks:
fb["to_delete"] = True
if fb.get("box_2d"):
fb["norectangle"] = True
dirty_labels.add(label)
logs.append(f" > Cleared all feedbacks in {label}")
elif act['type'] == 'del_global':
if act['index'] < len(global_fb):
global_fb[act['index']]["to_delete"] = True