Skip to content

Commit

Permalink
Don't add stopped state in diagnostic script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Hoobergs committed Nov 26, 2021
1 parent 72cebe4 commit b721c7d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions diagnostic_scripts/diagnosys.jme
Expand Up @@ -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):
Expand Down Expand Up @@ -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
]

Expand Down Expand Up @@ -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])
]
)

Expand Down

0 comments on commit b721c7d

Please sign in to comment.