cancel
Showing results for 
Search instead for 
Did you mean: 

Managing LTI Course Navigation Visibility

jperkins
Instructure
Instructure
36 31 5,608

The Story

A common frustration of teachers using Canvas at an institution is when their course navigation gets messed up by an admin. A teacher may have been teaching their courses for a couple of weeks and then all of a sudden, their institution adds a new LTI that has a course navigation launch and it messes up their course navigation in all their courses. Then their students start asking about the new LTI and the teacher has to tell them all they aren't using it and hide it in their course settings

272643_pastedImage_5.png

However, the story is worse for those instructors who don't know to customize their course navigation. Before you know it, they have a course navigation list that is so long that students have to scroll to see everything on it (see image to right). Core Canvas tools will hide themselves if they aren't being used (light grey items), but not with LTI's. So now those teachers have their students asking about each new tool and wondering why their teachers aren't using it...

Taking Control

Part 1 - Installing New LTIs

As the Canvas admin, you have the ability to decide, when an LTI is installed, whether you want it to be visible or not. Most LTI vendors want to encourage your teachers to use the tool and they enable it by default. A simple edit can help you avoid the above hassle for your teachers, while allowing you to roll the tool out to the teachers who need it.

When installing an LTI tool, the 3rd party provider will generally provide you a URL to configure the tool. If installing the tool from the apps tab in Canvas, the URL's for the installs can be found at the tool's detail page on https://www.eduappcenter.com/. These URLs should end in .xml which is the format needed to configure an LTI tool. Navigating to these URL's in your browser should take you to a page that looks like this:

<blti:title>Course Wanda Fish</blti:title>
<blti:description>This tool adds a course navigation link to a page on a fish called "Wanda"</blti:description>
<blti:extensions platform="canvas.instructure.com">
  <lticm:property name="tool_id">course_navigation</lticm:property>
  <lticm:property name="privacy_level">anonymous</lticm:property>
  <lticm:options name="course_navigation">
    <lticm:property name="text">Course Wanda Fish</lticm:property>
  </lticm:options>
</blti:extensions>

The trick is to find the <lticm:options name="course_navigation"> part of the xml file so we can customize it a little bit. We just need to add one more line after this and then we can install the LTI by pasting in XML. So here are the instructions:

  1. Copy and paste the XML into a text editor (Notepad for Windows or textEdit for Mac)
  2. Find the <lticm:options name="course_navigation"part of the code
  3. Copy and paste the following code immediately below the course navigation line
    • <lticm:property name="default">disabled</lticm:property>
  4. Follow these instructions to install the LTI via XML
  5. Enjoy the new LTI being hidden by default

Part 2 - Editing Existing LTIs

If you already have LTIs that are visible by default that you'd like to change, you can do that by using the Canvas API. There is a lot to working with the API that I will not go into on this post, but if you have a Mac you already have "cURL" installed by default so you can copy and paste the following code to update your LTI tools. If you have a PC, you can try and follow the instructions here to install cURL on Windows.

You will need to:

  1. Copy and paste the following code snippet to a text editor
    • NOTE: If the tool has other custom navigation parameters they need to be added to avoid breaking some functionality
      • View the existing parameters by viewing the response from step 4
    • curl -X PUT 'https://<canvas>/api/v1/accounts/<account_id>/external_tools/<external_tool_id>' \
             -H "Authorization: Bearer <token>" \
             -F 'course_navigation[default]=disabled'\

             -F 'course_navigation[*CUSTOM PARAMETERS*]=VALUE"

  2. Put your Institution's Canvas URL where <canvas> placeholder is (school.instructure.com or vanity URL)
  3. Put the Account/Sub-Account ID where the <account_id> placeholder is
    • The can be found by navigating to the Account/Sub-account in Canvas and looking at the url. It should be https://<canvas>/accounts/123 with number 123 being the account_id
  4. External tool ID can be found by updating the <school> and <account_id> fields in the url below and then navigating to it in your browser
    • https://<school>/api/v1/accounts/<account_id>/external_tools?per_page=100

    • You may want to download this Chrome Plugin to make the text more organized (similar plugins exist for other browsers)
    • Find the LTI tool you are looking for, the LTI should be a number. eg:

272654_pastedImage_3.png

  1. Update the <external_tool_id> placeholder with the LTI id number
  2. Generate an API Token
  3. Replace the <token> placeholder with your new API Token
  4. Copy and paste the edited code snippet into Terminal (on mac) or Command Prompt (on Windows after you install cURL)
  5. Hit Enter and watch the LTI be hidden by default in all courses. 

*Note, your teachers may have to re-enable the LTI tool in their courses to have access. So you may want to send out communication about this change before you do it.

31 Comments
vanzandt
Adventurer II

Thank you for sharing! I've known about this, but this is the clearest write up that I've seen of the process so far.

morgan_j
Explorer III

Thank you for sharing this  @jperkins ‌.  I have been searching for an answer to this dilemma for months now.  Great step-by-step directions! Smiley Happy

MLentini
Explorer

Pretty nice. Thanks for this. 

Has anyone come across some kind of guidance (best practices, outright standards, etc.) around creating and using LTIs? It'd be great if there was something to point vendors to that offered suggestions like "don't make stuff automatically visible." 

leslie_york
Explorer II

Thank you for this. Super easy instructions!

I tried this with my latest LTI install and it works perfect, but when I go back to disable it, it does not show up as an option in my list??? Have you experienced any problems with items not showing up in this list?

Thanks,

jperkins
Instructure
Instructure

Leslie,

It means that you have more than 10 external tools installed (only the first 10 show up on the list). Adding ?per_page=100 to the end of the URL to get the list of external tools should list the first 100 tools. I'll update the documentation. Thanks!

helfco
Learner

I'm trying to disable by default some previously enabled apps in a sub account.

I'm getting some errors from the terminal:

curl: (3) [globbing] bad range in column 214

curl: (3) [globbing] unmatched close brace/bracket in column 12

curl: (6) Could not resolve host: Bearer

curl: (3) [globbing] bad range in column 108

Here is my code with the school and token blacked out.

api code with token blacked out

Any ideas on how to get this to work?

We have a ridiculous amount of clutter in the navigation. I will be forever grateful if I can hide some of it.

345111_Screen Shot 2020-04-16 at 6.09.24 PM.png

jperkins
Instructure
Instructure

 @helfco ‌,

A couple of points to help you out.

  1. Make sure your  -H "Authorization: Bearer <token>" \   is all on one line
  2. The -F 'course_navigation[*CUSTOM PARAMETERS*]=VALUE" needs to be customized for each LTI you are editing... like the following example for the Instructure SCORM LTI:

curl -X PUT 'https://<domain>/api/v1/accounts/<account_id>/external_tools/123' \
-H "Authorization: Bearer 123~4567" \
-F 'course_navigation[default]=disabled'\
-F 'course_navigation[text]=SCORM'\
-F 'course_navigation[visibility]=admins'\
-F 'course_navigation[url]=https://scone-prod.us-east-1.insops.net/packages'\
-F 'course_navigation[selection_width]=800'\
-F 'course_navigation[selection_height]=400'

Hope that helps

helfco
Learner

Hi Jeremy,

Thanks for your help. I tried a lot of things and spent a long time talking to Canvas support. Even after following their specific directions and running code on both the Mac terminal and a PC it still didn't work. After finding a video that showed making Canvas API calls using the Postman software I tried giving that a shot. Lo and behold it finally worked!

What you need:

  1. Postman (free software)
  2. JSON formatter chrome plugin
  3. This command line - https://<canvas>/api/v1/accounts/<account_id>/external_tools/<external_tool_id>?course_navigation[default]=disabled

*Tech support told me to add the question mark after the external tool id.

Here's a step by step how to video for people looking to do this without a lot of experience using API calls.

qnguyen
Explorer

@helfcoI followed the steps on the video and ran it without any error messages. But it didn't work, did you have the issue too?

