instructure/canvas-lms · error · GraphQL::ExecutionError
Grading Assistance is not enabled for this course.
Error message
Grading Assistance is not enabled for this course.
What it means
SubmitAutoGradeFeedback's check_feature_and_permissions! raises this GraphQL::ExecutionError when the target course does not have the :project_lhotse feature flag enabled (app/graphql/mutations/submit_auto_grade_feedback.rb:32). The Grading Assistance feature is gated per-course by this root-account-known feature flag, so the mutation refuses to run without it.
Solutions
- Enable the project_lhotse feature flag for the course (or its root account) via the account Feature Options UI or feature_flag API.
- Confirm you are targeting the course on the account where the flag is enabled.
- Check flag state first via GET /api/v1/courses/:id/feature_flags before calling the mutation.
- Gate the Grading Assistance UI behind the same flag so the mutation is never called while disabled.
Example fix
// before
await client.mutate({ mutation: SUBMIT_AUTO_GRADE_FEEDBACK, variables: { courseId } })
// after
const flags = await fetch(`/api/v1/courses/${courseId}/feature_flags`)
if (flags.project_lhotse === 'on') {
await client.mutate({ mutation: SUBMIT_AUTO_GRADE_FEEDBACK, variables: { courseId } })
} Defensive patterns
Strategy: validation
Validate before calling
const flags = await fetch(`/api/v1/courses/${courseId}/feature_flags`); if (flags.project_lhotse !== 'on') throw new SkipMutation('Grading Assistance not enabled for this course') Try / catch
try { await mutate(...) } catch (e) { if (e.message.includes('not enabled for this course')) showFeatureFlagNotice(); else throw e; } Prevention
- Check the project_lhotse course feature flag before rendering Grading Assistance UI.
- Confirm the correct root account/environment has the flag enabled.
- Document flag rollout so ops and frontend deployments stay in sync.
When it happens
Trigger: Calling the submitAutoGradeFeedback mutation for a course where course.feature_enabled?(:project_lhotse) returns false; the flag may be off at account level and not overridden at course level, or disabled entirely.
Common situations: Testing on a non-production Canvas environment where the flag was never turned on; a course on a root account different from the one where the feature was enabled; the feature flag was rolled back by an admin; deploying Grading Assistance UI before the ops team enabled the flag.
Related errors
- feature flag is disabled
- feature flag is disabled
- peer_review_allocation_and_grading feature flag is not…
- A maximum of 50 assessees can be provided at once
- A maximum of 50 assessors can be provided at once
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/66eea92dc74ac932.
Report an issue: GitHub.
Appendix: source
Thrown at app/graphql/mutations/submit_auto_grade_feedback.rb:32
# 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/>.
#
class Mutations::SubmitAutoGradeFeedback < Mutations::BaseAiFeedback
argument :course_id, ID, required: true
private
def check_feature_and_permissions!(input)
course_id = GraphQLHelpers.parse_relay_or_legacy_id(input[:course_id], "Course")
course = Course.find(course_id)
verify_authorized_action!(course, :manage_grades)
unless course.feature_enabled?(:project_lhotse)
raise GraphQL::ExecutionError, I18n.t("Grading Assistance is not enabled for this course.")
end
course.root_account.uuid
end
def feature_slug
"grading-assistance-feedback"
end
end
View on GitHub (pinned to 1c9f0bb801)