Skip to content

Grading Project Updating Score with Dropped Student #5

@scott-yj-yang

Description

@scott-yj-yang

When doing

    grading.grade_project(
        repo=repo,
        component="proposal",
        assignment_id=*****,
        post=True
    )
File ~/anaconda3/lib/python3.10/site-packages/CanvasGroupy/grading.py:116, in Grading.grade_project(self, repo, component, assignment_id, canvas_group_name, canvas_group_category, post)
    114     return
    115 issue = self.fetch_issue(repo, component)
--> 116 self.update_canvas_score(group_name, assignment_id, score, issue, post)

File ~/anaconda3/lib/python3.10/site-packages/CanvasGroupy/grading.py:79, in Grading.update_canvas_score(self, group_name, assignment_id, score, issue, post)
     77 self.cg.link_assignment(assignment_id)
     78 for member in members:
---> 79     student_id = self.cg.email_to_canvas_id[member]
     80     text_comment = f"Group: {group_name}"
     81     if issue is not None:

KeyError: '***'

This will happen when we sync grades for a group member who dropped out of the class. Need to use try-except syntax to catch this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions