An error closes a question and completes the course, you do not receive points but automatically generates the certificate.
Additionally, there was an error with incorrect answers resulting in infinite exercises in the section.
Changes
The handleReviewAnswer function was updated to fix the main issue. We check for the last component in the section and handle completion accordingly. (ExerciseScreen.jsx)
Then the handleExerciseContinue function was updated to properly handle updates to the order of the components of a section when an exercise is incorrectly answered. Additionally, it also handles re-rendering of the subsequent exercise, however, the animation of this event could be improved to illustrate swiping instead of re-rendering. (CompSwipeScreen.jsx)
Related Issues
Fixes #262
Checklist
[x] Code has been tested locally and passes all relevant tests.
[x] Documentation has been updated to reflect the changes, if applicable.
[x] Code follows the established coding style and guidelines of the project.
[x] All new and existing tests related to the changes have passed.
[x] Any necessary dependencies or new packages have been properly documented.
[x] Pull request title and description are clear and descriptive.
[x] Reviewers have been assigned to the pull request.
[x] Any potential security implications have been considered and addressed.
[x] Performance impact of the changes has been evaluated, if relevant.
Description
An error closes a question and completes the course, you do not receive points but automatically generates the certificate.
Additionally, there was an error with incorrect answers resulting in infinite exercises in the section.
Changes
The handleReviewAnswer function was updated to fix the main issue. We check for the last component in the section and handle completion accordingly. (ExerciseScreen.jsx)
Then the handleExerciseContinue function was updated to properly handle updates to the order of the components of a section when an exercise is incorrectly answered. Additionally, it also handles re-rendering of the subsequent exercise, however, the animation of this event could be improved to illustrate swiping instead of re-rendering. (CompSwipeScreen.jsx)
Related Issues
Fixes #262
Checklist
Screenshots (if applicable)
Points correctly awarded:
Before and after - incorrect answers: