Variable Substitutions
LTI Variable Substitutions
Variable substitution (aka variable expansion) is where custom variables really start to shine. They provide a mechanism for tool providers to request that specific, contextual information be sent across in the launch. When the tool consumer processes the launch request, it detects requested variable substitutions and sends the appropriate data where possible. Adding variable substitutions is exactly the same as adding custom variables, except the values are variables instead of constants. This is denoted by prefixing the value with a $. If the tool consumer doesn't recognize, or can't substitute, the value it will just send the variable as if it were are regular custom variable (i.e. the name of the substitution variable will be sent rather than the value).
This allows Canvas to expose data as LTI launch parameters during the LTI launch rather than requiring access to the Canvas API, which can be expensive for Canvas and the tool. It allows tool providers to be much more surgical when requesting user data, and it paves the way for us to be more transparent to tool installers, by showing them exactly what data the LTI tool will be given access to. Additionally, variable substitutions are generally simple to add to Canvas relative to gaining API access.
There are currently over 80 substitutions available. Many of the substitutions simply give access to additional user and context information. An LTI tool can request things like SIS ids, names, an avatar image, and an email address. Other variable substitutions assist tools with accessibility (prefersHighContrast), course copy (previousCourseIds), and masquerading users. Additionally, when we don't provide enough information or customization directly through LTI, tools can request everything they need to use the Canvas API for an even richer experience.
Some substitutions may be used as 'enabled_capabilities' for LTI2 tools. These substitutions have a 'Launch Parameter' label indicating the parameter name that will be sent in the tool launch if enabled.
For more information on variable substitution, see the IMS LTI specification.
Usage/Configuration
Variable substitutions can be configured for a tool in 3 ways:
Via UI
Custom fields can be configured via UI by editing the tool configuration and adding the desired variable to the Custom Fields text box.
The following would add the domain as a launch parameter called custom_arbitrary_name:
Via API
Custom fields can also be configured via API.
This would install a course-level tool with domain as a custom field:
Via JSON Configuration (LTI 1.3)
JSON can be used to configure an LTI 1.3 Developer Key.
The following JSON would create a developer key with the a placement specfic custom field and a tool-level custom field:
Via XML Configuration (LTI 1.1)
Custom fields can also be configured via XML.
This would create a tool in a course with custom fields, some of which are specific for a particular placement:
Supported Substitutions
ResourceLink.id
LTI - Custom parameter substitution: ResourceLink.id Returns the LTI value for the resource_link.id property Returns "$ResourceLink.id" otherwise.
Availability: always Launch Parameter: resourcelink_id
Context.id
an opaque identifier that uniquely identifies the context of the tool launch.
Availability: always Launch Parameter: context_id
ResourceLink.description
LTI - Custom parameter substitution: ResourceLink.description Returns the LTI value for the resource_link.description property Returns "$ResourceLink.description" otherwise.
Availability: always Launch Parameter: resourcelink_description
ResourceLink.title
LTI - Custom parameter substitution: ResourceLink.title Returns the LTI value for the resource_link.title property Returns "$ResourceLink.title" otherwise.
Availability: always Launch Parameter: resourcelink_title
ResourceLink.available.startDateTime
LTI - Custom parameter substitution: ResourceLink.available.startDateTime Returns the ISO 8601 date and time when this resource is available for learners to access Returns "$ResourceLink.available.startDateTime" otherwise.
Availability: always Launch Parameter: resourcelink_available_startdatetime
ResourceLink.available.endDateTime
LTI - Custom parameter substitution: ResourceLink.available.endDateTime Returns the ISO 8601 date and time when this resource ceases to be available for learners to access Returns "$ResourceLink.available.endDateTime" otherwise.
Availability: always Launch Parameter: resourcelink_available_enddatetime
ResourceLink.submission.endDateTime
LTI - Custom parameter substitution: ResourceLink.submission.endDateTime Returns the ISO 8601 date and time when this resource stops accepting submissions. Returns "$ResourceLink.submission.endDateTime" otherwise.
Availability: always Launch Parameter: resourcelink_submission_enddatetime
com.instructure.User.observees
If the current user is an observer in the launch context, this substitution returns a comma-separated list of user IDs linked to the current user for observing. For LTI 1.3 tools, the user IDs will correspond to the "sub" claim made in LTI 1.3 launches (a UUIDv4), while for all other tools, the user IDs will be the user's typical LTI ID.
Returns an empty string otherwise.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_user_observees
com.instructure.User.sectionNames
Returns an array of the section names in a JSON-escaped format that the user is enrolled in, if the context of the tool launch is within a course. The names are sorted by the course_section_id, so that they are useful in conjunction with the Canvas.course.sectionIds substitution.
Availability: when launched from a course (or a Group within a course) Launch Parameter: com_instructure_user_section_names
com.instructure.RCS.app_host
Returns the host of the rich content service for the current region.
Availability: always Launch Parameter: com_instructure_rcs_app_host
com.instructure.User.student_view
Returns true if the user is launching from student view.
Availability: when launched by a logged in user Launch Parameter: com_instructure_user_student_view
com.instructure.Context.globalId
The Canvas global identifier for the launch context.
Availability: always
com.instructure.Context.uuid
The Canvas UUID for the launch context.
Availability: always
Context.sourcedId [duplicates Person.sourcedId]
If the context is a Course, returns sourced Id of the context.
Availability: always
Context.id.history
With respect to the current course, recursively returns the context ids of the courses from which content has been copied (excludes cartridge imports). Will show a limit of 1000 context ids. When the number passes 1000, 'truncated' will show at the end of the list.
This is an alias of Canvas.course.previousContextIds.recursive
.
Availability: when launched in a course (or a Group within a course)
Message.documentTarget
communicates the kind of browser window/frame where the Canvas has launched a tool.
Availability: always Launch Parameter: launch_presentation_document_target
Message.locale
returns the current locale.
Availability: always Launch Parameter: launch_presentation_locale
ToolConsumerInstance.guid
returns a unique identifier for the Tool Consumer (Canvas).
Availability: always Launch Parameter: tool_consumer_instance_guid
Canvas.api.domain
returns the canvas domain for the current context.
Availability: always
Canvas.api.collaborationMembers.url
returns the api url for the members of the collaboration.
Availability: always
Canvas.api.baseUrl
returns the base URL for the current context.
Availability: always
ToolProxyBinding.memberships.url
returns the URL for the membership service associated with the current context.
This variable is for future use only. Complete support for the IMS Membership Service has not been added to Canvas. This will be updated when we fully support and certify the IMS Membership Service.
Availability: always
com.instructure.Observee.sisIds
returns all observee ids linked to this observer as an String separated by ,
.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_observee_sis_ids
Canvas.account.id
returns the account id for the current context.
Availability: always
Canvas.account.name
returns the account name for the current context.
Availability: always
Canvas.account.sisSourceId
returns the account's sis source id for the current context.
Availability: always
Canvas.rootAccount.id
returns the Root Account ID for the current context.
Availability: always
Canvas.rootAccount.sisSourceId
returns the root account's sis source id for the current context.
Availability: always
Canvas.externalTool.global_id
returns the global ID for the external tool that was launched. Only available for LTI 1.
Availability: always and when in an LTI 1
Canvas.externalTool.url
returns the URL for the external tool that was launched. Only available for LTI 1.
Availability: always and when in an LTI 1
com.instructure.brandConfigJSON.url
returns the URL to retrieve the brand config JSON for the launching context.
Availability: always
com.instructure.brandConfigJSON
returns the brand config JSON itself for the launching context.
Availability: always
Context.title
The title of the context.
Availability: always Launch Parameter: context_title
com.instructure.brandConfigJS.url
returns the URL to retrieve the brand config javascript for the launching context. This URL should be used as the src attribute for a script tag on the external tool provider's web page. It is configured to be used with the instructure-ui node module. More information on on how to use instructure ui react components can be found here.
Availability: always
Canvas.css.common
returns the URL for the common css file.
Availability: always
Canvas.shard.id
returns the shard id for the current context.
Availability: always
Canvas.root_account.global_id
returns the root account's global id for the current context.
Availability: always
Canvas.root_account.id [deprecated]
returns the root account id for the current context.
Availability: always
com.instructure.Editor.contents
The contents of the text editor associated with the content item launch.
Availability: when the tool is launched from the editor_button placement Launch Parameter: com_instructure_editor_contents
vnd.Canvas.root_account.uuid
returns the account uuid for the current context.
Availability: always Launch Parameter: vnd_canvas_root_account_uuid
Canvas.root_account.sisSourceId [deprecated]
returns the root account sis source id for the current context.
Availability: always
Canvas.course.id
returns the current course id.
Availability: when launched in a course (or a Group within a course)
com.instructure.Editor.selection
The contents the user has selected in the text editor associated with the content item launch.
Availability: when the tool is launched from the editor_button placement Launch Parameter: com_instructure_editor_selection
vnd.instructure.Course.uuid
returns the current course uuid.
Availability: when launched in a course (or a Group within a course)
Canvas.course.name
returns the current course name.
Availability: when launched in a course (or a Group within a course)
Canvas.course.sisSourceId
returns the current course sis source id.
Availability: when launched in a course (or a Group within a course)
com.instructure.Course.integrationId
returns the current course integration id.
Availability: when launched in a course (or a Group within a course)
com.instructure.PostMessageToken
A token that can be used for frontend communication between an LTI tool and Canvas via the Window.postMessage API.
Availability: ** Launch Parameter: com_instructure_post_message_token
Canvas.course.startAt
returns the current course start date.
Availability: when launched in a course (or a Group within a course)
Canvas.course.endAt
returns the current course end date.
Availability: when launched in a course (or a Group within a course)
Canvas.course.workflowState
returns the current course workflow state. Workflow states of "claimed" or "created" indicate an unpublished course.
Availability: when launched in a course (or a Group within a course)
Canvas.term.startAt
returns the current course's term start date.
Availability: when launched in a course (or a Group within a course) that has a term with a start date
Canvas.term.endAt
returns the current course's term end date.
Availability: when launched in a course (or a Group within a course) that has a term with a end date
Canvas.term.name
returns the current course's term name.
Availability: when launched in a course (or a Group within a course) that has a term with a name Launch Parameter: canvas_term_name
Canvas.term.id
returns the current course's term numerical id.
Availability: *when launched in a course (or a Group within a course) that has a term * Launch Parameter: canvas_term_id
CourseSection.sourcedId
returns the current course sis source id to return the section source id use Canvas.course.sectionIds.
Availability: when launched in a course (or a Group within a course) Launch Parameter: lis_course_section_sourcedid
Canvas.enrollment.enrollmentState
returns the current course enrollment state.
Availability: when launched in a course (or a Group within a course)
com.instructure.Assignment.anonymous_grading
returns true if the assignment has anonymous grading enabled.
Availability: when launched as an assignment Launch Parameter: com_instructure_assignment_anonymous_grading
com.instructure.Assignment.lti.id
The LTI assignment id of an assignment. This value corresponds with the ext_lti_assignment_id
send in various launches and webhooks.
Availability: always Launch Parameter: com_instructure_assignment_lti_id
com.instructure.Assignment.restrict_quantitative_data
returns true if the assignment restricts quantitative data. Assignment types: points, percentage, gpa_scale are all considered quantitative.
Availability: when launched as an assignment Launch Parameter: com_instructure_assignment_restrict_quantitative_data
com.instructure.Course.gradingScheme
returns the grading scheme data for the course it is an array of objects of grade levels.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_course_grading_scheme
com.Instructure.membership.roles
returns the current course membership roles using the LIS v2 vocabulary.
Availability: when launched from a course or an account (or a Group within a course or account) Launch Parameter: com_instructure_membership_roles
Canvas.membership.roles
returns the current course membership roles.
Availability: when launched from a course or an account (or a Group within a course or account) Launch Parameter: canvas_membership_roles
Canvas.membership.concludedRoles
This is a list of IMS LIS roles should have a different key.
Availability: when launched in a course (or a Group within a course)
Canvas.membership.permissions<>
Returns a comma-separated list of permissions granted to the user in the current context, given a comma-separated set to check using the format $Canvas.membership.permissions<example_permission,example_permission2,..>
.
Availability: when launched from a course or an account (or a Group within a course or account)
Canvas.course.previousContextIds
With respect to the current course, returns the context ids of the courses from which content has been copied (excludes cartridge imports).
Availability: when launched in a course (or a Group within a course)
com.instructure.Assignment.description
The LTI assignment description of an assignment.
Availability: always Launch Parameter: com_instructure_assignment_description
Canvas.course.previousContextIds.recursive
With respect to the current course, recursively returns the context ids of the courses from which content has been copied (excludes cartridge imports). Will show a limit of 1000 context ids. When the number passes 1000, 'truncated' will show at the end of the list.
This is an alias of $Context.id.history
.
Availability: when launched in a course (or a Group within a course)
Canvas.course.previousCourseIds
With respect to the current course, returns the course ids of the courses from which content has been copied (excludes cartridge imports).
Availability: when launched in a course (or a Group within a course)
Person.name.full
Returns the full name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_full
Person.name.display
Returns the display name of the launching user.
Availability: when launched by a logged in user Launch Parameter: person_name_display
Person.name.family
Returns the last name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_family
Person.name.given
Returns the first name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_given
com.instructure.Person.name_sortable
Returns the sortable name of the launching user.
Availability: when launched by a logged in user Launch Parameter: com_instructure_person_name_sortable
com.instructure.Assignment.allowedFileExtensions
A comma separated list of the file extensions that are allowed for submitting to this assignment. If there are no limits on what files can be uploaded, an empty string will be returned. If the assignment does not allow file uploads as a submission type, then no substitution will be performed.
Availability: when the tool is used to upload a file as an assignment submission Launch Parameter: com_instructure_assignment_allowed_file_extensions
Person.email.primary
Returns the primary email of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_contact_email_primary
com.instructure.Person.pronouns
Returns pronouns for the current user.
Availability: when launched by a logged in user Launch Parameter: com_instructure_person_pronouns
vnd.Canvas.Person.email.sis
Returns the institution assigned email of the launching user.
Availability: when launched by a logged in user that was added via SIS
Person.address.timezone
Returns the name of the timezone of the launching user.
Availability: when launched by a logged in user
User.image
Returns the profile picture URL of the launching user.
Availability: when launched by a logged in user Launch Parameter: user_image
com.instructure.OriginalityReport.id
The Canvas id of the Originality Report associated with the launch.
Availability: ** Launch Parameter: com_instructure_originality_report_id
User.id [duplicates Canvas.user.id]
Returns the Canvas user_id of the launching user.
Availability: when launched by a logged in user Launch Parameter: user_id
Canvas.user.id [duplicates User.id]
Returns the Canvas user_id of the launching user.
Availability: when launched by a logged in user
vnd.instructure.User.uuid [duplicates User.uuid]
Returns the Canvas user_uuid of the launching user for the context.
Availability: when launched by a logged in user
com.instructure.Submission.id
The Canvas id of the submission associated with the launch.
Availability: ** Launch Parameter: com_instructure_submission_id
vnd.instructure.User.current_uuid [duplicates User.uuid]
Returns the current Canvas user_uuid of the launching user.
Availability: when launched by a logged in user
Canvas.user.prefersHighContrast
Returns the users preference for high contrast colors (an accessibility feature).
Availability: when launched by a logged in user
com.instructure.Course.groupIds
returns the Canvas ids of all active groups in the current course.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_course_groupids
Canvas.group.contextIds
returns the context ids for the groups the user belongs to in the course.
Availability: always
Membership.role
Returns the IMS LTI membership service roles for filtering via query parameters. Or, for LTI 1.3 tools, returns the IMS LTI Names and Role Provisioning Service roles for filtering via query parameters.
Availability: when launched by a logged in user Launch Parameter: roles
Canvas.xuser.allRoles [duplicates ext_roles which is sent by default]
Returns list of LIS role full URNs. Note that this will include all roles the user has. There are 3 different levels of roles defined: Context, Institution, System. Context role urns start with "urn:lti:ims" and include roles for the context where the launch occurred. Institution role urns start with "urn:lti:instrole" and include roles the user has in the institution. This will include roles they have in other courses or at the account level. Note that there is not a TA role at the Institution level. Instead Users with a TA enrollment will have an institution role of Instructor. System role urns start with "urn:lti:sysrole" and include roles for the entire system.
Availability: always
com.instructure.User.allRoles
Same as "Canvas.xuser.allRoles", but uses roles formatted for LTI Advantage.
Availability: always
com.instructure.File.id
The Canvas id of the file associated with the submission in the launch.
Availability: ** Launch Parameter: com_instructure_file_id
Canvas.user.globalId
Returns the Canvas global user_id of the launching user.
Availability: when launched by a logged in user
Canvas.user.isRootAccountAdmin
Returns true for root account admins and false for all other roles.
Availability: when launched by a logged in user
Canvas.user.adminableAccounts
Returns a string with a comma-separated list of the (local) account IDs that a user has admin rights in, which fall under the root account that the tool was launched under. This list includes the IDs of all subaccounts of these accounts (and their subaccounts, etc.), since the admin privileges carry from an account to all its subaccounts. Root account admins are not supported by this variable, use Canvas.user.isRootAccountAdmin
instead.
Example:
Root account
Subaccount 1 (user is account admin)
Subaccount 2
Subaccount 3
Subaccount 4
Subaccount 5
Result: "1,2,4,3"
Will show a limit of 40000 characters. If the account IDs list is too big to fit into 40000 characters, 'truncated' will show at the end of the list. The result is cached for 5 minutes.
Availability: when launched by a logged in user
CourseOffering.sourcedId
the LIS identifier for the course offering.
Availability: when launched in a course (or a Group within a course) Launch Parameter: lis_course_offering_sourcedid
User.username [duplicates Canvas.user.loginId]
Username/Login ID for the primary pseudonym for the user for the account. This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.loginId [duplicates User.username]
Username/Login ID for the primary pseudonym for the user for the account. This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.sisSourceId [duplicates Person.sourcedId]
Returns the sis source id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.sisIntegrationId
Returns the integration id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Context.id
an opaque identifier that uniquely identifies the context of the tool launch.
Availability: always Launch Parameter: context_id
Person.sourcedId [duplicates Canvas.user.sisSourceId]
Returns the sis source id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use Launch Parameter: lis_person_sourcedid
Canvas.logoutService.url
Returns the logout service url for the user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
Availability: always
Canvas.masqueradingUser.id
Returns the Canvas user_id for the masquerading user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
Availability: when the user is being masqueraded
Canvas.masqueradingUser.userId
Returns the opaque user_id for the masquerading user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
For LTI 1.3 tools, the opaque user IDs are UUIDv4 values (also used in the "sub" claim in LTI 1.3 launches), while for other LTI versions, the user ID will be the user's 40 character opaque LTI id.
Availability: when the user is being masqueraded
Canvas.xapi.url
Returns the xapi url for the user.
Availability: always
com.instructure.Context.globalId
The Canvas global identifier for the launch context.
Availability: always
Caliper.url
Returns the caliper url for the user.
Availability: always
com.instructure.Context.uuid
The Canvas UUID for the launch context.
Availability: always
Context.sourcedId [duplicates Person.sourcedId]
If the context is a Course, returns sourced Id of the context.
Availability: always
Canvas.course.sectionIds
Returns a comma separated list of section_id's that the user is enrolled in.
Availability: when launched from a course (or a Group within a course)
Context.id.history
With respect to the current course, recursively returns the context ids of the courses from which content has been copied (excludes cartridge imports). Will show a limit of 1000 context ids. When the number passes 1000, 'truncated' will show at the end of the list.
This is an alias of Canvas.course.previousContextIds.recursive
.
Availability: when launched in a course (or a Group within a course)
Canvas.course.sectionRestricted
Returns true if the user can only view and interact with users in their own sections.
Availability: when launched from a course (or a Group within a course)
Canvas.course.sectionSisSourceIds
Returns a comma separated list of section sis_id's that the user is enrolled in.
Availability: when launched from a course (or a Group within a course)
Message.documentTarget
communicates the kind of browser window/frame where the Canvas has launched a tool.
Availability: always Launch Parameter: launch_presentation_document_target
Message.locale
returns the current locale.
Availability: always Launch Parameter: launch_presentation_locale
com.instructure.contextLabel
Returns the course code.
Availability: when launched in a course (or a Group within a course) Launch Parameter: context_label
ToolConsumerInstance.guid
returns a unique identifier for the Tool Consumer (Canvas).
Availability: always Launch Parameter: tool_consumer_instance_guid
Canvas.module.id
Returns the module_id that the module item was launched from.
Availability: when content tag is present
Canvas.moduleItem.id
Returns the module_item_id of the module item that was launched.
Availability: when content tag is present
Canvas.api.domain
returns the canvas domain for the current context.
Availability: always
Canvas.assignment.id
Returns the assignment_id of the assignment that was launched.
Availability: when launched as an assignment
Canvas.api.collaborationMembers.url
returns the api url for the members of the collaboration.
Availability: always
Canvas.assignment.description
Returns the assignment_description of the assignment that was launched.
Availability: when launched as an assignment
Canvas.api.baseUrl
returns the base URL for the current context.
Availability: always
com.instructure.Group.id
Returns the Canvas id of the group the current user is in if launching from a group assignment.
Availability: when launched by a logged in user and when launched as an assignment Launch Parameter: vnd_canvas_group_id
ToolProxyBinding.memberships.url
returns the URL for the membership service associated with the current context.
This variable is for future use only. Complete support for the IMS Membership Service has not been added to Canvas. This will be updated when we fully support and certify the IMS Membership Service.
Availability: always
Canvas.account.id
returns the account id for the current context.
Availability: always
com.instructure.Group.name
Returns the name of the group the current user is in if launching from a group assignment.
Availability: when launched by a logged in user and when launched as an assignment Launch Parameter: vnd_canvas_group_name
Canvas.account.name
returns the account name for the current context.
Availability: always
Canvas.assignment.title
Returns the title of the assignment that was launched.
Availability: when launched as an assignment
Canvas.account.sisSourceId
returns the account's sis source id for the current context.
Availability: always
Canvas.assignment.pointsPossible
Returns the points possible of the assignment that was launched.
Availability: when launched as an assignment
Canvas.rootAccount.id
returns the Root Account ID for the current context.
Availability: always
Canvas.assignment.hideInGradebook
Returns true if the assignment is hidden in the gradebook.
Availability: when launched as an assignment
Canvas.rootAccount.sisSourceId
returns the root account's sis source id for the current context.
Availability: always
Canvas.externalTool.global_id
returns the global ID for the external tool that was launched. Only available for LTI 1.
Availability: always and when in an LTI 1
Canvas.assignment.omitFromFinalGrade
Returns true if the assignment is omitted from students' final grade.
Availability: when launched as an assignment
Canvas.assignment.unlockAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
Canvas.externalTool.url
returns the URL for the external tool that was launched. Only available for LTI 1.
Availability: always and when in an LTI 1
Canvas.assignment.lockAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
Canvas.assignment.dueAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
com.instructure.brandConfigJSON.url
returns the URL to retrieve the brand config JSON for the launching context.
Availability: always
Canvas.assignment.unlockAt.iso8601
Returns the unlock_at
date of the assignment that was launched. Only available when launched as an assignment with an unlock_at
set.
Availability: always
com.instructure.brandConfigJSON
returns the brand config JSON itself for the launching context.
Availability: always
com.instructure.brandConfigJS.url
returns the URL to retrieve the brand config javascript for the launching context. This URL should be used as the src attribute for a script tag on the external tool provider's web page. It is configured to be used with the instructure-ui node module. More information on on how to use instructure ui react components can be found here.
Availability: always
Canvas.assignment.lockAt.iso8601
Returns the lock_at
date of the assignment that was launched. Only available when launched as an assignment with a lock_at
set.
Availability: always
Canvas.css.common
returns the URL for the common css file.
Availability: always
Canvas.shard.id
returns the shard id for the current context.
Availability: always
Canvas.assignment.dueAt.iso8601
Returns the due_at
date of the assignment that was launched. If the tool is launched as a student, this will be the date that assignment is due for that student (or unexpanded -- "$Canvas.assignment.dueAt.iso8601" -- if there is no due date for the student). If the tool is launched as an instructor and there are multiple possible due dates (i.e., there are multiple sections and at least one has a due date override), this will be the LATEST effective due date of any section or student.
Availability: when launched as an assignment
Canvas.root_account.global_id
returns the root account's global id for the current context.
Availability: always
Canvas.assignment.earliestEnrollmentDueAt.iso8601
Returns the due_at
date of the assignment that was launched. If the tool is launched as a student, this will be the date that assignment is due for that student (or an empty string if there is no due date for the student). If the tool is launched as an instructor and different students are assigned multiple due dates (i.e., there are students in sections with overrides / different effective due dates), this will be the EARLIEST due date of any enrollment (or an empty string if there are no enrollments with due dates). Note than like allDueAts, but unlike the dueAt expansion, there must be at least one enrollment in a section for its due date to be considered.
Availability: when launched as an assignment
Canvas.root_account.id [deprecated]
returns the root account id for the current context.
Availability: always
vnd.Canvas.root_account.uuid
returns the account uuid for the current context.
Availability: always Launch Parameter: vnd_canvas_root_account_uuid
Canvas.assignment.allDueAts.iso8601
In Canvas, users, sections and groups can have distinct due dates for the same assignment. This returns all possible due_at
dates of the assignment that was launched. If the assignment is assigned to anyone without a due date, an empty string will be present in the list (hence the ",," in the example)
Only available when launched as an assignment.
Availability: when launched as an assignment
Canvas.root_account.sisSourceId [deprecated]
returns the root account sis source id for the current context.
Availability: always
Canvas.course.id
returns the current course id.
Availability: when launched in a course (or a Group within a course)
Canvas.assignment.published
Returns true if the assignment that was launched is published. Only available when launched as an assignment.
Availability: when launched as an assignment
vnd.instructure.Course.uuid
returns the current course uuid.
Availability: when launched in a course (or a Group within a course)
Canvas.assignment.lockdownEnabled
Returns true if the assignment is LDB enabled. Only available when launched as an assignment.
Availability: when launched as an assignment
Canvas.course.name
returns the current course name.
Availability: when launched in a course (or a Group within a course)
Canvas.course.sisSourceId
returns the current course sis source id.
Availability: when launched in a course (or a Group within a course)
Canvas.assignment.allowedAttempts
Returns the allowed number of submission attempts.
Availability: when launched as an assignment
com.instructure.Course.integrationId
returns the current course integration id.
Availability: when launched in a course (or a Group within a course)
Canvas.course.startAt
returns the current course start date.
Availability: when launched in a course (or a Group within a course)
Canvas.assignment.submission.studentAttempts
Returns the number of submission attempts which the student did.
Availability: when launched as an assignment by a student
Canvas.course.endAt
returns the current course end date.
Availability: when launched in a course (or a Group within a course)
LtiLink.custom.url
Returns the endpoint url for accessing link-level tool settings Only available for LTI 2.0.
Availability: always
Canvas.course.workflowState
returns the current course workflow state. Workflow states of "claimed" or "created" indicate an unpublished course.
Availability: when launched in a course (or a Group within a course)
ToolProxyBinding.custom.url
Returns the endpoint url for accessing context-level tool settings Only available for LTI 2.0.
Availability: always
ToolProxy.custom.url
Returns the endpoint url for accessing system-wide tool settings Only available for LTI 2.0.
Availability: always
ToolConsumerProfile.url
Returns the Tool Consumer Profile url for the tool. Only available for LTI 2.0.
Availability: always
Canvas.term.startAt
returns the current course's term start date.
Availability: when launched in a course (or a Group within a course) that has a term with a start date
vnd.Canvas.OriginalityReport.url
The originality report LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_originality_report_url
Canvas.term.endAt
returns the current course's term end date.
Availability: when launched in a course (or a Group within a course) that has a term with a end date
Canvas.term.name
returns the current course's term name.
Availability: when launched in a course (or a Group within a course) that has a term with a name Launch Parameter: canvas_term_name
vnd.Canvas.submission.url
The submission LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_submission_url
Canvas.term.id
returns the current course's term numerical id.
Availability: *when launched in a course (or a Group within a course) that has a term * Launch Parameter: canvas_term_id
vnd.Canvas.submission.history.url
The submission history LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_submission_history_url
CourseSection.sourcedId
returns the current course sis source id to return the section source id use Canvas.course.sectionIds.
Availability: when launched in a course (or a Group within a course) Launch Parameter: lis_course_section_sourcedid
Canvas.file.media.id
Availability: when an attachment is present and it has either a media object or media entry id defined
Canvas.enrollment.enrollmentState
returns the current course enrollment state.
Availability: when launched in a course (or a Group within a course)
Canvas.file.media.type
Availability: when an attachment is present and has a media object defined
com.instructure.Assignment.anonymous_grading
returns true if the assignment has anonymous grading enabled.
Availability: when launched as an assignment Launch Parameter: com_instructure_assignment_anonymous_grading
com.instructure.Assignment.restrict_quantitative_data
returns true if the assignment restricts quantitative data. Assignment types: points, percentage, gpa_scale are all considered quantitative.
Availability: when launched as an assignment Launch Parameter: com_instructure_assignment_restrict_quantitative_data
Canvas.file.media.duration
Availability: when an attachment is present and has a media object defined
com.instructure.Course.gradingScheme
returns the grading scheme data for the course it is an array of objects of grade levels.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_course_grading_scheme
Canvas.file.media.size
Availability: when an attachment is present and has a media object defined
Canvas.file.media.title
Availability: when an attachment is present and has a media object defined
com.Instructure.membership.roles
returns the current course membership roles using the LIS v2 vocabulary.
Availability: when launched from a course or an account (or a Group within a course or account) Launch Parameter: com_instructure_membership_roles
Canvas.file.usageRights.name
Availability: when an attachment is present and has usage rights defined
Canvas.file.usageRights.url
Availability: when an attachment is present and has usage rights defined
Canvas.membership.roles
returns the current course membership roles.
Availability: when launched from a course or an account (or a Group within a course or account) Launch Parameter: canvas_membership_roles
Canvas.membership.concludedRoles
This is a list of IMS LIS roles should have a different key.
Availability: when launched in a course (or a Group within a course)
Canvas.file.usageRights.copyrightText
Availability: when an attachment is present and has usage rights defined
com.instructure.Course.accept_canvas_resource_types
Returns the types of resources that can be imported to the current page, forwarded from the request. Value is a comma-separated array of one or more values of: ["assignment", "assignment_group", "audio", "discussion_topic", "document", "image", "module", "quiz", "page", "video"]
Only functional when com_instructure_course_accept_canvas_resource_types
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
Canvas.membership.permissions<>
Returns a comma-separated list of permissions granted to the user in the current context, given a comma-separated set to check using the format $Canvas.membership.permissions<example_permission,example_permission2,..>
.
Availability: when launched from a course or an account (or a Group within a course or account)
com.instructure.Course.canvas_resource_type
Returns the target resource type for the current page, forwarded from the request. Value is the largest logical unit of the page. Possible values are: ["assignment", "assignment_group", "audio", "discussion_topic", "document", "image", "module", "quiz", "page", "video"] on Pages Index -> 'page' on Modules -> 'module' and so on.
Only functional when com_instructure_course_canvas_resource_type
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
Canvas.course.previousContextIds
With respect to the current course, returns the context ids of the courses from which content has been copied (excludes cartridge imports).
Availability: when launched in a course (or a Group within a course)
com.instructure.Course.canvas_resource_id
Returns the target resource id for the current page, forwarded from the request. Only functional when com_instructure_course_canvas_resource_type
is included as a query param. Currently, this is not supported generally, and is only implemented for specific use cases.
Availability: always
Canvas.course.previousContextIds.recursive
With respect to the current course, recursively returns the context ids of the courses from which content has been copied (excludes cartridge imports). Will show a limit of 1000 context ids. When the number passes 1000, 'truncated' will show at the end of the list.
This is an alias of $Context.id.history
.
Availability: when launched in a course (or a Group within a course)
com.instructure.Course.allow_canvas_resource_selection
Returns whether a content can be imported into a specific group on the page, forwarded from the request. True for Modules page and Assignment Groups page. False for other content index pages.
Only functional when com_instructure_course_allow_canvas_resource_selection
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
Canvas.course.previousCourseIds
With respect to the current course, returns the course ids of the courses from which content has been copied (excludes cartridge imports).
Availability: when launched in a course (or a Group within a course)
com.instructure.Course.available_canvas_resources
Returns a JSON-encoded list of content groups which can be selected, providing ID and name of each group, forwarded from the request. Empty value if com.instructure.Course.allow_canvas_resource_selection is false.
Only functional when com_instructure_course_available_canvas_resources
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
Person.name.full
Returns the full name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_full
Person.name.display
Returns the display name of the launching user.
Availability: when launched by a logged in user Launch Parameter: person_name_display
com.instructure.Account.usage_metrics_enabled
Availability: always
Person.name.family
Returns the last name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_family
Person.name.given
Returns the first name of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_name_given
com.instructure.Person.name_sortable
Returns the sortable name of the launching user.
Availability: when launched by a logged in user Launch Parameter: com_instructure_person_name_sortable
Person.email.primary
Returns the primary email of the launching user.
Availability: when launched by a logged in user Launch Parameter: lis_person_contact_email_primary
com.instructure.Person.pronouns
Returns pronouns for the current user.
Availability: when launched by a logged in user Launch Parameter: com_instructure_person_pronouns
vnd.Canvas.Person.email.sis
Returns the institution assigned email of the launching user.
Availability: when launched by a logged in user that was added via SIS
Person.address.timezone
Returns the name of the timezone of the launching user.
Availability: when launched by a logged in user
User.image
Returns the profile picture URL of the launching user.
Availability: when launched by a logged in user Launch Parameter: user_image
User.id [duplicates Canvas.user.id]
Returns the Canvas user_id of the launching user.
Availability: when launched by a logged in user Launch Parameter: user_id
Canvas.user.id [duplicates User.id]
Returns the Canvas user_id of the launching user.
Availability: when launched by a logged in user
vnd.instructure.User.uuid [duplicates User.uuid]
Returns the Canvas user_uuid of the launching user for the context.
Availability: when launched by a logged in user
vnd.instructure.User.current_uuid [duplicates User.uuid]
Returns the current Canvas user_uuid of the launching user.
Availability: when launched by a logged in user
Canvas.user.prefersHighContrast
Returns the users preference for high contrast colors (an accessibility feature).
Availability: when launched by a logged in user
com.instructure.Course.groupIds
returns the Canvas ids of all active groups in the current course.
Availability: when launched in a course (or a Group within a course) Launch Parameter: com_instructure_course_groupids
Canvas.group.contextIds
returns the context ids for the groups the user belongs to in the course.
Availability: always
Membership.role
Returns the IMS LTI membership service roles for filtering via query parameters. Or, for LTI 1.3 tools, returns the IMS LTI Names and Role Provisioning Service roles for filtering via query parameters.
Availability: when launched by a logged in user Launch Parameter: roles
Canvas.xuser.allRoles [duplicates ext_roles which is sent by default]
Returns list of LIS role full URNs. Note that this will include all roles the user has. There are 3 different levels of roles defined: Context, Institution, System. Context role urns start with "urn:lti:ims" and include roles for the context where the launch occurred. Institution role urns start with "urn:lti:instrole" and include roles the user has in the institution. This will include roles they have in other courses or at the account level. Note that there is not a TA role at the Institution level. Instead Users with a TA enrollment will have an institution role of Instructor. System role urns start with "urn:lti:sysrole" and include roles for the entire system.
Availability: always
com.instructure.User.allRoles
Same as "Canvas.xuser.allRoles", but uses roles formatted for LTI Advantage.
Availability: always
Canvas.user.globalId
Returns the Canvas global user_id of the launching user.
Availability: when launched by a logged in user
Canvas.user.isRootAccountAdmin
Returns true for root account admins and false for all other roles.
Availability: when launched by a logged in user
Canvas.user.adminableAccounts
Returns a string with a comma-separated list of the (local) account IDs that a user has admin rights in, which fall under the root account that the tool was launched under. This list includes the IDs of all subaccounts of these accounts (and their subaccounts, etc.), since the admin privileges carry from an account to all its subaccounts. Root account admins are not supported by this variable, use Canvas.user.isRootAccountAdmin
instead.
Example:
Root account
Subaccount 1 (user is account admin)
Subaccount 2
Subaccount 3
Subaccount 4
Subaccount 5
Result: "1,2,4,3"
Will show a limit of 40000 characters. If the account IDs list is too big to fit into 40000 characters, 'truncated' will show at the end of the list. The result is cached for 5 minutes.
Availability: when launched by a logged in user
User.username [duplicates Canvas.user.loginId]
Username/Login ID for the primary pseudonym for the user for the account. This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.loginId [duplicates User.username]
Username/Login ID for the primary pseudonym for the user for the account. This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.sisSourceId [duplicates Person.sourcedId]
Returns the sis source id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Canvas.user.sisIntegrationId
Returns the integration id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use
Person.sourcedId [duplicates Canvas.user.sisSourceId]
Returns the sis source id for the primary pseudonym for the user for the account This may not be the pseudonym the user is actually logged in with.
Availability: when pseudonym is in use Launch Parameter: lis_person_sourcedid
Canvas.logoutService.url
Returns the logout service url for the user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
Availability: always
Canvas.masqueradingUser.id
Returns the Canvas user_id for the masquerading user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
Availability: when the user is being masqueraded
Canvas.masqueradingUser.userId
Returns the opaque user_id for the masquerading user. This is the pseudonym the user is actually logged in as. It may not hold all the sis info needed in other launch substitutions.
For LTI 1.3 tools, the opaque user IDs are UUIDv4 values (also used in the "sub" claim in LTI 1.3 launches), while for other LTI versions, the user ID will be the user's 40 character opaque LTI id.
Availability: when the user is being masqueraded
Canvas.xapi.url
Returns the xapi url for the user.
Availability: always
Caliper.url
Returns the caliper url for the user.
Availability: always
Canvas.course.sectionIds
Returns a comma separated list of section_id's that the user is enrolled in.
Availability: when launched from a course (or a Group within a course)
Canvas.course.sectionRestricted
Returns true if the user can only view and interact with users in their own sections.
Availability: when launched from a course (or a Group within a course)
Canvas.course.sectionSisSourceIds
Returns a comma separated list of section sis_id's that the user is enrolled in.
Availability: when launched from a course (or a Group within a course)
com.instructure.contextLabel
Returns the course code.
Availability: when launched in a course (or a Group within a course) Launch Parameter: context_label
Canvas.module.id
Returns the module_id that the module item was launched from.
Availability: when content tag is present
Canvas.moduleItem.id
Returns the module_item_id of the module item that was launched.
Availability: when content tag is present
Canvas.assignment.id
Returns the assignment_id of the assignment that was launched.
Availability: when launched as an assignment
Canvas.assignment.description
Returns the assignment_description of the assignment that was launched.
Availability: when launched as an assignment
com.instructure.Group.id
Returns the Canvas id of the group the current user is in if launching from a group assignment.
Availability: when launched by a logged in user and when launched as an assignment Launch Parameter: vnd_canvas_group_id
com.instructure.Group.name
Returns the name of the group the current user is in if launching from a group assignment.
Availability: when launched by a logged in user and when launched as an assignment Launch Parameter: vnd_canvas_group_name
Canvas.assignment.title
Returns the title of the assignment that was launched.
Availability: when launched as an assignment
Canvas.assignment.pointsPossible
Returns the points possible of the assignment that was launched.
Availability: when launched as an assignment
Canvas.assignment.hideInGradebook
Returns true if the assignment is hidden in the gradebook.
Availability: when launched as an assignment
Canvas.assignment.omitFromFinalGrade
Returns true if the assignment is omitted from students' final grade.
Availability: when launched as an assignment
Canvas.assignment.unlockAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
Canvas.assignment.lockAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
Canvas.assignment.dueAt [deprecated]
deprecated in favor of ISO8601.
Availability: when launched as an assignment
Canvas.assignment.unlockAt.iso8601
Returns the unlock_at
date of the assignment that was launched. Only available when launched as an assignment with an unlock_at
set.
Availability: always
Canvas.assignment.lockAt.iso8601
Returns the lock_at
date of the assignment that was launched. Only available when launched as an assignment with a lock_at
set.
Availability: always
Canvas.assignment.dueAt.iso8601
Returns the due_at
date of the assignment that was launched. If the tool is launched as a student, this will be the date that assignment is due for that student (or unexpanded -- "$Canvas.assignment.dueAt.iso8601" -- if there is no due date for the student). If the tool is launched as an instructor and there are multiple possible due dates (i.e., there are multiple sections and at least one has a due date override), this will be the LATEST effective due date of any section or student.
Availability: when launched as an assignment
Canvas.assignment.earliestEnrollmentDueAt.iso8601
Returns the due_at
date of the assignment that was launched. If the tool is launched as a student, this will be the date that assignment is due for that student (or an empty string if there is no due date for the student). If the tool is launched as an instructor and different students are assigned multiple due dates (i.e., there are students in sections with overrides / different effective due dates), this will be the EARLIEST due date of any enrollment (or an empty string if there are no enrollments with due dates). Note than like allDueAts, but unlike the dueAt expansion, there must be at least one enrollment in a section for its due date to be considered.
Availability: when launched as an assignment
Canvas.assignment.allDueAts.iso8601
In Canvas, users, sections and groups can have distinct due dates for the same assignment. This returns all possible due_at
dates of the assignment that was launched. If the assignment is assigned to anyone without a due date, an empty string will be present in the list (hence the ",," in the example)
Only available when launched as an assignment.
Availability: when launched as an assignment
Canvas.assignment.published
Returns true if the assignment that was launched is published. Only available when launched as an assignment.
Availability: when launched as an assignment
Canvas.assignment.lockdownEnabled
Returns true if the assignment is LDB enabled. Only available when launched as an assignment.
Availability: when launched as an assignment
Canvas.assignment.allowedAttempts
Returns the allowed number of submission attempts.
Availability: when launched as an assignment
Canvas.assignment.submission.studentAttempts
Returns the number of submission attempts which the student did.
Availability: when launched as an assignment by a student
LtiLink.custom.url
Returns the endpoint url for accessing link-level tool settings Only available for LTI 2.0.
Availability: always
ToolProxyBinding.custom.url
Returns the endpoint url for accessing context-level tool settings Only available for LTI 2.0.
Availability: always
ToolProxy.custom.url
Returns the endpoint url for accessing system-wide tool settings Only available for LTI 2.0.
Availability: always
ToolConsumerProfile.url
Returns the Tool Consumer Profile url for the tool. Only available for LTI 2.0.
Availability: always
vnd.Canvas.OriginalityReport.url
The originality report LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_originality_report_url
vnd.Canvas.submission.url
The submission LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_submission_url
vnd.Canvas.submission.history.url
The submission history LTI2 service endpoint.
Availability: always Launch Parameter: vnd_canvas_submission_history_url
Canvas.file.media.id
Availability: when an attachment is present and it has either a media object or media entry id defined
Canvas.file.media.type
Availability: when an attachment is present and has a media object defined
Canvas.file.media.duration
Availability: when an attachment is present and has a media object defined
Canvas.file.media.size
Availability: when an attachment is present and has a media object defined
Canvas.file.media.title
Availability: when an attachment is present and has a media object defined
Canvas.file.usageRights.name
Availability: when an attachment is present and has usage rights defined
Canvas.file.usageRights.url
Availability: when an attachment is present and has usage rights defined
Canvas.file.usageRights.copyrightText
Availability: when an attachment is present and has usage rights defined
com.instructure.Course.accept_canvas_resource_types
Returns the types of resources that can be imported to the current page, forwarded from the request. Value is a comma-separated array of one or more values of: ["assignment", "assignment_group", "audio", "discussion_topic", "document", "image", "module", "quiz", "page", "video"]
Only functional when com_instructure_course_accept_canvas_resource_types
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
com.instructure.Course.canvas_resource_type
Returns the target resource type for the current page, forwarded from the request. Value is the largest logical unit of the page. Possible values are: ["assignment", "assignment_group", "audio", "discussion_topic", "document", "image", "module", "quiz", "page", "video"] on Pages Index -> 'page' on Modules -> 'module' and so on.
Only functional when com_instructure_course_canvas_resource_type
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
com.instructure.Course.canvas_resource_id
Returns the target resource id for the current page, forwarded from the request. Only functional when com_instructure_course_canvas_resource_type
is included as a query param. Currently, this is not supported generally, and is only implemented for specific use cases.
Availability: always
com.instructure.Course.allow_canvas_resource_selection
Returns whether a content can be imported into a specific group on the page, forwarded from the request. True for Modules page and Assignment Groups page. False for other content index pages.
Only functional when com_instructure_course_allow_canvas_resource_selection
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
com.instructure.Course.available_canvas_resources
Returns a JSON-encoded list of content groups which can be selected, providing ID and name of each group, forwarded from the request. Empty value if com.instructure.Course.allow_canvas_resource_selection is false.
Only functional when com_instructure_course_available_canvas_resources
is included as a query param in Canvas-side GET request that triggers the LTI launch.
Availability: always
com.instructure.Account.usage_metrics_enabled
Availability: always
© Instructure, Inc. Generated on Wed Nov 6 14:19:59 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated