Skip to content

Instantly share code, notes, and snippets.

Robert Carroll robert-carroll

  • Las Vegas, NV
View GitHub Profile
View nav-icon.js
var addMenuButton = function(title, url, img) {
var id_title = 'global_nav_custom_' + title.replace(/\s/, '_').toLowerCase();
var button = $('<li class="custom-menu ic-app-header__menu-list-item" id="'+id_title+'_menu">' +
'<a id="'+id_title+'" href="'+url+'" class="ic-app-header__menu-list-link">' +
'<div class="menu-item-icon-container" aria-hidden="true"><span class="menu-item__badge" style="display: none">'+title+'</span><span class="svg-holder"></span></div>' +
'<div class="menu-item__text">' + title + '</div>' +
'</a>' +
'</li>');
@robert-carroll
robert-carroll / courselinks-termsort.js
Last active Sep 28, 2018
course links with term select sort
View courselinks-termsort.js
@robert-carroll
robert-carroll / parse-events.rb
Last active Oct 3, 2018
live events ims format to flat
View parse-events.rb
# https://github.com/instructure/canvas-lms/blob/master/lib/canvas/live_events.rb#L19
# https://canvas.instructure.com/doc/api/file.live_events.html
# this file parses the JSON data
# making best attempts to map JSON data to documented fields
class ParseEvents
# mimic this, https://github.com/instructure/switchman/blob/master/app/models/switchman/shard_internal.rb
def local_id(any_id)
any_id.to_i % 10_000_000_000_000
@robert-carroll
robert-carroll / assignment-groups.sql
Created Aug 2, 2018
canvas-data/mssql - assignment groups of master courses
View assignment-groups.sql
SELECT
canvas_course_id,
course_name,
ISNULL(formative,0) formative,
ISNULL(summative,0) summative,
ISNULL(other,0) other
FROM (
SELECT
canvas_course_id,
course_name,
@robert-carroll
robert-carroll / icon-bank.svg
Last active Jul 10, 2018
inst-ui-icon-bank-svg
View icon-bank.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View starter-tray-js
/**
// @name Global Nav - Custom Tray
// @namespace https://github.com/robert-carroll/ccsd-canvas
// @author Robert Carroll <carror@nv.ccsd.net>
//
// Pin by [Gregor Cresnar](https://thenounproject.com/grega.cresnar/) from [The Noun Project]
// https://creativecommons.org/licenses/by/3.0/
**/
$(document).ready(function() {
///* set tray title, icon, links and footer here *///
You can’t perform that action at this time.