Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hj940709 committed Sep 18, 2024
1 parent a590060 commit ba81c54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/components/Tests/ReadingTest/ReadingTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const ReadingTest = () => {
currentQuestionIdxinSet,
answerPending,
answerFailure,
resumedTest,
} = useSelector(({ tests }) => tests)
const learningLanguage = useSelector(learningLanguageSelector)
const { groups } = useSelector(({ groups }) => groups)
Expand Down Expand Up @@ -309,13 +310,13 @@ const ReadingTest = () => {
setShowFeedbacks(false)
if (currentReadingSet !== null && prevReadingSet !== null && currentReadingSet !== prevReadingSet) {
if (in_experimental_grp && receivedFeedback > 0) {
setShowSelfReflect(true)
setShowSelfReflect(!resumedTest)
}
if (in_control_grp && receivedFeedback == 0) {
setShowSelfReflect(true)
setShowSelfReflect(!resumedTest)
}
}
setFirstMediationSelfReflectionDone(false)
setFirstMediationSelfReflectionDone(resumedTest)
}, [currentReadingSet])

useEffect(() => {
Expand Down Expand Up @@ -369,7 +370,7 @@ const ReadingTest = () => {
showFeedbacks={showFeedbacks}
closeFeedbacks={() => {
setShowFeedbacks(false)
if (firstMediationSelfReflectionDone === false && receivedFeedback > 0 && in_experimental_grp && currentQuestionIdxinSet < currentReadingSetLength && questionDone && currentQuestionIdxinSet === currentReadingQuestionIndex) {
if (firstMediationSelfReflectionDone === false && receivedFeedback > 0 && in_experimental_grp && currentQuestionIdxinSet < currentReadingSetLength && questionDone) {
setShowSelfReflect(true)
}
}}
Expand Down
1 change: 1 addition & 0 deletions client/util/redux/testReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export default (state = initialState, action) => {
feedbacks: [],
readingSetLength: tmpreadingSetLength,
pending: false,
resumedTest: Object.values(questionsBySet).some(x=>x.seen.length>0),
};

case 'GET_READING_TEST_QUESTIONS_FAILURE':
Expand Down

0 comments on commit ba81c54

Please sign in to comment.