instructure/canvas-lms · error · GraphQL::ExecutionError
enhanced_rubrics, rubric_self_assesment and…
Error message
enhanced_rubrics, rubric_self_assesment and assignments_2_student must be enabled
What it means
SetRubricSelfAssessment requires three coordinated features on the assignment's course: enhanced_rubrics, rubric_self_assesment (note the legacy misspelling), and assignments_2_student. Rubric.rubric_self_assessment_enabled?(course) returns false unless all are on, and resolve raises this error naming all three.
Solutions
- Enable all three flags on the course (or its root account): enhanced_rubrics, rubric_self_assesment, assignments_2_student
- Check for course-level overrides that disable a flag enabled at the account level
- Verify via console: Rubric.rubric_self_assessment_enabled?(assignment.course) returns true before calling
Example fix
// before setRubricSelfAssessment(assignmentId: 5, ...) // after course = assignment.course course.enable_feature! :enhanced_rubrics course.enable_feature! :rubric_self_assesment course.enable_feature! :assignments_2_student setRubricSelfAssessment(assignmentId: 5, ...)
Defensive patterns
Strategy: validation
Validate before calling
// Ruby enabled = Rubric.rubric_self_assessment_enabled?(assignment.course)
Try / catch
// Ruby
begin
mutation
rescue GraphQL::ExecutionError => e
enable_required_flags if e.message.include?("must be enabled")
end Prevention
- Enable all three flags together (enhanced_rubrics, rubric_self_assesment, assignments_2_student)
- Check for course-level overrides that mask account-level flag settings
- Pre-flight the check with Rubric.rubric_self_assessment_enabled? in console
When it happens
Trigger: Calling setRubricSelfAssessment on a course where any of the three flags (enhanced_rubrics, rubric_self_assesment, assignments_2_student) is disabled at account/course level.
Common situations: Enabling rubric_self_assesment but forgetting assignments_2_student; flags set at root account but overridden off at the sub-account/course; newer environment where defaults differ.
Related errors
- custom gradebook statuses feature flag is disabled
- feature flag is disabled
- feature flag is disabled
- Rubric Association not found
- assessor and assessee required
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/adfb262534049cc0.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/set_rubric_self_assessment.rb:30
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
module Mutations
class SetRubricSelfAssessment < BaseMutation
argument :assignment_id, ID, required: true
argument :rubric_self_assessment_enabled, Boolean, required: true
def resolve(input:)
assignment = Assignment.find(input[:assignment_id])
rubric_association = assignment.rubric_association
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
View on GitHub (pinned to 1c9f0bb801)