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
// Copyright 2017 Brian E. Bennett | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
// and associated documentation files (the "Software"), to deal in the Software without restriction, | |
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
// subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
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
# other flask stuff - this is just an example | |
# The actual application uses blueprints to keep routes organized. | |
from flask import Blueprint, Flask | |
app = Flask(__name__) | |
course_blueprint = Blueprint('courses', __name__) | |
app.register_blueprint(course_blueprint) | |
# Get the form to edit the event |
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
<script> | |
/* | |
This is a generic wrapper component for any forms. Pass in an array of {field} objets to be | |
rendered into the form. | |
Submissions are all converted into JSON before being passed back to the parent for handling. This allows the | |
parent compoenent to determine the API route the form is submitting to rather than adding those options here. | |
*/ | |
import Input from './formFields/Input.svelte'; | |
import Select from './formFields/Select.svelte'; |
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
/** | |
* 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
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
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
/*********** 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'; |
NewerOlder