How do I change the optional tool limits set during the DesignPLUS install?

In order to change the optional tool limits for DesignPLUS, you'll need to edit the JavaScript file in the Canvas theme.  To do this, follow the instructions below.

  1. In your Canvas admin view, click on Themes in the menu.
  2. Select the current theme.
  3. Go to the Upload tab in the top left of the screen.
  4. Find the JavaScript file and download it by right clicking the View File link and choosing Save Link As...
  5. Open the JavaScript file with any code editing software you like.  For very basic users, use Notepad (Windows) or TextEdit (Mac).
  6. Update the options in the file that you want to change.  See code sample below for options.
  7. After you're done editing, save the file.
  8. Return to the Canvas theme and next to the JavaScript file, click on the Select button, find your updated .js file, and upload it.
    1. NOTE: You do not need to update the Mobile app JavaScript file.
  9. Click on the Save Theme button in the bottom right corner, then click on the Apply Theme button in the bottom left.

Below is what a typical Design Tools configuration looks like.  The highlighted areas show where you can set the value to either true or false.  A true value will limit the tools, a false value will not.

////////////////////////////////////////////////////
// DESIGN TOOLS CONFIG //
////////////////////////////////////////////////////
// Copyright (C) 2017 Utah State University
var DT_variables = {
iframeID: '',
// Path to the hosted USU Design Tools
path: 'https://designtools.ciditools.com/',
templateCourse: '6786',
// OPTIONAL: Button will be hidden from view until launched using shortcut keys
hideButton: false,
     // OPTIONAL: Limit by course format
     limitByFormat: false, // Change to true to limit by format
     // adjust the formats as needed. Format must be set for the course and in this array for tools to load
formatArray: [
'online',
'on-campus',
'blended'
],
// OPTIONAL: Limit tools loading by users role
limitByRole: false, // set to true to limit to roles in the roleArray
// adjust roles as needed
roleArray: [
'student',
'teacher',
'admin'
],
// OPTIONAL: Limit tools to an array of Canvas user IDs
limitByUser: false, // Change to true to limit by user
// add users to array (Canvas user ID not SIS user ID)
userArray: [
'2',
],
// OPTIONAL: Transform people page in a course to show student cards
showStudentCards: true,
};

// Run the necessary code when a page loads
$(document).ready(function () {
'use strict';
// This runs code that looks at each page and determines what controls to create
$.getScript(DT_variables.path + 'js/master_controls.js', function () {
console.log('master_controls.js loaded');
});
});
////////////////////////////////////////////////////
// END DESIGN TOOLS CONFIG //
////////////////////////////////////////////////////

User ID Update

If your institution has limited the tools by User ID in the JavaScript configuration, it may become necessary to update the list of IDs that have access to the tools.  In this case, find the userArray in the JavaScript file and update the list of values inside the array.  

Make sure to enter the users' Canvas ID (numeric value) and not the SIS user ID (login/email).  Learn more in this article: What is the Canvas User ID?


Follow the instruction above to save this change and upload it to the Canvas theme.  Below is an example of what a userArray might look like:

// OPTIONAL: Limit tools to an array of Canvas user IDs
limitByUser: true, // Change to true to limit by user
// add users to array (Canvas user ID not SIS user ID)
userArray: [
'256', // John Doe
            '184', // Jane Doe
'199', // John Doe Jr.
],