helfco
Learner

It's still working for me. 

This may not work if you don't have admin rights to the account.

Double-check that in Postman you have it set to Put.

Add the Query Params that match the tool course_navigation readout from the https://<school>/api/v1/accounts/<account_id>/external_tools?per_page=100 link

Make sure to add/change course_navigation[default] to disabled in postman under "Query Params"

Screen Shot 2020-09-21 at 5.39.08 PM.png

Screen Shot 2020-09-21 at 5.34.54 PM.png

Double-check that Authorization is set to "Bearer Token." The token must be valid and not have any extra spaces after it. 

Screen Shot 2020-09-21 at 5.42.05 PM.png

qnguyen
Explorer

Hi @jperkins @helfco,

Is there a way , as addition to all these codes, to disable the default menus only to a set of courses. For my schools, teacher would like to keep their past courses the same way, only changes to new courses from now on.

Thanks

helfco
Learner

I don't think so, but maybe @jperkins could weigh in.

The issue is that some of the tools are installed at the root account level (top level). If you had a subaccount with past courses you wouldn't be able to hide and display certain tools for that specific subaccount as the tools can only be controlled at the root account. You could hide/display them at the root account, but that would affect the entire institution. There may be a workaround, but I haven't heard of one.

jperkins
Instructure
Instructure

@qnguyen If you update via the API and aren't reinstalling it after tweaking the XML, a teacher that updated their course navigation items and touched that lti, that course should have an override config in place that would not be changed with the updating of the LTI. Otherwise, if teachers didn't tweak their course nav, then their navigation would probably be changed to reflect the new defaults.

I have not tested this, and would recommend that you validate before applying globally if you're concerned. However, based on my knowledge I believe that should be the expected behavior.

qnguyen
Explorer

Hi @jperkins 

When working in the Mac Terminal, after replaced with my info, and put this in, it always came back with errors. I am the admin of this Account and at the root of the Canvas account too. Thanks

Screen Shot 2020-12-02 at 2.41.53 PM.png

qnguyen
Explorer

.

helfco
Learner

@qnguyen Looks like you have an extra space before the second " after "default": "disabled"

Maybe try eliminating that space and trying again.

qnguyen
Explorer

@helfcoLooks like that was what it is, it's running for some tools now. It doesn't work for tools like People and Assignments. Is that because those tools are not External Tools

Do you know a way to work on those too?

Thanks

 

helfco
Learner

@qnguyen I don't know how to hide the Canvas defaults like People. I'd love to know how to hide them. We don't use Conferences at our college as we have Zoom. I'd like to hide Collaborations too. @jperkins you may have answered it before, but do you know if it's possible to hide the Canvas installed apps by default?

chriscas
Adventurer II

@helfco ,

For Canvas built-in menu items, I believe you'd have to change those for each course using the Tabs API.  It would be nice if there was a way to set the defaults for an entire account, but I don't think that's currently an option.

-Chris

qnguyen
Explorer

Thanks @chriscas @helfco 
Yes I have been using the Live API for manual hiding single tab for People but we would have 1,400 courses, that would be crazy 🙂 Hope someone would have a better way.

dtod
Adventurer

The following JavaScript in your theme would do it.

 

$(document).ready(function () {
    $("#section-tabs .people").parent().remove();
    $("#section-tabs .conferences").parent().remove();
});

 

 

You can make it role sensitive if you wish.

helfco
Learner

@dtodThanks, this is fantastic!

I can use this to hide Conferences, but I can't use it on Collaborations as we do have a few instructors who use that. Once you hide the tool in the custom theme it becomes inaccessible. Ideally we could disable some Canvas default tools instead of banishing them completely.

chriscas
Adventurer II

@helfco ,

I'd be very careful about that you hide with JS/CSS too.  The people tool, may be needed by both faculty and students for group setup.  Maybe nobody at your institution uses groups, but it's certainly something to think about.  Also, as has already been stated, whatever you do in the CSS/JS file cannot be changed by an individual.

