twostraws / Unwrap

Learn Swift interactively on your iPhone.
https://www.hackingwithswift.com
Other
2.29k stars 311 forks source link

Some question types allowing amending answers before submitting. #222

Closed robinlmp closed 1 year ago

robinlmp commented 3 years ago

I don't know categorically if the behaviour I describe below is intended or not but I suspect not as it is inconsistent between different types of questions.

This issue is that in some types of questions, you can answer incorrectly, tap the 'submit' button and then edit the answer before tapping 'continue'.

If the user does update the answer and the new answer is correct, then the score reflects the answer being correct rather than incorrect.

https://user-images.githubusercontent.com/53621609/132941817-8de850b4-05b6-4002-a37b-85610d26652e.mp4

This certainly happens with rearrange the lines and free coding, but perhaps occurs on other question types as well.

Now, I do not necessarily think this is entirely bad behaviour and might actually be a better behaviour for helping the learning process. The problem with what I think is the intended behaviour, is that just marking an answer as incorrect doesn't necessarily help the user learn what a correct answer would be.

By allowing a second attempt may arguably be a better learning experience. Hence my hesitation about whether this is actually bad behaviour or not.

If it were decided this is actually positive, then perhaps the UI should be clearer about it and the ability to correct an incorrect answer should be consistent across the different question types. Currently it is not possible in Type Checker for example.

I'm not sure this is specific to my device, but I'm using an iPhone 12 Pro on iOS 15 beta 8.

GaneshPatil22 commented 2 years ago

Added fix for this issue PR for the same raised.. Caused due to computed property which was accepted by coordinator, due to which after submitting the question if user rearrange the rows again and tap on "Continue" at that time we are passing that property and its again verifying the sequence and if sequence is correct its giving points to the user.. So removed the drag feature from the table view if "isShowingAnswers" is set to true doing this after submitting question user will not able to modify the sequence.

twostraws commented 1 year ago

This is fixed now – thank you!