Ticket #598: Refactored calculate_total_mark method in grade_entry_form.rb
Updated 5 months ago
| Farah Juma | Reviewers | ||
| markus_developers | |||
| 598 | |||
| None | MarkUs Source Code Repository | ||
Mike suggested refactoring the calculate_total_mark method in grade_entry_form.rb. I've modified it to use the "sum" method instead of manually calculating the total mark.
I ran the functional tests and unit tests and there are no failures or errors. I also tested things manually to make sure the total mark is still getting calculated correctly.
Love it. So much simpler. Here is my thumbs up :-)
Just found "sum" is defined by ActiveRecord. So nice!
