Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I'm using the Canvas API to pull data for a specific course. When I retrieve the assignments using the endpoint "/api/v1/courses/:course_id/assignments"
, one of the assignments has a rubric_id
associated with it.
However, when I attempt to fetch the rubric details using the endpoint "/api/v1/courses/:course_id/rubrics/:id"
, I find that the rubric exists, but its context_id
indicates it is associated with a different course, not the current one.
Additionally, when I list all rubrics for this course using the endpoint "/api/v1/courses/:course_id/rubrics/"
, this particular rubric does not appear in the list.
Has anyone experienced this issue before? How can a rubric be linked to an assignment in one course if it seems to be associated with a different course? Any guidance on how to resolve or further investigate this would be greatly appreciated!
Are you sure the "context_id" is the ID of a course rather than an account? There should also be a "context_type" that would let you know if it is a course or account context. If it is an account level rubric, then you will need the use the account variation of the Get a single rubric endpoint
In addition, "/api/v1/courses/:course_id/rubrics/" will only get rubrics within that specific context. If an account level rubric is used in a course, then it won't show with this API call.
Hi @JamesSekcienski ,
Thanks for your response!
The context_type type in api response is "course", but still it is not accessible through "/api/v1/courses/:course_id/rubrics/" endpoint.
@test I have observed the same situation you report. The workflow to select a rubric allows a teacher to select rubrics from any of their courses. Canvas does not copy the rubric but links to it when the teacher does this, so the rubric's context is that other course from which it was selected. This is why the /rubrics/ endpoint excludes some rubrics that are used within a course, and it makes the /rubrics/ endpoint less useful. Your approach of gathering rubric ids from the /assignments/ endpoint is the solution I have implemented in scripts to retrieve rubric assessments.
Hello @stimme,
When a teacher selects a rubric from another course using the "Find a Rubric" option, Canvas creates a copy of the rubric in the current course rather than linking to the original. The same happens when importing a rubric using the "Import Course Content" option—this also results in creating a new copy of the original rubric.
Is there another method or option you are referring to for managing or linking rubrics across courses without creating duplicates?
Hi @test ! Thanks for following up. When I used Find A Rubric and selected a rubric from a different course yesterday, I also found that Canvas created a copy in the new course. When I tried an import via Copy To for an assignment with attached rubric, Canvas made a copy in the new course.
It has been several years since I observed the scenario where an assignment in course B is associated with course A's rubric directly. It is possible that application code has been changed such that this scenario won't arise with new rubric associations.
For the assignment that you initially posted about, is it clear how its rubric association was made?
I'm using the Canvas API to pull data for a specific course. When I retrieve the assignments using the endpoint "/api/v1/courses/:course_id/assignments"
, one of the assignments has a rubric_id
associated with it.
However, when I try to fetch the rubric details using the endpoint "/api/v1/courses/:course_id/rubrics/:id"
, I'm unable to find that rubric in the course.
Has anyone experienced this before? How can a rubric be linked to an assignment in a course if it doesn't seem to exist within that course's or account rubrics?
@test This post appears to be superseded by what you posted a few minutes later.
To participate in the Instructure Community, you need to sign up or log in:
Sign In