I'd prefer if there was just a way to set the account defaults for menu items (hidden from students or not).  Having an option to completely disable a tool could be beneficial too, but with how interconnected things are in Canvas, I think that could be a slippery slope of unintended consequences.

-Chris

qnguyen
Explorer

@chrisHow about if we don't want to have a External tool show up in the options of Navigation but still want to keep all of its data. Without uninstalling the external app? Can we use this JS/CSS to totally hide it from all users?

chriscas
Adventurer II

One other thing with the CSS/JS trick is that while they will work on the web, mobile apps have different files and (I believe, though I haven't gone down this road) different things that would need to be done to also remove things from them too.

chriscas
Adventurer II

@qnguyen ,

If you wanted to remove an external app from a course navigation completely without uninstalling the app, you could use the API to remove the course_navigation entires.  You may also want to set the not_selectable flag so the app wouldn't show up in the external tools list in assignments.  I think this might accomplish what you're looking to do.

-Chris

jperkins
Instructure
Instructure

@helfco @qnguyen There is no default way to customize default native Canvas tabs. The API is the only way to do hide the navigation items in a course (other than UI). Conferences is a plugin on Instructure's side and we can technically disable it entirely (uninstall not hidden) that makes that navigation item disappear. 

I've seen some people get creative with Blueprint courses to update custom navigation, but there are some nuances with that (you should be really familiar with how blueprint courses work).

For automated solutions, you could configure a Canvas Live Events subscription that will send an event to an external server that could then update the course nav in near real time.

helfco
Learner

@jperkins  Thanks for all of the info. I have a similar issue with an editor button. I'm trying to take the "Flat World Knowledge" tool off of the interface, but leave it in the Apps drop-down list. It is currently in both. Please let me know if there is a way to remove the "Flat World" icon from the New RCE.

Here is the editor button code snippet.

"editor_button": {

"url": "https://www.edu-apps.org/tool_redirect?id=flat_world_knowledge",

"icon_url": "https://www.edu-apps.org/tools/flat_world_knowledge/icon.png",

"text": "Flat World Knowledge",

"selection_width": 690,"selection_height": 530,

"enabled": "true",

"label": "Flat World Knowledge"},

 

Currently unwanted Icon is next to the Apps iconCurrently unwanted Icon is next to the Apps icon

 

The app is correctly listed in the drop-down listThe app is correctly listed in the drop-down list

dtod
Adventurer

Isn't that a configuration in Account -> Settings -> Apps -> View App Configurations?

helfco
Learner

@dtod  Yes it is, thanks for letting me know!

I flick the switch off and it's no longer taking up space.

 

Screen Shot 2020-12-09 at 10.04.52 AM.png

dtod
Adventurer

Here's some generic code you can paste in your browser console to edit any external tool by replacing or adding objects to the JSON. You just need the url, which you can grab from the network panel (if you view placements for example). I left a bunch of example update objects as comments.

 

// just need a url and an update object that can have a new key or an existing one

// 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
var targeturl="/api/v1/accounts/36/external_tools/33230";

// var updateObj = {"name": "Office 365"};
// var updateObj = {"description": "The VIVA Open repository contains open educational resources (OER) adopted, adapted, and/or created by faculty and higher education professionals at Virginia institutions, most notably through VIVA Open Grants."};
// var updateObj = {"course_navigation": {
					// "enabled": "true",
					// "text": "Course Evaluations",
					// "windowTarget": "_blank",
					// "label": "Course Evaluations",
					// "default": "disabled"}
					// }; 
// remove from view but still functional, e.g. Google Assignments
/* var updateObj = {
	"course_navigation": {"enabled": "false"},
	"collaboration": {"enabled": "false"},
	"editor_button": {"enabled": "false"},
	"homework_submission": {"enabled": "false"},
	"link_selection": {"enabled": "false"},
	"assignment_selection": {"enabled": "false"},
	"not_selectable": "true"
	};  */
	
var updateObj = {"course_navigation": {
					"default": "enabled",
					"visibility": "members"}
					};
 
updateTool( targeturl, updateObj );