[ ] I documented the TypeScript code using JSDoc style.
[ ] ~I added multiple screenshots/screencasts of my UI changes~
[ ] ~I translated all the newly inserted strings into German and English~
Motivation and Context
We have a bug in Artemis where all tutor assessments get lost on save. Artemis sometimes does not get events for new assessments. Therefore, assessments can often get lost, especially in Safari.
Description
Change .splice(i) (which removes all elements in the array starting from i) with an object-key-based approach. This additionally prevents problems from occurring when indexes shift because of splice.
Also, a subscription to this.store in apollon-editor.ts did sometimes not work because this.store was still undefined when it was called. I added code to automatically retry the subscription when if fails because of that.
Assessments are no longer lost. They were gone previously.
For better reproducibility, test in Safari. In Safari, the bug occurs more often (closer to 100% of the time). In Chrome, the issue sometimes does not appear at all.
Checklist
Motivation and Context
We have a bug in Artemis where all tutor assessments get lost on save. Artemis sometimes does not get events for new assessments. Therefore, assessments can often get lost, especially in Safari.
Description
Change
.splice(i)
(which removes all elements in the array starting fromi
) with an object-key-based approach. This additionally prevents problems from occurring when indexes shift because ofsplice
.Also, a subscription to
this.store
inapollon-editor.ts
did sometimes not work becausethis.store
was still undefined when it was called. I added code to automatically retry the subscription when if fails because of that.Steps for Testing
For better reproducibility, test in Safari. In Safari, the bug occurs more often (closer to 100% of the time). In Chrome, the issue sometimes does not appear at all.
Test Coverage