This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/** | |
* Objeect Oriented implementation of an iterable to handle paginated requests | |
* | |
* @param {string} requestMethod HTTP method for the request | |
* @param {string} firstUrl Endpoint for the request | |
* | |
*/ | |
class PaginatedList { | |
constructor(requestMethod, firstUrl) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var ref = new Firebase("https://nodes-commenting.firebaseio.com/"), | |
postRef = ref.child(window.location.pathname); | |
postRef.on("child_added", function(snapshot) { | |
var newPost = snapshot.val(); | |
if(newPost.moderated) { | |
$("#comment-list").prepend('<div class="comment">' + | |
'<h4>' + escapeHtml(newPost.name) + '</h4>' + | |
'<div class="profile-image"><img src="http://www.gravatar.com/avatar/' + escapeHtml(newPost.md5Email) + '?s=100&d=retro"/></div> ' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fixtures provide a conventient way to define expected data strucures from API calls. This | |
* works based on JSON keys and gives a flexible, namespaced access for quickly making Mocks. | |
*/ | |
const fixtures = (function() { | |
const init = function() { | |
return this; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script will fetch Outcome ratings from assignment rubrics and return a list of dicts. | |
Requires the use of UCF Open's canvasapi library. Install with `pip install canvasapi`. | |
Replace PROD_URL and PROD_KEY with your own Canvas URL and API key. | |
""" | |
from canvasapi import Canvas | |
from config import PROD_KEY, PROD_URL | |
from pprint import pprint | |
def build_assignment_rubric_results(canvas, course_id, assignment_id): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import re | |
import requests | |
import concurrent.futures | |
import time | |
# pip install tqdm for progress monitoring | |
from tqdm import tqdm | |
from functools import partial | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy this script into the feedback spreadsheet TEMPLATE | |
/************************ OnOpen *******************************/ | |
function onOpen(e) { | |
var ui = SpreadsheetApp.getUi().createMenu("Shortlink") | |
.addItem("Show URL and QR code", "showQrAndLink") | |
.addToUi() | |
} | |
/************************ GLOBALS *******************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from canvasapi import Canvas # pip install canvasapi | |
import csv | |
import concurrent.futures | |
from functools import partial | |
KEY = '' # Your Canvas API key | |
URL = '' # Your Canvas API URL | |
COURSE = '' # Your course ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The rest of the backend code. | |
// postTweet.gs and getThumbnails.gs can be appended to this file. | |
// When combined, click Publish > Deploy as web app | |
// You can then test by visiting your app page. | |
var KEY = "YOUR_APP_KEY"; | |
var SECRET = "YOUR_APP_SECRET"; | |
// Initialize Twitter login | |
// See https://mashe.hawksey.info/2014/10/twtrservice-a-twitter-api-client-for-google-apps-script/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********** SETUP ***************/ | |
// Store two global variables with columns to use as references. | |
// These should be zero-based because they're used in a loop. | |
var docIdCol = 0 // Int of col to check for a document ID | |
var emailCol = 0 // Int of col with submitter email address | |
/********** END SETUP **************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Student LMG Viewer | |
// @namespace https://gist.github.com/bennettscience/cf6a0ec2526844aa672bd3850dee85ee | |
// @description Show calculated Outcome socres for students in Canvas | |
// @author Brian Bennett | |
// @match https://*.instructure.com/courses/*/grades/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; |