backend
backend copied to clipboard
Backend of Source Academy @ NUS, LMS extension of Source Academy (Elixir, Ecto, Phoenix, PostgreSQL)
Staff should only be able to grade submissions which are under their group. They are currently able to edit other people's gradings even though they are not part of that...
It has over 2800 lines of code and can be separated more clearly
Lots of coupling currently; by right unsubmission should reset the state (remove XP, remove submitted at, etc) but we also want to keep the grading comments (attached to the answer...
We should pattern match `submitted_at` directly, and also add a guard to ensure it's not `nil`
Should be passing the updated submission. Otherwise submitted at is just `nil` all the time.
Grouping by answer ID (the PK) gives one result, so no need to aggregate, can just select XP etc. directly?
See https://github.com/source-academy/frontend/issues/3031.