Skip to content

Commit 54cc684

Browse files
authored
fix: allow TAs to edit/delete rubric scores after completing a review (#616)
1 parent 0a2228b commit 54cc684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/ui/rubric-sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export function CommentActions({
305305
setIsEditing: (isEditing: boolean) => void;
306306
}) {
307307
const submissionController = useSubmissionController();
308-
const { private_profile_id } = useClassProfiles();
308+
const { private_profile_id, public_profile_id } = useClassProfiles();
309309
const isGraderOrInstructor = useIsGraderOrInstructor();
310310
const isInstructor = useIsInstructor();
311311
const isStudent = useIsStudent();
@@ -317,7 +317,7 @@ export function CommentActions({
317317
// 1. Instructors can edit all comments
318318
// 2. Graders can only edit their own comments
319319
// 3. Students can edit their own comments IF the review is not completed (or no review exists)
320-
const isCommentAuthor = comment.author === private_profile_id;
320+
const isCommentAuthor = comment.author === private_profile_id || comment.author === public_profile_id;
321321
const isReviewCompleted = comment.submission_review_id ? submissionReview?.completed_at != null : false;
322322

323323
const canEditComment =

0 commit comments

Comments
 (0)