amalieeh / assessment-support

TDT4501 Computer Science, Specialization Project (2021 FALL) with Sylvi Phuong Huynh @sylvihuynh. About Learning technology.
0 stars 0 forks source link

Save assessments to localstorage #78

Closed sylvihuynh closed 2 years ago

sylvihuynh commented 2 years ago

fix #67

Save current batch to localstorage when next is clicked. Only assessments that have a score will be saved. The batches are saved on key taskNumber_assessments, ex. 2_assessments.

There is a problem with overwriting earlier assessments due to new ids being generated each time we refresh/go back and forth to the assessment pages. Meaning that the "same" assessment might be added to localstorage several times.

amalieeh commented 2 years ago

Really nice work, Sylvi!!

The only thing I thought about was that if you

Then the item isn't updated/deleted in local storage. What do you think about that?

sylvihuynh commented 2 years ago

I have not added anything for deleting it, but I have added logic for updating and it should work. This is unless you refresh the page as the answer will get a new id and become a "new" answer.