Closed rebekahperillo closed 11 months ago
We are seeing multiple quiz results in quick succession in the database. Our initial thought is that the user is double/triple clicking the submit button, which is creating multiple records in the database. It's possible some users are on slow networks, which could allow several clicks before the API scores the test and confirms it. If this is the problem, then disabling the submit button after the first click prevent this.
@mark-meyer Thank you, Mark. So, what are the next steps here?
@rebekahperillo we pushed a version to staging the disables the quiz submit button after the user clicks it. This should prevent users from double-clicking, of clicking multiple time is their network is slow. It is up on staging — it's a little hard to test if you are on a fast connection, but we have been able to test it by artificially delaying the response.
Another thing to consider is what to do with existing records in the database. Is there ever a reason to show anything other than the most recently passed version of a quiz for a particular user?
@mark-meyer Thank you, Mark. In my opinion, if the user took the quiz multiple times (even two times in a row with passing scores), it should be reflected in their profile. Does this answer your question?
Thanks @rebekahperillo Yes, that answers part of the question. But also, does that also apply to the AOPC report? Will the people looking at the report want to see multiple rows if the user took the quiz multiple times?
@mark-meyer I actually don't think this will happen that often, so I think it's OK to include multiple rows when a user takes the quiz multiple times. If anyone feels differently, I'm open to another approach.
@mark-meyer I tried to push the "Submit" button a bunch of times after completing the quiz, but it looks like my connection is fast (and I only see one record in the report for the quiz that I completed). I will trust that you were able to fix the issue when you tested it by artificially delaying the response. Moving to DONE, thank you!
@mark-meyer Also, are you going to push to prod now? Do you need anything else from me? Thank you again!
@rebekahperillo Yes, we'll push this to production soon. We will probably want to clean up the existing data to get rid of multiple quiz submissions. This might be a little fussy since we need to find groups of quizzes that were submitted in quick succession. @weiwang-gsa and I will talk about it.
@rebekahperillo This should now be up on prod.
@mark-meyer I just checked on production DB, there are quite a few records, seems 55 users have similar issue, we probably need to talk about what is best way to handle it.
@rebekahperillo just confirm with you first, for a user that have quick succession submissions, should we remove all the other and only leave the latest record, please see below screen shot, the red highlight is the latest for 3 submission in a row. and are we only check records that have second difference.
@weiwang-gsa Per our talk earlier today, it makes sense to clean up the data errors that were a result of this bug. So, if there are instances where a user has quiz results in very quick succession due to the bug, let's keep the latest record. If you have any further questions, feel free to reach out again. Thank you!
@rebekahperillo Here is the users has multiple quiz submissions, yellow highlights are those records that what I plan to remove ( less than 1 minutes), red highlights are the ones I have questions and need your confirmation, those are records that are less than 1 hours, some are a few minutes difference. we can discuss it tomorrow.
@weiwang-gsa Thanks, Wei. I'll take a look and we'll talk tomorrow.
@rebekahperillo per our discussion below decisions are made, and it is ready for your review on staging: https://federalist-2e11f2c8-970f-44f5-acc8-b47ef6c741ad.sites.pages.cloud.gov/preview/gsa/smartpay-training/staging/
@weiwang-gsa Great work again! Moving to DONE. Thank you!
@rebekahperillo please confirm if you are ok to deploy this to production today?
@weiwang-gsa Yes, that works.
@rebekahperillo the bug fix is released on production.
Looks great! Moving to closed. Thank you, @weiwang-gsa!
When a Department of State user downloaded a training report, it showed several duplicates.
I also looked at GSA and Department of Treasury data, and while there were a few duplicates, it wasn't as common.
SmartPayTrainingQuizCompletionReport (5) (1).csv
@mark-meyer Would you mind taking a look at this?