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

Is there a way to launch an LTI Tool within the Users account profile?

We would like to add an LTI Placement link to the right side of a users profile.  For example, if you go to canvasdomain.com/accounts/1/users/33 you'll see something like the below screenshot.  I've marked with a red box the location where we would want to add a link to launch our tool

chrisrockwell_0-1624644201657.png

 

Is there a placement for this and I'm just not seeing it?

 

Thanks!

0 Kudos
6 Replies
JamesSekcienski
Community Contributor

If you have access to the custom JavaScript file, you could do something like the following:

$(document).ready(function() {
  if (/^\/accounts\/[0-9]+\/users\/[0-9]+/.test(window.location.pathname)) {
    const newButtonDiv = document.createElement("div");
        
    const newButtonAnchor = document.createElement("a");
    newButtonAnchor.href = "https://www.google.com";
    newButtonAnchor.classList.add("btn", "button-sidebar-wide");
    const newButtonAnchorText = document.createTextNode("Link Text to Show");
    newButtonAnchor.appendChild(newButtonAnchorText);
    
    newButtonDiv.appendChild(newButtonAnchor);
    document.getElementById("right-side").appendChild(newButtonDiv);
  }
});

0 Kudos
matthew_buckett
Community Contributor

It would be really nice if Instructure supported this as an official placement on LTI tools.

chriscas
Community Champion

Hi @chrisrockwell ,

I don't believe you can get an LTI launch form the area you outlines in red in the screenshot, but you can definitely add LTI tools to the user account menu that's blurred out on the lefthand side of the same screenshot.  That button area is cool, but on smaller screens, it ends up on the very bottom of the screen instead of on the right, which is not helpful for users to find.  The user profile navigation menu seems like a better choice for that reason, and is supported currently.  Might that work for you?

-Chris

0 Kudos

Hi Chris, thank you for the information.  Unfortunately that won't work because the tool is going to show information specific to a user.  So the ideal flow is for an admin to search for a user, go to the users profile, and then have a link that launches with identifying information for the user (i.e. just the user id).  What we might do, for now, is utilize the context card or the user menu (which requires masquerading as the user first, then clicking the link).

0 Kudos

Aha, interesting!  I'll say I don't know of a way to get what you want through the Canvas LTI setup right now, though I am only a Canvas admin and not a full-fledged developer.  With most LTI launches, the parameters sent are about the current user launching the tool.  In your case, you probably need the current user info, but also will need extra info about the target user as well.  I can definitely see use cases for something like that, but I also think it would be a bigger undertaking to get Instructure to implement.  I know University of Michigan has been asking for some additional LTI placement options for quite a few years, and there hasn't been much action from Instructure yet.  I just bring that up so you know and might want to investigate alternatives if you're looking to develop a tool somewhat quickly.

-Chris