Skip to content

Commit

Permalink
trying to reproduce #5068
Browse files Browse the repository at this point in the history
  • Loading branch information
subhajitxyz committed Jan 3, 2025
1 parent 99730d7 commit b650451
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -699,26 +699,28 @@ class ExplorationProgressController @Inject constructor(
// Follow the answer's outcome to another part of the graph if it's different.
val ephemeralState = computeBaseCurrentEphemeralState()
when {
//subha for submit button working
// answerOutcome.destinationCase == AnswerOutcome.DestinationCase.STATE_NAME -> {
// endState()
// if (!answerOutcome.labelledAsCorrectAnswer &&
// answerOutcome.feedback.contentId.contains("feedback", true)
// ) {
// explorationProgress.stateDeck.onActualCallLearnAgain(true)
// } else {
// explorationProgress.stateDeck.onActualCallLearnAgain(false)
// }
//
// val newState = explorationProgress.stateGraph.getState(answerOutcome.stateName)
// explorationProgress.stateDeck.pushState(
// newState,
// prohibitSameStateName = true,
// timestamp = startSessionTimeMs + continueButtonAnimationDelay,
// isContinueButtonAnimationSeen = isContinueButtonAnimationSeen
// )
// hintHandler.finishState(newState)
// }
// ephemeralState.stateTypeCase == EphemeralState.StateTypeCase.PENDING_STATE -> {
answerOutcome.destinationCase == AnswerOutcome.DestinationCase.STATE_NAME -> {
endState()
if (!answerOutcome.labelledAsCorrectAnswer &&
answerOutcome.feedback.contentId.contains("feedback", true)
) {
explorationProgress.stateDeck.onActualCallLearnAgain(true)
} else {
explorationProgress.stateDeck.onActualCallLearnAgain(false)
}

val newState = explorationProgress.stateGraph.getState(answerOutcome.stateName)
explorationProgress.stateDeck.pushState(
newState,
prohibitSameStateName = true,
timestamp = startSessionTimeMs + continueButtonAnimationDelay,
isContinueButtonAnimationSeen = isContinueButtonAnimationSeen
)
hintHandler.finishState(newState)
}
ephemeralState.stateTypeCase == EphemeralState.StateTypeCase.PENDING_STATE -> {
// Schedule, or show immediately, a new hint or solution based on the current
// ephemeral state of the exploration because a new wrong answer was submitted.
hintHandler.handleWrongAnswerSubmission(ephemeralState.pendingState.wrongAnswerCount)
Expand Down

0 comments on commit b650451

Please sign in to comment.