Closed blerner closed 1 year ago
When a TA metagrades a submission containing a PDF, with comments, they don't see a correctly computed score:
This is because the code at the end of _enter_comments.js.erb is asynchronous and runs in the wrong order:
_enter_comments.js.erb
updateScore
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.
loadPageComments
When a TA metagrades a submission containing a PDF, with comments, they don't see a correctly computed score:![image](https://user-images.githubusercontent.com/918464/161454966-b1fbd925-79f6-4f02-a6ed-4ecb44c4f623.png)
This is because the code at the end of
_enter_comments.js.erb
is asynchronous and runs in the wrong order:updateScore
before the viewers are ready, thenupdateScore
again.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 ofloadPageComments
(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.