source-academy / backend

Backend of Source Academy @ NUS, LMS extension of Source Academy (Elixir, Ecto, Phoenix, PostgreSQL)
https://sourceacademy.nus.edu.sg
Apache License 2.0
39 stars 50 forks source link

fix: Fix notifications of type "submitted" not being read #1163

Closed GabrielCWT closed 2 months ago

GabrielCWT commented 2 months ago

Currently the notifications are not marked as read for type: submitted. When the grading is published, be it manually or automatically, the notification will be marked as read. The grading notification should also be marked as read when the submission is unsubmitted.

I feel that notifications should signify that there are things to be done on the grading page. This solution resolves this bug of there being "things to do" even though there aren't any.

Screenshot 2024-08-26 at 10 31 20 PM
coveralls commented 2 months ago

Coverage Status

coverage: 94.365% (+0.009%) from 94.356% when pulling ff7183cb2b25db5aff2f79ec66aab32d8e722797 on GabrielCWT:fix/publish-notifications into 2d43f01ae55a656b1fd9523db7a2f8d0cc05f286 on source-academy:master.

GabrielCWT commented 2 months ago

One thing I have noticed today: Paths also create a notification. Would it be a good idea to add a check where if is_manually_graded is true then create a notification, else do not. This is to follow the idea that the todo count is meant to be for things the staff needs to do in the grading tab.

Furthermore, there is no way to resolve the todo for a path since it is autograded and autopublished

RichDom2185 commented 2 months ago

One thing I have noticed today: Paths also create a notification. Would it be a good idea to add a check where if is_manually_graded is true then create a notification, else do not. This is to follow the idea that the todo count is meant to be for things the staff needs to do in the grading tab.

Furthermore, there is no way to resolve the todo for a path since it is autograded and autopublished

This can be a separate issue + PR, thanks!