Multiple courses with the same name

As you are all aware, there is a problem with the many different instances of a course. For example, in my case I have II2202 with three different instances. See list of courses from the list of courses view (attached image maguire-courses-cropped.png).

I made some images (on linux) with:

convert -size 262x146 xc:#ff0000 red-rectangle.png
or
convert -size 262x146 xc:#000000 black-rectangle.png 

Then I added text (representing the SISID) to the image:

convert -font helvetica -fill white -pointsize 18 -draw "text 15,50 'II2202HT161'" black-rectangle.png output1b.png
convert -font helvetica -fill white -pointsize 18 -draw "text 15,50 'II2202HT162'" black-rectangle.png output2b.png
convert -font helvetica -fill white -pointsize 18 -draw "text 15,50 'II2202HT163'" black-rectangle.png output3b.png 

One could get the SISID programatically using the Canvas API and put it into $TEXT, then run:

convert -font helvetica -fill white -pointsize 18 -draw "text 15,50 '$TEXT'"  black-rectangle.png output.png 

I enabled courses at KTH (in kth.beta.instructure.com) to be able to have images in the dashboard image and enabled this in each of the courses 189, 190, and 191 - then imported the images. You can see the result in the attached image. I am not sure if this image is shown only to the user (as the nicknames are) or if all users can see this background image (however, I assume that this image is shown as the background to everyone).

Image

 

Presumably one could automate inserting these images via the API. (However, I do not know where to fine details on the API for the beta.)

Color coding of cards is not useful for myself and many others. Putting text in to the image - also has the problem that unless the image has an "alt" attribute with the text there will be a problem for blind users - since they will not be able to see the image. There is no alt field - as can be seen from part of the javascript in the page:

{"css_class":"files","icon":"icon-folder","hidden":true,"path":"\/courses\/152\/files","screenreader":"Course Files"}]},{"longName":"Research Methodology and Scientific Writing HT16 - II2202","shortName":"Research Methodology and Scientific Writing HT16","originalName":"Research Methodology and Scientific Writing HT16","courseCode":"II2202","assetString":"course_191","href":"\/courses\/191","term":null,"subtitle":"enrolled as: Teacher","id":"191","image":"https:\/\/instructure-uploads-eu.s3-eu-west-1.amazonaws.com\/account_87790000000000001\/attachments\/32690\/output.png?AWSAccessKeyId=AKIAJE5F5SJN3PUW3VNQ\u0026Expires=1472241552\u0026Signature=2ORcQHWrGYOw3JstUSCZ0GmXRUQ%3D\u0026response-content-disposition=attachment%3B%20filename%3D%22output.png%22%3B%20filename%2A%3DUTF-8%27%27output.png","imagesEnabled":true,"links":[{"css_class":"announcements","icon":"icon-announcement","hidden":true,"path":"\/courses\/191\/announcements","screenreader":"Course Announcements"}

We will have to change the course name or the course code to deal with this problem.

An alternative is that the teacher can use the nickname feature to give the course a nickname, which is not visible to the students! See the dashboard card with nicknames below:

Image

Image

The nickname for a course is documented under the User part of the API on the page:
https://canvas.instructure.com/doc/api/users.html Links to an external site.

Set course nickname:

PUT /api/v1/users/self/course_nicknames/:course_id

According to the documentation: "Set a nickname for the given course. This will replace the course's name in output of API calls you make subsequently, as well as in selected places in the Canvas web user interface."

This gives a very nice solution, while requiring no change in the name of the courses. A script should probably check if the user has established a nickname and not replace it. One can get the existing nickname with:

GET /api/v1/users/self/course_nicknames/:course_id