Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tyler_clair
Community Champion

Storing Custom Data

So for the past few years I have seen the custom data API that is attached to a user's account: https://canvas.instructure.com/doc/api/users.html#method.custom_data.set_data. This seems like it could have limitless potential as you can store as much JSON data as you want and I was wondering if anyone has used it?

Labels (1)
Tags (2)
13 Replies
jperkins
Instructure
Instructure

Here is a working script for this API endpoint. https://github.com/unsupported/canvas/tree/master/api/custom_user_data .

Boekenoogen
Community Contributor

This script looks promising. I will have to get my team to look at it. 

Hi Alex!

I was so intrigued by your post here, so I've got to make a follow-up question:

- How is this custom due date data used?

maguire
Community Champion

I have used user custom data to be able to customize an LTI tool to collect information about a student's degree project. Currently, students fill out a form describing the degree project that they want to do. The course code that students have to sign up for differs depending upon which program of study the student is in (and perhaps even their specialization (track within this program). I have examined how to use the custom data to store the information about the student's program of study. For example for two test students (the text for the major/track is in Swedish):

custom data for user James FakeStudent is {'data': {'programs': [{'code': 'TIVNM', 'name': "Master's Programme, ICT Innovation, 120 credits", 'major': 'Datalogi och datateknik', 'track': 'HCID', 'start': 2016}]}}
user name=Karolin FakeStudent with id=27 and sis_id=z11


custom data for user Karolin FakeStudent is {'data': {'programs': [{'code': 'TIVNM', 'name': "Master's Programme, ICT Innovation, 120 credits", 'major': 'Elektroteknik', 'track': 'INSY', 'start': 2016}]}}

When the student provides their information via a dynamic survey, the student's questions and alternatives for answers are adapted based upon the student's program. The code for this (SinatraTest21.rb) and documentation can be found at  https://github.com/gqmaguirejr/E-learning

Extensive details about this can be found in a recent Bachelor's thesis:

Reshad Sarwar and Nathan Manzi, More tools for Canvas : Realizing a Digital Form with Dynamically Presented Questions and Alternatives. Stockholm, Sweden: KTH, Communication Systems, CoS, 2019, TRITA-EECS-EX-2019:93 [Online]. Available: http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Akth%3Adiva-251021http://urn.kb.se/resolve?urn=urn%3Anbn%3Ase%3Akth%3Adiva-251021

Unfortunately, to automatically populate the custom data requires information from another system that I do not yet have access to - so my prototype works only with fake data.