cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mcarrick
Community Member

Identifying related assignments (created in a blueprint)?

hi all.

I have a blueprint-related scenario where I have Assignments in a blueprint course that appear in a dozen synced 'child' courses. I'd like to be able to pull together all of the submissions (with scores and grades) for submissions for those assignments.

When looking at the full gamut of attributes the API can give me for an Assignment, I can't see anything that helps me link/associate those assignments. Am I missing something? Is that metadata perhaps somewhere else that I need to use?

Thanks so much,

Myles.

Labels (1)
4 Replies
stuart_ryan
Community Coach
Community Coach

Hi  @mcarrick ‌,

That is a very interesting question. I have poked around the API and I have only found one way to achieve this and it is a few steps removed, though, I believe this would serve your needs.

You would need to use the following sets of APIs Blueprint Courses - Canvas LMS REST API Documentation. I will admit I am struggling to get my head around this, as I haven't got any Blueprint courses to test with. I *anticipate* it may go something like this, and hopefully this can put you on the right track to have a play and tinker

  • This assumes you are starting knowing the template ID of your blueprint course
  • You would then call the 'Get associated course information' on that template ID, giving you a list of courses 
  • Call the 'List Blueprint Imports' on each course (looping)
  • With that information you would then call the 'Get Import Details' endpoint, I believe you would then be able to build the necessary list of assignments in those courses that have been imported from the blueprints. You would then have a separate series of calls for pulling out the marks.

Please let me know how you go with this, I am incredibly curious, and hope that the info I have been able to pull together can start you on the right direction, though I will say it definitely needs more fleshing out and some validation.

Hope that helps!

Stuart

Hi Stuart,

Thanks - appreciate the response.

I have a "working" solution I cobbled together last weekend that does roughly what you describe. Across my data however I run literally hundreds of thousands of API calls to piece that together - it's just so convoluted. To keep things well informed I then run that many times a day - likely more load coming from my app than our thousands of students generate in real world traffic!

If only the "parent" ID for the quiz or assignment was included in the original API data...

Myles

Sent from my phone with apologies for brevity and likely error.

Hi  @mcarrick ,

That is what I feared, you would literally have to build up the list each time. If you are happy/willing to share, I would be incredibly curious to see the solution (sans any API keys/URLs etc). 

One thing you could do is use an intermediary staging database to 'cache' information you already know about, saving rebuilding that up each time. You could then only pull in new information.

Also, I would highly support if you logged a new feature idea asking for an API(ified) solution to give the parent blueprint ID on an assignment (and possibly a new blueprint API call to list all child assignment IDs). Might be a really good idea to log these and then the community can discuss and vote on them as ideas to possibly be included in the future.

Cheers,
Stuart

SpencerRogers
Community Member

I wasn't able to generate a mapping of assignments by ID between a blueprint course and an associated course after a pretty thorough exploration of the Blueprint Course API.

The migration details do not include any change records for the initial migration when a course is first associated, i.e. when you first associate a course to a blueprint it creates a migration record but the details for the migration record is an empty array containing no change records when the hope was that it would produce an array of change records for every assignment creation.

Even if the migration details above contained any change records for assignment creation, the change record only contains the ID of a single assignment, i.e. there is no mapping. If one uses the blueprint_templates endpoints then the change record contains only the blueprint assignment ID and if one uses the blueprint_subscriptions endpoints then the change record contains only the ID of the associated assignment.