Fix simulation preview feedback
This commit is contained in:
@@ -260,6 +260,7 @@ func _select_simulation() -> void:
|
||||
func _preview_simulation_results() -> void:
|
||||
pending_simulation_launch = true
|
||||
simulation_preview_link.disabled = true
|
||||
simulation_status_label.text = "Generating simulated exam results..."
|
||||
ExamSimulationService.load_results_preview()
|
||||
|
||||
|
||||
@@ -294,11 +295,11 @@ func _launch_simulation_block() -> void:
|
||||
|
||||
func _on_simulation_failed(message: String) -> void:
|
||||
pending_simulation_launch = false
|
||||
_refresh_simulation_state()
|
||||
if simulation_preview_link != null:
|
||||
simulation_preview_link.disabled = false
|
||||
if simulation_status_label != null:
|
||||
simulation_status_label.text = message
|
||||
_refresh_simulation_state()
|
||||
|
||||
|
||||
func _refresh_simulation_state() -> void:
|
||||
@@ -330,7 +331,7 @@ func _refresh_bank_state() -> void:
|
||||
elif state == "failed":
|
||||
bank_status_label.text = "The question bank could not be loaded."
|
||||
else:
|
||||
bank_status_label.text = "Question bank will load when selected."
|
||||
bank_status_label.text = ""
|
||||
|
||||
|
||||
func _start_question_bank() -> void:
|
||||
|
||||
Reference in New Issue
Block a user