Make simulation block submission idempotent

This commit is contained in:
hz
2026-07-30 15:30:54 -05:00
parent d5048c155a
commit ae6b37eb7d
5 changed files with 29 additions and 0 deletions
+3
View File
@@ -1190,6 +1190,9 @@ func _on_simulation_state_changed() -> void:
func _on_simulation_request_failed(message: String) -> void:
if BlockSessionService.session_kind != "simulation":
return
if str(ExamSimulationService.simulation.get("state", "")) in ["between_blocks", "completed"]:
simulation_submit_pending = false
return
simulation_submit_pending = false
if ExamSimulationService.last_failed_action != "submit":
# A per-question autosave failing shouldn't interrupt a timed exam with a