cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bsmaples
Community Participant

Dynamic variables within Canvas?

Jump to solution

I was wondering if there are any variables we can work with in Canvas such as date, course title, student name, etc..

One thing we are doing is a static footer on every page with our copyright text. I was hoping we could change this to a dynamic date so we wouldn't have to go back and edit the copyright text on every page. Is anyone aware of environmental variables that can be utilized in our courses? Appreciate any assistance.

Tags (2)
1 Solution
kona
Community Coach
Community Coach

 @bsmaples , unfortunately, no, Canvas doesn't have any dynamic/environmental variables like this on  the front end of Canvas. You might be able to somehow program something like this on the back-end, but that goes above my level of expertise. 

View solution in original post

7 Replies
kona
Community Coach
Community Coach

 @bsmaples , unfortunately, no, Canvas doesn't have any dynamic/environmental variables like this on  the front end of Canvas. You might be able to somehow program something like this on the back-end, but that goes above my level of expertise. 

bsmaples
Community Participant

Thanks Kona, I appreciate your response. It seems there's just not an easy way to create and update copyright text as there's no custom course footers or dynamic variables in Canvas.

0 Kudos
James
Community Champion

This is something that you would need to add to your custom global JavaScript. That's the back-end stuff  @kona  was talking about. From there you can do a lot of stuff like check the date or make API calls to get information about the course or the user.  Back when I was starting with Canvas (2012-2013), the solution to everything seemed to be custom JavaScript. Now people are wanting more and more built in, but sometimes there isn't enough demand to implement something or people don't want to wait for it to be implemented, so there's still the JavaScript route.

bsmaples
Community Participant

Thanks James, I am a Canvas newbie and still learning the ins and outs of the LMS. I will look more into the JavaScript options to see what we can do there. I appreciate your response!

kona
Community Coach
Community Coach

 @bsmaples , you might want to join the https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=15a136a2-0508-447f-ac63-...‌ group in the Community. They are the programmers and ones who do this type of back end stuff so it might useful to have access to their resources and information.

jsavage2
Community Contributor

I know this is an old thread, but I was wondering if there'd been any update on this.

I know the answer has traditionally been custom JavaScript, and that's fine, but where can we find the environment variables available to the script? Or do we need to do API calls from within the custom js to get the information?

adam_c_voyton
Community Member

To echo the comments of other people on this thread, I would also like this feature! It would be a simple way to make pages and announcements more personalized to students. I used to do this in Blackboard,  think their term for these types of variables was called Tokens. While a Global JS option is a nice option for system admins, I'm not sure if regular teachers would be able to do this, as they don't have access to modify the Canvas instance's global theme (custom JavaScript and CSS).