Teammates: Bug: Student received submission confirmation but the responses are not recorded

Created on 20 Feb 2017  路  11Comments  路  Source: TEAMMATES/teammates

A user reported that one student submitted responses (and received a confirmation email) but the responses are missing from the results.

v5.94

c.Bug

Most helpful comment

@xpdavid @damithc I agree with @xpdavid's suggested solution, users tend to click / tap on buttons multiple times, sometimes by mistake (such as broken mouse button, these are more rare) and mostly due to what they perceive as "inactivity"

Using a spinner (or other forms of activity indicator) and disabling the button will let the user know that we are doing something, the only cavaeat is that we need to be aware that if the server's response is a failure, we need to re-enable the button and clearly let the user know that something went wrong

All 11 comments

@xpdavid can you investigate this?

This reminds me of the recent case where I submitted some responses to a session and the all my existing responses for that session get wiped out because somehow the server received my submission without the values I entered (as if I submitted an empty form).

@damithc Can you provide the activityLog for that user? And does the user experience any error during the submission?

And for your case, it is quite weird as submitted an empty form could wipe out all existing data for that session.

Can you provide the activityLog for that user? And does the user experience any error during the submission?

This happened early January, so the logs aren't there anymore.

And for your case, it is quite weird as submitted an empty form could wipe out all existing data for that session.

Yes, we should investigate if there is _any_ weird situation (e.g. user double-click the submission button) where the browser can submit our submission form with empty responses. In my case it was an essay question and in this user's case it was a rubric question.

Another student says he filled in all responses but some responses were wiped out. Not sure if it was an eventual consistency issue or related to this issue. I'll share the responses in slack.

@damithc @wkurniawan07
It's a bug. I manager to reproduce this. I am not sure whether it is the bug reported by user.
And actually, I guess it doesn't only specify to rubric question.

Basically, user can click the submit button many times before they get redirected.
I have add a line ThreadHelper.waitFor(20000); to execute() method to simulate heavy traffic in Teammates :P

demo-bug 1

Good work reproducing the bug @xpdavid 馃憤
Are you going to fix it?

@damithc I'd love to. I will investigate this further.

Detail report of the bug: @damithc @wkurniawan07
Background:

  1. There is a verification in the saving action: the form data (responses) must be responses of the current feedback session's questions (It makes sense as we don't want malicious user to edit responses for other question). This is done by looking at whether the form data has the same response's id as existing data. If the response is new, the response's id won't be contained in the form data and thus the system will regard it as new response.
  2. If the response is empty response (in this case, no option is selected), the system will delete the response (as there is no point to store empty response).

Cause:
Initially, the response's id is contained in the form data. User submit it and system delete the response as it is empty response. However, before the user get redirected, user click submit again. the response's id is still contained in the form data. The system cannot find the response's id in the existing data (as we delete the response in the previous submission) and therefore the system prompt error.

Solution:
The solution turns out to be simple. We disable the submission button (maybe using an ajax loader.gif) until we get server's response.

@xpdavid good work. Your suggested solution sounds good, but I'm no expert.

@xpdavid @damithc I agree with @xpdavid's suggested solution, users tend to click / tap on buttons multiple times, sometimes by mistake (such as broken mouse button, these are more rare) and mostly due to what they perceive as "inactivity"

Using a spinner (or other forms of activity indicator) and disabling the button will let the user know that we are doing something, the only cavaeat is that we need to be aware that if the server's response is a failure, we need to re-enable the button and clearly let the user know that something went wrong

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YongJieYongJie picture YongJieYongJie  路  3Comments

whipermr5 picture whipermr5  路  3Comments

whipermr5 picture whipermr5  路  4Comments

wkurniawan07 picture wkurniawan07  路  4Comments

sujeet14108 picture sujeet14108  路  4Comments