From b721c7dbc58b961f1612fbaaacba68b07406544a Mon Sep 17 00:00:00 2001 From: Jesse Hoobergs Date: Fri, 26 Nov 2021 15:26:25 +0100 Subject: [PATCH] Don't add stopped state in diagnostic script --- diagnostic_scripts/diagnosys.jme | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/diagnostic_scripts/diagnosys.jme b/diagnostic_scripts/diagnosys.jme index 58db3e519..aa6a1fd5a 100644 --- a/diagnostic_scripts/diagnosys.jme +++ b/diagnostic_scripts/diagnosys.jme @@ -10,7 +10,6 @@ state (Produces the initial value of the state object): // should be renamed "in ), "retries": 3, "finished": false, - "stopped": false, ] topics_by_objective (A dictionary mapping a learning objective name to a list of indices of topics): @@ -62,7 +61,7 @@ action_retry (Use up one retry and visit the same topic again): action_stop (Stop the exam): [ "label": "Finish the exam.", - "state": state + [ "stopped": true ], + "state": state, "next_question": nothing ] @@ -90,15 +89,12 @@ action_move_on (Move to the next topic, or end the exam if there are no more): can_move_on: action_move_on["next_question"]<>nothing -stopped: - state["stopped"]=true - next_actions (Actions to offer to the student when they ask to move on): let( feedback, retries_feedback+"\n\nWhat would you like to do next?" , [ "feedback": feedback, - "actions": if(not correct and not stopped and state["retries"]>0, [action_retry], []) + if(can_move_on,[action_move_on],[]) + if(not correct and not stopped and state["retries"] > 0 and not can_move_on and not stopped, [action_stop], []) + "actions": if(not correct and state["retries"]>0, [action_retry], []) + if(can_move_on,[action_move_on],[action_stop]) ] )