Jerry Causby

LTI Variable Replacement as part of a custom field

Discussion created by Jerry Causby on Jun 7, 2018
Latest reply on Jun 19, 2018 by Jerry Causby

Hello Devs,

 

I'm currently trying to see if it would be possible to utilize Canvas' lti variable substitution in a probably unique kind of way.  We currently have our tool using variable substitution with custom fields just fine when the variable is the only value in the field, however I would like to substitute the variable as part of a value in the field.

 

For instance, we are currently passing in the context label as such

series=$com.instructure.contextLabel

 

This works fine, however when I try to include the variable with other information as well, it doesn't work:

tool=admin-ng/index.html?filter=series:$com.instructure.contextLabel

The tool launches fine, however looking at what is being sent in the url, it is not replacing the variable, or even trying since there is a %24 code before the com.instructure.contextLabel part, seeming to me that it is trying to pass along the '$', whereas the documentation for lti variable substitution says that it would pass on just the name of the replacement variable if it failed the substitution (ie. in this case it should be sending 'com.instructure.contextLabel' instead of '$com.instructure.contextLabel')

 

I suppose my main question is whether there exists a way to use variable substitution as I have described in the 'tool' code line?  Is variable substitution only processed if it's the only value in the field?

 

Thanks,

Jerry

Outcomes