Issue 1032

The Cornell team is currently working on the issue #1032: Must refresh page to be able to release result if there was an attempt to mark incomplete result as "complete" (https://github.com/MarkUsProject/Markus/issues/1032)

« Based on our analysis, we realized that this was a more complex issue than initially thought. 
When a user changes the marking state using the drop down, the browser registers the event and sends an AJAX request to the server. The scenarios that would cause this issue however occur because of instances in which the server is sending an AJAX response to client with javascript to update the marking state, since the browser is unable to register this event. So, when the mark for a criteria is updated for example, the drop down changes from 'unmarked' to 'partial', but the browser is technically unaware, and in fact the db is not updated. Any subsequent action follows that premise. 
We were able to come up with the following fix:

- If a grader marks a submission as 'Complete' when it is not yet complete, the error message is displayed. The state is changed to 'Partial' on the client
- If a user then grades any subsequent criteria, the page refreshes and clears the error message. No subsequent work is interrupted with a reload.
The fix  (3 commits) is in my fork (https://github.com/beepted/Markus/tree/issue-1032) pending some minor clean up and commenting. Feel free to look into it.
Please let us know if you think this is a viable fix, or any ideas you might have. It at least prevents the user from having to refresh the page themselves, and only happens once for them in that specific scenario. The release button behavior is now also consistent with the expectations.
Thanks, 
Ope Akanji
»