CodeGrade / bottlenose

CS assignment / grade mangement system
GNU Affero General Public License v3.0
37 stars 21 forks source link

TAs metagrading PDF submissions see the score as 0.00/### #230

Closed blerner closed 1 year ago

blerner commented 2 years ago

When a TA metagrades a submission containing a PDF, with comments, they don't see a correctly computed score: image

This is because the code at the end of _enter_comments.js.erb is asynchronous and runs in the wrong order:

https://github.com/CodeGrade/bottlenose/blob/352c4321bf22bd68bc897379744c51e3fadf4f89/app/views/grades/_enter_comments.js.erb#L387-L414

The fix is to add a call to updateScore at the end of loadPageComments (https://github.com/CodeGrade/bottlenose/blob/352c4321bf22bd68bc897379744c51e3fadf4f89/app/views/grades/_enter_comments.js.erb#L310-L349), to ensure that whenever the comments do get loaded, the score gets recomputed.