500 likes | 748 Views
Provisioning Canvas: Manual, Batch, or Transactional?. Senior Systems Programmer Center for Distributed Learning University of Central Florida. Brent Shaw bs@ucf.edu. About the University of Central Florida. 59,770 students (Spring 2014) 1,965 faculty & adjuncts 12 regional campuses
E N D
Provisioning Canvas:Manual,Batch,or Transactional? Senior Systems Programmer Center for Distributed Learning University of Central Florida Brent Shaw bs@ucf.edu
About the University of Central Florida • 59,770 students (Spring 2014) • 1,965 faculty & adjuncts • 12 regional campuses • 2013/4 budget: $1.45 B • 180 buildings on 1,415 acres • Classes started in October, 1968 Provisioning Canvas
About Me • Yes, bs@ucf.edu really is my email address • UCF’s first LMS administrator in 1998 (when WebCT was in Beta for the first time) • Worked for WebCT Inc. for a year • I’m a lazy programmer. • This is boring. Please laugh. Provisioning Canvas
Words of Wisdom “I can build one of the best networks in the world… “Until people want to start using it.” -Anonymous Network Architecture Instructor Provisioning Canvas
Canvas is Awesome!But do we HEROs really haveto add actual users?!? Senior Systems Programmer Center for Distributed Learning University of Central Florida Brent Shaw bs@ucf.edu
The Provisioning Triad ™ Which (1) COURSE / SECTION is being taught by which (2) INSTRUCTOR to which (3) STUDENTS ? If you don’t have that information at a minimum, this presentation won’t help (much). More information is better! Provisioning Canvas
The SIS has The Triad ™ • Colleges / Departments Build Class Schedules • Create Classes and Sections (1) • Assign Instructors (2) • Students Enroll in Classes (3) • Implicit in the Triad are users. • “Triad” is cooler than “Quartet” Provisioning Canvas
The SIS has More Information • Start / Stop dates of classes • Terms • Crosslisting • TAs / Observers, other roles • Changes in information !!! • Adds / Drops • Courses • Enrollments Provisioning Canvas
Provisioning: SIS Information LMS • Information has to get from the SIS to the LMS: • Manually • Batches • Transactions • Some combination of manual, batches and transactions Provisioning Canvas
Manual • Often involves someone typing directly into Canvas • Complete Free for All! • Allow people to create their own user accounts • Allow users to create their own classes / sect. • Allow users to self enroll • Allow instructors to enroll students • Administrator manually matching your SIS Provisioning Canvas
Manual Pros Cons Wild Wild West Little control Auditing / Reporting is difficult ($$$) Difficult to capture changes in data Not scalable • Hands off for administrators • Valuable for sub-accounts • Allows for flexibility • Personnel training not contained in SIS • Great for “one offs” • Pragmatic solutions • Gets the job done Provisioning Canvas
Batches • Chunks of data processed all at once • As little as one record • As much as 249,000 users • In Canvas this means a CSV file • CSVs can be uploaded into Canvas 2 ways • Manually through the GUI • Programmatically through the APIs • CSVs Allows for snapshots and incrementals Provisioning Canvas
Batches Pros Cons Not “immediate” CSV files will be queued in the order they are received Not granular Catching errors is more difficult • CSVs are a simple format • Easy to export data from SIS to a CSV file • Can be run multiple times a day • Can be uploaded manually or with APIs • Greatest return on investment Provisioning Canvas
Transactions • Triggered by a change in the SIS • Could be a new item • Course be a change • A single “piece” of information is sent to the LMS immediately using the API • Success or failure is immediately known Provisioning Canvas
Transactions Pros Cons Potentially lots of API call need to be made in a short period of time 3k / hour limit Harder to program Must catch errors Failures won’t be fixed in a snapshot • Immediacy • Allows for better error handling Provisioning Canvas
Technical Details for Provisioning Implementation • Planning • SISIDs • Canvas CSV Files • Batches • Transactions • A word about pagination • APIs for batches / CSV uploads • APIs for transactions (reference only) Provisioning Canvas
Planning for Your Provisioning • Time spent planning is never wasted • Get to know your data • What are the quirks in the data? • Which do you have to account for? • Which can you ignore? • Trick question! You shouldn’t ignore any of the quirks • Get to know your data source • Who will get you The Triad? • How often is data available? Provisioning Canvas
Planning for Your Provisioning • What do users expect? • Students want it now!!! • Transactions for enrollments? • Instructors want it correctly. • Registrars want it officially. • SIS administrators want it conveniently. Provisioning Canvas
SISIDs: Choose Wisely • SIDID = Student Information System ID • Unique identifier • Automatically generated by your SIS • SISID is the link between objects in your LMS and your SIS • Lots of things have SISIDs in an LMS: • Users • Courses and Sections • Terms Provisioning Canvas
SISIDs: Examples • Our User SISID looks like this: 0111614 • Our Course SISID looks like this: 1470-UCF01-GEO-1200-SEC0001 • Every section gets a course and section • The section SIS ID is: 1470-UCF01-GEO-1200-SEC0001 • The course SIS ID is: 1470-UCF01-GEO-1200-SEC0001 Provisioning Canvas
Canvas CSV Files • In theory CSV files are standard • In practice CSV files are different • https://canvas.instructure.com/doc/api/file.sis_csv.html Provisioning Canvas
Canvas CSV Files Things that can be added to Canvas using CSV files That order is important Not all of them have to be created The Triad would be: 0. Sub-accounts (manually created?) Users Courses (Sections) Enrollments • Users • Sub-accounts • Groups • Group memberships • Terms • Courses • Sections • Enrollments • Crosslisting Provisioning Canvas
A Word About Pagination • For API calls that return large data sets Canvas returns chunks of data • Ex: An API call with1,000 results would take 10 API calls returning chunks of 100 • Create a wrapper to automatically handle pagination of API calls https://canvas.instructure.com/doc/api/file.pagination.html Provisioning Canvas
APIs for Batches - Upload • Upload a single CSV -- OR -- • Upload a ZIP file containing several CSV files https://canvas.instructure.com/doc/api/sis_imports.html#method.sis_imports_api.create Provisioning Canvas
APIs for Batches - Upload Request (POST with Attachment) POST https://webcourses2c.beta.instructure.com/api/v1/accounts/89347/sis_imports Provisioning Canvas
POST https://webcourses2c.beta.instructure.com/api/v1/accounts/89347/sis_imports Authorization: Bearer <REALLY_POWERFUL_TOKEN_GOES_HERE> Content-Length: 58095 Content-Type: multipart/form-data; boundary=xYzZY --xYzZY Content-Disposition: form-data; name="import_type" instructure_csv --xYzZY Content-Disposition: form-data; name="attachment"; filename="2014-06-16-13:19:12-2014-06-16-12:00:04-CANVAS_MEMBER.CSV" Content-Type: text/csv course_id,user_id,role,section_id,status 1515-UCF01-BMS-6001-SEC0001,0111614,teacher,1515-UCF01-BMS-6001-SEC0001,active Provisioning Canvas
APIs for Batches - Upload • Response (JSON) • Returns a creation object { 'ended_at' => undef, 'created_at' => '2014-06-16T17:32:13Z', 'progress' => 0, 'updated_at' => '2014-06-16T17:32:13Z', 'data' => {'import_type' => 'instructure_csv' }, 'id' => 5167983, 'workflow_state' => 'created' }; Provisioning Canvas
A Word About batch_mode • The “batch_mode” parameter is available for SIS CSV file uploads. • Don’t use it unless you know exactly what it does. (It overwrites everything.) • Make sure you test it on BETA / TEST. • More information about batch_mode: • http://guides.instructure.com/m/4214/l/80122-what-are-sis-imports Provisioning Canvas
A Word About Stickiness • Stickiness in Canvas is the idea that changes to information made through the GUI will not be overwritten by SIS imports. • Useful for manual tweaks via CSV file • Not all fields respect stickiness Provisioning Canvas
A Word About Stickiness Not all fields are “Sticky” – These are the Sticky fields Section course_id name start_at end_at restrict_enrollments_to_section_dates Enrollment start_at end_at Term name start_at end_at Group name User name sortable_name short_name Pseudonym (Login) unique_id (login_id, username...) Account name Abstract_course Name short_name enrollment_term_id Course name course_code start_at conclude_at restrict_enrollments_to_course_dates enrollment_term_id workflow_state Provisioning Canvas
APIs for Batches - Status • Now that you’ve uploaded it, you’ll want to see if it finishes https://canvas.instructure.com/doc/api/sis_imports.html#method.sis_imports_api.show Provisioning Canvas
APIs for Batches - Status • Request (GET) • Use the SIS Upload ID from the status object returned from the file upload GET https://webcourses2c.beta.instructure.com/api/v1/accounts/89347/sis_imports/5167983 Provisioning Canvas
APIs for Batches - Status • Response (JSON)– In Progress { "created_at": "2014-06-16T18:06:07Z", "ended_at": null, "updated_at": "2014-06-16T18:06:08Z", "progress": 1, "id": 5167983, "workflow_state": "importing", "data": { "import_type": "instructure_csv", "supplied_batches": ["user"] } } Provisioning Canvas
APIs for Batches - Status COMPLETED {"created_at": "2014-06-16T07:00:11Z", "ended_at": "2014-06-16T10:31:18Z", "updated_at": "2014-06-16T10:31:18Z", "progress": 100, "id": 5167983, "workflow_state": "imported_with_messages", "data": { "import_type": "instructure_csv", "supplied_batches": ["user"], "counts": {"accounts": 0, "terms": 0, "abstract_courses": 0, "courses": 0, "sections": 0, "xlists": 0, "users": 249999,"enrollments": 0, "groups": 0, "group_memberships": 0, "grade_publishing_results": 0}}, "processing_warnings": [ ["attachment_3703675020140616-22926-1h0xf.CSV", "user 3600989 has already claimed 3619372's requested login information, skipping"] ]} Provisioning Canvas
APIs for Batches - Show All • Canvas will tell you about all your SIS imports https://canvas.instructure.com/doc/api/sis_imports.html#method.sis_imports_api.index Provisioning Canvas
APIs for Batches - Show All • Request (GET) GET https://webcourses2c.beta.instructure.com/api/v1/accounts/89347/sis_imports Provisioning Canvas
APIs for Batches - Show All • Response (JSON) • List of JSON objects • In Progress • Completed Provisioning Canvas
APIs for Transactions • Far too many to give examples • I’ll list the APIs that could be used for provisioning Canvas Provisioning Canvas
APIs for Transactions - Users • Create a user • Update user settings • Edit a user • Delete a user • Merge user into another user https://canvas.instructure.com/doc/api/users.html Provisioning Canvas
APIs for Transactions - Sub-accounts • List accounts • Get a single (sub)account • Get the sub-accounts of an account • Update a (sub)account • Create a new sub-account https://canvas.instructure.com/doc/api/accounts.html Provisioning Canvas
APIs for Transactions -Groups • Get a single group • Create a group • Edit a group • Delete a group • Invite others to a group https://canvas.instructure.com/doc/api/groups.html Provisioning Canvas
APIs for Transactions -Terms • List Enrollment Terms (That’s all- can’t create or edit with APIs) https://canvas.instructure.com/doc/api/enrollment_terms.html Provisioning Canvas
APIs for Transactions -Courses • Create a new course • Conclude a course • Get course settings • Update course settings • Get a single course • Update a course • Update courses https://canvas.instructure.com/doc/api/courses.html Provisioning Canvas
APIs for Transactions -Sections • List course sections • Create course section • Cross-list a Section • De-cross-list a Section • Edit a section • Get section information • Delete a section https://canvas.instructure.com/doc/api/sections.html Provisioning Canvas
APIs for Transactions -Enrollments • Enroll a user • Conclude an enrollment • Deleted Active • Active Concluded • Concluded Deleted • Active Deleted https://canvas.instructure.com/doc/api/enrollments.html Provisioning Canvas
APIs for Transactions -Crosslisting • Cross-list a Section • De-cross-list a Section https://canvas.instructure.com/doc/api/sections.html Provisioning Canvas
Combination of Techniques • Manual: • Handle things not in the SIS (Training…) • Manage some sub-accounts • Allows for delegation of responsibility • Crosslisting • Batch: • Users: creation & changes - Once a day • Course / Section Creation - Multiple times a day • Transaction: • Enrollments Provisioning Canvas
Questions?Comments?Suggestions? Brent Shaw bs@ucf.edu
If you liked it … Please tell people you saw Brent from the University of Central Florida Provisioning Canvas
If you didn’t like it … Please tell people you saw someone’s random Central Florida vacation pictures… Provisioning Canvas