Hi Everyone,
I was installing a LTI application to canvas. I want this LTI to appear in User navigation and Course Navigation of canvas. And when someone clicks on it, it should open in new tab. After installing this everything is fine except one. LTI app is not appearing in the new tab. I found in configuration API Importing Extended Tool Configurations - Canvas LMS REST API Documentation following code for new tab windowTarget ">_blank
Below is XML for my LTI:
<?xml version="1.0" encoding="UTF-8"?>
http://www.imsglobal.org/xsd/imslticc_v1p0"
xmlns:blti = "http://www.imsglobal.org/xsd/imsbasiclti_v1p0"
xmlns:lticm ="http://www.imsglobal.org/xsd/imslticm_v1p0"
xmlns:lticp ="http://www.imsglobal.org/xsd/imslticp_v1p0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd
http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0.xsd
http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd
http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">
https://.starfishsolutions.com/starfish-ops/support/ltiLogin.html>
Starfish
Go to Starfish
public
true
windowTarget ">_blank
Any suggestions to resolve this will be appreciated.
@zweifel your XML looks like it's missing some stuff, but if it's working...
Have you looked at this tool to help generate your XML:
Anyway, try moving your "windowTarget" into your placement options.
Using your XML it would look like this:
_blank
https://.starfishsolutions.com/starfish-ops/support/ltiLogin.html
Placing the "windowTarget" in my XML like this is working, launching my LTI tool in a new browser tab.
I hope this helps.
Hi. Does anyone know if there is there a property that will set the order of the menu item in course nav?
The windowTarget _blank property does not work with user_navigation link placement. Even if you set it in the XML, the link will still open in Canvas in-frame. I thought I should mention this because the conversation at the top of this thread implies that it is possible to open in a new tab. This may have worked in the past; if so, something changed in Canvas so it no longer functions with this particular placement.
Hey all, sometimes you need to create LTIs (external tools) on a mass scale OR make changes on a mass scale. I put together this Python script to do just that. Maybe this will help someone.
Provided 'as is', but it works pretty well.
Here's some code you can use in the javascript console to update any arbitrary object value.
// take the object that you got from the url and update it with the partial object you have function updateObjVal(object, searchObj) { //console.log(object); Object.keys(searchObj).forEach(function (k) { if (object[k] && typeof object[k] === 'object' && typeof searchObj[k] === 'object') { return updateObjVal(object[k], searchObj[k]) } else{ object[k] = searchObj[k]; } }); return object; } // get the existing json from the url function updateTool(url, updateObj){ $.ajax({ url: url, type: 'GET', success: function(data) { // console.log(data); //console.log(updateObj); var updatedObj = updateObjVal(data,updateObj); putUpdate(url,updatedObj); } }); } // send the updated json back function putUpdate(url, updatedObj){ console.log(updatedObj); var updateString = decodeURIComponent(jQuery.param( updatedObj )); $.ajax({ url: url, type: 'PUT', data: updateString, success: function(data) { console.log('Tool was updated.'); } }); } // e.g. /api/v1/courses/281820/external_tools/22087 visible from network panel in console after you look at Placements for example var targeturl="/api/v1/accounts/3371/external_tools/40870"; // the update object is any fragment of the json that you want to update var updateObj = {"course_navigation": { "default": "disabled", "text": "Some Name", "label": "Some Name" } }; updateTool( targeturl, updateObj );
Sure. I tend to forget that I have the JSON Formatter Chrome Extension that makes JSON really easy to look at and decipher, but you just need to look at the JSON and only need to include the object attribute you want to change or add, i.e.
var updateObj = {"account_navigation": { "windowTarget": "_blank" }};
sure. My email is my username @vccs.edu
Hi everyone, I am seeking some insight into how Canvas LMS handles HTTP errors and how they are reflected in the logs versus the user interface. We are currently observing the following behavior in our environment: Log-only errors: We are seeing 500 (Internal Server Error) and 503 (Service Unavailable) errors recorded in…
Hi everyone, If you write integrations against Canvas by Instructure at an institution — K-12, higher ed, corporate training, government, or anywhere in between — we'd love your feedback. We're running a short survey on the Canvas developer experience: APIs, data access, tooling, and documentation. Results will feed into…
I'm currently integrating an LTI tool and attempting to use the Activity.id.history https://canvas.instructure.com/doc/api/file.tools_variable_substitutions.html#activity-id-history variable, but I'm experiencing issues getting it to work properly. What I've Done: Added the Activity.id.history variable to my Developer…
I looked through the LTI Variable Substitutions documentation and while there are variable substitutions available for Canvas.term.name and Canvas.term.id (which is the Canvas incremented ID like "104"), I was surprised to see there was no option for Canvas.term.sisSourceId I tried testing other possible variants that may…
I'm building a tool for my institution that imports grades from another LTI tool into Canvas so instructors can automate late assignment policies not otherwise supported by Canvas. I'm trying to use the LTIv1.3 ID which is readily available on the LTI-side as a link to the student record on Canvas, but I can't find the ID…