MarkUsProject/Markus — pull request #1052 by akwok18 (2013-03-12 19:15:31+00:00)
Title: FIXES to issues 1016, 1018, 1031, 1021, 1030, 1051, 1049. 

All related to issue #1027 - needing to update code base so that it is using the appropriate result (remark or original) instead of always using the original.

Implemented two new helper methods - get_latest_result (returns remark result if it has been submitted, else returns original) and get_latest_completed_result (returns a completed result or nil if none exist).

Fixes issues #1016, #1018, #1031, #1021, #1030, #1051 with just substituting get_original_result with the appropriate helper method.
Fixes issue #1049 with substitution and also had to update method that compares results for ordering on marking state since it was not taking into account all scenarios (including released boolean and remark request).