Tips & Tricks: Canvas Admin

Tip 1 - quicker searches

Use Javascript to create custom searches, so you don't have to wait for /accounts/1 to load and say "There are too many courses to show"

Try it out here: Canvas_Launcher.html

Just do View Source to download, edit with your own Canvas URL, save, & try yourself.

Tip 2 - quick links to courses

Build in Canvas searches to your list of courses. For example, see the URLs listed in the CRN column of: http://quickstream.biola.edu/distancelearning/201440_Summer/Classes.html

Tip 3 - expand box with search results

User a "userscript" to edit the HTML on the fly for URLs like: https://canvas.biola.edu/accounts/1/users/1154 or like https://canvas.biola.edu/accounts/1/courses?course%5Bname%5D=CHEM105

 

Canvas Launcher

I use this multiple times a day. Rather than waiting for the familiar "there are too many courses to show" message, I just start with this little web page. I don't want to see all the courses anyway, I just want to use the search box on the right. I finally got tired of waiting for that page to load, since I search for courses multiple times a day, I made this web page that dynamically creates the right search string.

dInstead of going to "Admin" then "Courses" to find a course, use this HTML, below. Here are the steps to use it:

  1. Copy code below, Paste it in to a text file
  2. Edit the highlighted parts (in yellow) to fit your own URLs
  3. Change the term numbers (highlighted in blue) to match your terms, and change term names (green)
    1. You'll need to find the internal Canvas IDs for some current terms
    2. Go to "Admin" then "Courses" and view the source
    3. Search for "All Terms" then look at the value numbers of the lines following
  4. Save the text file to your computer, with a name that ends in HTML (like "CanvasLauncher.html")
  5. Open the file in a browser
  6. Bookmark it.

Copy and Paste this code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quick Admin Canvas Search</title>

<link rel="icon" type="image/png" href="http://icons.iconseeker.com/png/fullsize/colored-developers-button/question-green.png" />

</head>

<body OnLoad="document.form1.crn.focus();">

<h2>Quick Search Admin Canvas</h2>
<form id="form1" name="form1" method="post">
  <p>
    <input type="text" name="textfield" id="crn" onchange="make_URL()">
  CRN/Course Name
  </p>
  <p id="link1b"><a href="https://canvas.biola.edu/">LINK SPRING 2016 ONLY</a></p>
  <p id="link1c"><a href="https://canvas.biola.edu/">LINK SUMMER 2016 ONLY</a></p>
  <p id="link1d"><a href="https://canvas.biola.edu/">LINK FALL 2016 ONLY</a></p>
  <p id="link1"><a href="https://canvas.biola.edu/">LINK</a></ br>
  <p>
    <input type="text" name="textfield2" id="user" onchange="make_URL()">
  User Name</p>
  <p id="link2"><a href="https://canvas.biola.edu/">LINK_2_HERE</a></p>
</form>

<script>
function make_URL() {
    var base_crn_URL =  "https://canvas.biola.edu/accounts/1/courses?course%5Bname%5D=";
    var base_crn_URLb = "https://canvas.biola.edu/accounts/1/courses?enrollment_term_id=66&course%5Bname%5D=";
    var base_crn_URLc = "https://canvas.biola.edu/accounts/1/courses?enrollment_term_id=56&course%5Bname%5D=";
    var base_crn_URLd = "https://canvas.biola.edu/accounts/1/courses?enrollment_term_id=67&course%5Bname%5D=";
    var base_user_URL = "https://canvas.biola.edu/accounts/1/users?utf8=%E2%9C%93&user%5Bname%5D=";
    var crn  = document.getElementById("crn").value;
    var user = document.getElementById("user").value;
    var url1 = base_crn_URL + crn;
    var url1b = base_crn_URLb + crn;
    var url1c = base_crn_URLc + crn;
    var url1d = base_crn_URLd + crn;
    var url2 = base_user_URL + user;
        var addterm = "";

    document.getElementById("link1").innerHTML = '<a href="' + url1 + '">' + crn +'</a>';
    document.getElementById("link1b").innerHTML = '<a href="' + url1b + '">' + crn +' (Spring 2015 only)</a>';
    document.getElementById("link1c").innerHTML = '<a href="' + url1c + '">' + crn +' (Summer 2015 only)</a>';
    document.getElementById("link1d").innerHTML = '<a href="' + url1d + '">' + crn +' (Fall 2015 only)</a>';
    document.getElementById("link2").innerHTML = '<a href="' + url2 + '">' + url2 +'</a>';
    
    document.getElementById("link1").focus();
}
</script>

</body>
</html>