Remove redundant follow-up retry action
This commit is contained in:
@@ -3215,17 +3215,6 @@ func _build_resolved_followup(index: int, state: Dictionary) -> void:
|
||||
_set_scaled_label(explanation, 14, Brand.text_color(_followup_is_dark()))
|
||||
body_content.add_child(explanation)
|
||||
|
||||
if not is_main_correct and bool(state.get("has_authored_choices", false)):
|
||||
var similar_button := Button.new()
|
||||
similar_button.text = "Ask similar question"
|
||||
similar_button.custom_minimum_size = Vector2(172, 38)
|
||||
similar_button.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
|
||||
Style.style_chip(similar_button, Color("fb5f6d"))
|
||||
_set_scaled_button_font(similar_button, 14)
|
||||
similar_button.pressed.connect(_restart_followup.bind(str(state.get("choice_id", ""))))
|
||||
body_content.add_child(similar_button)
|
||||
|
||||
|
||||
func _build_followup_header(content: VBoxContainer, state: Dictionary, expanded: bool, interactive: bool) -> void:
|
||||
var dark := _followup_is_dark()
|
||||
var is_main_correct := bool(state.get("is_main_correct", false))
|
||||
@@ -3348,33 +3337,6 @@ func _choice_review_explanation(choice_id: String, state: Dictionary) -> String:
|
||||
return "Review the stem finding that makes this option less appropriate."
|
||||
|
||||
|
||||
func _restart_followup(choice_id: String) -> void:
|
||||
if followup_required or not followup_states.has(choice_id):
|
||||
return
|
||||
var state: Dictionary = followup_states[choice_id]
|
||||
if not bool(state.get("has_authored_choices", false)):
|
||||
return
|
||||
var options: Array = state.get("choices", []).duplicate(true)
|
||||
options.shuffle()
|
||||
state["choices"] = options
|
||||
state["selected_option_id"] = ""
|
||||
state["selected_option_text"] = ""
|
||||
state["was_correct"] = false
|
||||
state["resolved"] = false
|
||||
state["collapsed"] = false
|
||||
followup_states[choice_id] = state
|
||||
active_followup_choice_id = choice_id
|
||||
followup_required = true
|
||||
followup_answered = false
|
||||
next_button.disabled = true
|
||||
if skip_button != null:
|
||||
skip_button.disabled = true
|
||||
_render_followup_state(choice_id)
|
||||
var index := _choice_index_for_id(choice_id)
|
||||
if index >= 0 and question_scroll != null:
|
||||
question_scroll.call_deferred("ensure_control_visible", choice_followup_panels[index])
|
||||
|
||||
|
||||
func _ensure_answer_review_followups() -> void:
|
||||
for attempted_id in followup_states.keys():
|
||||
var attempted_state: Dictionary = followup_states[attempted_id]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# Playwright sources and generated reports are not Godot project resources.
|
||||
Reference in New Issue
Block a user