You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yesterday we ran into a weird behavior where a user opened up a discussion on a confirmation type exercise with a wrong solution.
How could this be? confirmation exercises only require the user to press a button.
Well, upon inspecting the assignment, while the solution field should have been empty, it instead had a solution for the following exercise in the same guide.
It's not 100% certain how they ran into this problem, but I did figure out a way to reliably reproduce this behavior.
By opening dev tools and setting up network throttling to an excruciatingly slow connection, it is pretty easy to press on another exercise's box on the guide listing and while the current exercise's form has not yet disappeared, submit a solution.
The browser url will change immediately after pressing the exercise box, and since the form for the old exercise is not gone yet, pressing the submit button will cause the solution to "be sent to the wrong exercise".
We could prevent this by disabling submitting a solution while switching exercises, or I guess grabbing the current exercise from a hidden input in the form when building the submit url instead of using the current window location could work too!
The text was updated successfully, but these errors were encountered:
Yesterday we ran into a weird behavior where a user opened up a discussion on a confirmation type exercise with a wrong solution.
How could this be? confirmation exercises only require the user to press a button.
Well, upon inspecting the assignment, while the solution field should have been empty, it instead had a solution for the following exercise in the same guide.
It's not 100% certain how they ran into this problem, but I did figure out a way to reliably reproduce this behavior.
By opening dev tools and setting up network throttling to an excruciatingly slow connection, it is pretty easy to press on another exercise's box on the guide listing and while the current exercise's form has not yet disappeared, submit a solution.
The browser url will change immediately after pressing the exercise box, and since the form for the old exercise is not gone yet, pressing the submit button will cause the solution to "be sent to the wrong exercise".
We could prevent this by disabling submitting a solution while switching exercises, or I guess grabbing the current exercise from a hidden input in the form when building the submit url instead of using the current window location could work too!
The text was updated successfully, but these errors were encountered: