from homebuilt to canvas trenches lessons from the developer€¦ · linking people to canvas...

62
From Homebuilt to Canvas Lessons from the Developer Trenches

Upload: others

Post on 09-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

From Homebuilt to Canvas

Lessons from the Developer Trenches

Page 2: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Who are we?

Brian PayneApplication Developer

Su WangEnterprise Software

Engineer

Page 3: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Homebuilt since 1996

Page 4: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Who are you?

Source: https://www.pexels.com/photo/city-sunny-people-street-2752/

Page 5: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Today we’ll cover

Lessons in SIS Integration

Lessons in Branding and Customization

And a bunch of API stuff!

Page 6: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Lessons in SIS Integration

Page 7: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Student Information Systems?!● Background

○ Non-vendor, very old campus SIS that is not able to directly integrate with Canvas

○ Homebuilt LMS had access to this information in prioritary format

● Problem○ Had to build our own integration to send information

into Canvas

● Constraints○ In beginning, only had data from homebuilt LMS to start

with○ Data format in homebuilt LMS very different

Page 8: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Lesson 1

Start with what you have

https://www.flickr.com/photos/sfllaw/222795669

Page 9: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Starting with what we had

● Middle man for sending data to Canvas and communicates with homebuilt LMS

● Canvas doesn’t need to know Homebuilt LMS exists

● If the homebuilt LMS goes away, we can plug GrandCentral to another data source

Page 10: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Lesson 2

Make smallImprovementsalong theway

https://commons.wikimedia.org/wiki/File:Square_Peg_in_a_Round_Hole_-_geograph.org.uk_-_1244305.jpg

Page 11: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Making small improvements

Grand Central gets an upgrade!

● Most SIS data now coming directly from SIS

● Some data still dependent on homebuilt LMS database

○ Such as Teaching Assistants to Course bindings

Page 12: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

LESSON #3

Prepare for change

Page 13: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Things change… be prepared● All SIS data now coming straight

to GrandCentral● Data is now fed into the

homebuilt LMS as needed● Reduces dependencies

Page 14: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Lessons Learned

Start with what you have

Make small improvements along the way

Dependencies are bad!

Page 15: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 16: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Branding and Customization

Page 17: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Customization

● We needed to add buttons○ Transfer to WebGrades

● Customize content○ Help dialog pop-up○ Custom footer

http://www.barnesandnoble.com/w/home-gift-office-space-box-of-flair/22645095

Page 18: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Theme Manager

JS

CSS

https://ucirvine.test.instructure.com/

Page 20: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Follow a development process

Page 21: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Structured

3 Files:

<feature>.css <feature>.js <feature>.html

Page 22: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

customizations/courses/gradebook/ add_transfer_to_webgrades_buttons.js

Page 23: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Guidelines

Page 24: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

● Development process● Structure your code

○ 3 files○ Directories match URL

● Guidelines○ Single responsibility per fileset○ Replace not tweak

Page 25: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 26: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

SHIFTINGGEARS

TO THE

APISOURCE: https://upload.wikimedia.org/wikipedia/commons/f/ff/FIAT_500L_gear_shift.jpg

Page 27: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Using the API to Link People to Canvas

https://pixabay.com/static/uploads/photo/2014/04/02/10/35/panda-303949_960_720.pnghttp://www.uvu.edu/ldp/.private_ldp/a45241/production/master/bcf0e1b7-4b10-420f-ac56-6a283ae5a71b.png

Page 28: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 29: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Linking People to Canvas

● Background:○ Canvas is opt-in so not every course was using Canvas, only those who opted

in.● Problem:

○ We needed a way for students using the homebuilt LMS to get to Canvas, without the instructor needing to remind them everyday

● Constraints:○ The link is highly visible, on a page that is probably the most popular page on

homebuilt LMS.■ About 83,333 hits per day, 3,472 per hour■ Multiply that by the average number of courses a student has (~4) =

13,888 API requests per hour

Page 30: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

It works most of the timeBut for the times it doesn’t…

Lesson 1: The Canvas API is not perfect

https://coconino.instructure.com/courses/923533

Page 31: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

But for the times it doesn’t…

Lesson 1: The Canvas API is not perfect

https://coconino.instructure.com/courses/923533

Page 32: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Build a caching layer!● Built into GrandCentral an internal API that is used to

check if a course is using Canvas before a call goes to Canvas, limits the number of Canvas API calls.

● We use the SIS_COURSE_ID: format so we don’t need to save Canvas’ internal course ids

● Ran into issues with too many calls going to GrandCentral so then built a caching system on the homebuilt system to Cache and avoid calls to GrandCentral

Lesson 1: The Canvas API is not perfect Canvas

Caching Layer

Your App

Your App

Your App

Page 33: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Build a caching layer for the caching layer● Ran into issues with too many calls going

to GrandCentral● Built a caching system on the homebuilt

system to Cache and avoid calls to GrandCentral

Lesson 2: Your API is not perfect either Canvas

Caching Layer

Your Really Busy App

Your App

Your App

Caching Layer

Page 34: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 35: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Self Provisioning

Page 36: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

● Every course is on the LMS● Course name is not customizable● Grouping of courses

Background

Page 37: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

GrandCentral

SOURCE: http://php.net/download-logos.php http://symfony.com

Page 38: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

SIS GrandCentral Canvas SIS CSV Canvas

Page 39: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Entry point from existing our LMS

Page 40: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 41: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

1. Synchronize GrandCentral with SIS2. Export to Canvas SIS CSV format3. Upload CSV to Canvas4. Log the changes

SIS Import Process

Page 42: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

● Check if the course exists● Send an email to the instructor● ~1 hour

Notify Users

Page 43: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

● New application○ GrandCentral

● User creates a course○ Opt-in, not every course is on Canvas

● SIS Import○ Canvas CSV SIS Import format

● Notify the user

Page 44: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 45: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Sandboxes in Canvas?!

Page 46: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

GIVE INSTANT GRATIFICATION

SOURCE: http://www.brokenbreadclub.com/wp-content/uploads/2015/01/Instant-Gratification.jpg

Page 47: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

NO MORE CSV

UPLOADS!

Page 48: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

GO STRAIGHT TO THE API

SOURCE: https://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Mauritius_Road_Signs_-_Warning_Sign_-_Two-way_traffic_straight.svg/2000px-Mauritius_Road_Signs_-_Warning_Sign_-_Two-way_traffic_straight.svg.png

Page 49: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 50: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 51: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 52: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 53: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted
Page 54: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Final Grades

Page 55: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Background

Page 56: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Stand-alone Application

SOURCE: http://php.net/download-logos.php http://symfony.com

Page 57: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

API Client Library

● Code reuse

● Pagination

● Error handling

● Authentication

Page 58: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

SOURCE: https://help.eee.uci.edu/canvas/instructors/#muted-assignments

Muted Assignments

● Grades displayed in gradebook don’t match the API

● Prompt the user when they mute the assignment

Page 59: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Entry point

https://.../transfer/CourseSpace-Section-S16-99125

Page 60: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Logging

● Monolog

● Graylog

● Support heavy

Page 61: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

● Separate application○ Symfony

● API client library● Muted assignments● Entry point● Logging

Page 62: From Homebuilt to Canvas Trenches Lessons from the Developer€¦ · Linking People to Canvas Background: Canvas is opt-in so not every course was using Canvas, only those who opted

Questions!

Contact us if you have more questions!Brian: [email protected]: [email protected]