codeandcognition / koconut

a very cool assess pool
2 stars 0 forks source link

exercise recommendations lost on refresh #385

Closed bxie closed 5 years ago

bxie commented 5 years ago

this.state.exerciseRecommendations is initialized to empty on refresh, so recommendations need to repopulate (either via local storage or otherwise)

functions which eventually update state.exerciseRecommendations in App.js submitResponse() -> checkAnswer() -> verifyUserAnswer() -> setFeedback() -> modelUpdater.update() -> updateRecommendation()

submitResponse() is passed into ExerciseView as submitHandler

bxie commented 5 years ago

we likely want to log what's recommended (compare selection to recommendation), so likely best course of action is this:

  1. check if stored in React state
  2. (check if) logged in sessionStorage
  3. (check if) logged in firebase User collection
bxie commented 5 years ago

recommended exercises now stores in Users/Data/AnswerSubmissions 18668825ec6ff55f7554a9adb2e3298ff2ba64ac

bxie commented 5 years ago

fixed in d0f37af099aab6e00c518e723cd3c931fcb9e0a8