instructure/canvas-lms · error · GraphQL::ExecutionError
Cannot set rubric self assessment for quiz assignments
Error message
Cannot set rubric self assessment for quiz assignments
What it means
SetRubricSelfAssessment raises this GraphQL::ExecutionError when assignment.quiz_lti? || assignment.quiz? is true (app/graphql/mutations/set_rubric_self_assessment.rb:46). Quiz assignments (both classic quizzes and New Quizzes/LTI) do not support rubric self assessment, so the mutation blocks them.
Solutions
- Only call this mutation for non-quiz assignments; filter out quiz_lti?/quiz? assignments client-side.
- Check assignment type via the GraphQL query before sending the mutation.
- Hide the self assessment toggle for quiz-type assignments in the UI.
- If rubric feedback on quizzes is needed, use quiz-level rubric features instead of self assessment.
Example fix
// before
await client.mutate({ mutation: SET_SELF_ASSESSMENT, variables: { assignmentId } })
// after
if (!assignment.quiz && !assignment.quizLti) {
await client.mutate({ mutation: SET_SELF_ASSESSMENT, variables: { assignmentId } })
} Defensive patterns
Strategy: validation
Validate before calling
if (assignment.quiz || assignment.quizLti) throw new SkipMutation('quiz assignments unsupported') Try / catch
try { await mutate(...) } catch (e) { if (e.message.includes('quiz assignments')) showUnsupportedNotice(); else throw e; } Prevention
- Exclude quiz and New Quizzes assignments from self assessment UI.
- Re-query assignment type before mutating.
- Keep type-based restriction lists in one place for frontend and backend parity.
When it happens
Trigger: Invoking the setRubricSelfAssessment mutation with an assignment ID that wraps a classic quiz (assignment.quiz? true) or a New Quizzes LTI assignment (assignment.quiz_lti? true).
Common situations: Course redesign tool iterates all assignments including quiz-backed ones; user toggles self assessment from an assignment index that does not filter quiz types; an assignment is converted to a quiz after self assessment was enabled.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Cannot set rubric self assessment for discussion assignments
- Cannot set rubric self assessment for group assignments
- A maximum of 50 assessees can be provided at once
- A maximum of 50 assessors can be provided at once
- Assignment has self assessments or due date has passed
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/6c02abf3da527113.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/set_rubric_self_assessment.rb:46
unless Rubric.rubric_self_assessment_enabled?(assignment.course)
raise GraphQL::ExecutionError, "enhanced_rubrics, rubric_self_assesment and assignments_2_student must be enabled"
end
unless assignment.active_rubric_association?
raise GraphQL::ExecutionError, I18n.t("Rubric Association not found")
end
unless rubric_association.grants_right?(current_user, session, :update)
raise GraphQL::ExecutionError, I18n.t("Insufficient permissions")
end
if assignment.has_group_category?
raise GraphQL::ExecutionError, I18n.t("Cannot set rubric self assessment for group assignments")
end
if assignment.quiz_lti? || assignment.quiz?
raise GraphQL::ExecutionError, I18n.t("Cannot set rubric self assessment for quiz assignments")
end
if assignment.discussion_topic?
raise GraphQL::ExecutionError, I18n.t("Cannot set rubric self assessment for discussion assignments")
end
unless assignment.can_update_rubric_self_assessment?
raise GraphQL::ExecutionError, I18n.t("Assignment has self assessments or due date has passed")
end
rubric_self_assessment_enabled = input[:rubric_self_assessment_enabled]
if assignment.update(rubric_self_assessment_enabled:)
{ rubric_self_assessment_enabled: }
else
errors_for(assignment)
end
rescue ActiveRecord::RecordNotFound => eView on GitHub (pinned to 1c9f0bb801)