Integrate Praxis AI with Canvas LMS
Step 1. Download SDK
Step 2. Edit Canvas Theme and Upload SDK
Navigate to Admin Settings
Select Themes
Open Theme Editor
Upload Tab
pria-sdk-canvas.js
from your download
INSTITUTION_ID
to undefined
INSTITUTION_ID
field blank (e.g. “”) like this:
INSTITUTION_ID
to the instance public ID given to you by Praxis , ex: 5fd6d7a4-4cc7-4e04-8473-e89aef4e…
INSTITUTION_ID
field is unique to your instance of Pria.
Keep this ID confidential.INSTITUTION_ICON_URL
as undefined
DISPLAY_OPTIONS
variable:
Option | Default / Allowed Values | Description | Notes |
---|---|---|---|
fullScreen | true | false (default) | Display Pria in fullscreen. | |
openOnLoad | true | false (default) | Open Pria immediately on load or keep closed until user clicks the Pria button. | |
buttonWidth | CSS width value | '80px' (default) | Size of the Pria button. | See CSS width examples. |
buttonPosition | CSS position value | 'fixed' (default) | Position type of the button. Default is fixed , but can be relative or absolute . | |
buttonPositionBottom | CSS bottom value | '20px' | Distance from the bottom edge of the screen (only applies to fixed or absolute position). | See CSS bottom examples. Example: calc(100% - 120px) to place icon at top. |
buttonPositionRight | CSS right value | '20px' | Distance from the right edge of the screen (only applies to fixed or absolute position). | See CSS right examples. Example: calc(100% - 120px) to place icon at top. |
buttonNoBounce | true (default) | false | Whether the button bounces when displayed. | Default: no bounce. |
priaContainerId | Element ID | '' (BODY by default) | Parent element for Pria UI iFrame. | Empty value appends to <body> . |
buttonContainerId | Element ID | '' (BODY by default) | Parent element for the Pria button. | Empty value appends to <body> . |
allowPop | true | false (default) | Option to open Pria in a new tab. | Deprecated due to third-party cookie restrictions. |
loadPria()
function.
loadPria()
function is placed when the student or teacher is on a course page.
This determination is done using a regular expression with the function onPage()
like below:
INSTITUTION_PUBLIC_ID
to undefined.
79875
, 72856
, or 55621
, then we set the INSTITUTION_ID
to a specific instance, and customize the icon to our own URL
INSTITUION_ID
to empty string like this:
hasAnyRole()
isUser()
isInUsers()
isStudent()
isCourse()
isInCourses()
onElementRendered()
ENV
is available to any pages rendered in the Application.
When injected as a Theme, the Instance has access to the variable and uses it to determine who is the current user, or what course is he/she launching.
To review the properties made available by the ENV
variable, open a course page in Canvas, and launch the Developer Mode (F12 on Windows - developer tools on Mac) then in the Console window, type ENV then press the ENTER key.
Here is an example of such variable:
current_user
property
current_user_roles
property:
current_context
property:
Upload JavaScript SDK
Preview Changes
Confirm Praxis Loads
INSTITUTION_ID
field as an empty string (by default) in the SDK file inserted in the theme.The teacher (or any administrator) is then expected to Create an instance of Pria (a.k.a. Instance), or connect to an existing one for every course the teacher wants Pria in.