diff --git a/src/canvaslms/cli/submissions.nw b/src/canvaslms/cli/submissions.nw index 9133e5a..c525a01 100644 --- a/src/canvaslms/cli/submissions.nw +++ b/src/canvaslms/cli/submissions.nw @@ -753,13 +753,29 @@ def resolve_grader(submission): return "autograded" try: - return submission.assignment.course.get_user(submission.grader_id) + <> except canvasapi.exceptions.ResourceDoesNotExist: canvaslms.cli.warn(f"unknown grader {submission.grader_id} " f"for submission {submission}.") return f"unknown grader {submission.grader_id}" @ +The only option we have as the code is written currently, is to try to get the +user from the course ([[course.get_user]]). +But we should really get the user from a Canvas object, [[canvas.get_user]]. +If using [[get_user(...)]] on a course object, then the user must exist in the +course. +However, that's not necessarily true. +So we should get it from a [[Canvas]] object, that is, from the system rather +than just the course. +But as mentioned, right now we can only do it through the course. +This isn't a problem as long as none of the teachers or teaching assistants are +removed. +<>= +return submission.assignment.course.get_user(submission.grader_id) +@ + + \subsection{Rubric data} <>=