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

feat: Add check to notification creation #1167

Closed GabrielCWT closed 2 months ago

GabrielCWT commented 2 months ago

This PR adds a check to finalise submission. It will only create a notification if the assessment requires manual grading. This would mean that the staff has a TODO and thus a notification should be created.

In the context of CS1101S: Paths are autograded and require no manual grading. Without this check, staff will receive a notification under the grading tab but there is no action required. There is also no way to resolve the notification easily as the submission is autograded and autopublished.

Closes: https://github.com/source-academy/backend/issues/1166

GabrielCWT commented 2 months ago

I am willing to discuss alternative solutions if this does not seem like the correct approach to the issue.

coveralls commented 2 months ago

Coverage Status

coverage: 94.372% (+0.004%) from 94.368% when pulling d46fc8b3fb4a0fc99f6eb4742ff8ee3548556135 on GabrielCWT:fix/notification-creation into e84c9413437b7331cdee0b873dfa39d6be54cb1b on source-academy:master.