MarkUsProject/Markus — pull request #1758 by ChrisKdon (2014-09-14 19:56:44+00:00)
Title: Issue 1493

**Summary** - Mark Spreadsheet Screen
1. The total grade cell was not being updated when the user changed a value in one of the grades column.
2. The total grade would not show up when the page was loaded.
3. The visual highlights were not being displayed on update/error.

**Fix**
1. The totals cell was not being updated because the `update_grade.rjs` script result was not being run when it returned. Thus on completion of the ajax request the RJS code is executed.
2. I also fixed the totals column not showing up when loading. This was a result of the `total_grade` column needing to be updated before it could be accessed by calling `update_total_grade`. This method was removed so that whenever `total_grade` is called it is guaranteed that the total returned is the most recent value calculated. And save was updated to always make sure the totals_column has the most recent value. I think this column should however be a calculated field in the database. I'm not sure why it is being managed/updated manually?
3. I removed the code for "visual_highlight" as it appears to be old Prototype code that is no longer included. And changed it over to use jQuery instead.

**Tests**
1. Made sure all the tests passed. This included tests that verify the totals column is returning the correct result.
2. Checked that when a mark is changed on any of the fields the total's column updates, and the value is persisted.
3. Made sure that the visual cues for updating and errors are shown when the corresponding actions occur.