Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
canvas-grade-uploader
Advanced tools
Readme
A simple tool to handle grade uploading to Canvas, a learning management system.
The grade uploader works well as a command line tool. If you're using it this way be sure to use the -g
option:
npm install -g canvas-grade-uploader
There are two use cases:
Command line tool:
grade-uploader [leave blank for short help]
usage: grade-uploader [-h] [-v] -c COURSE_ID -a ASSIGNMENT_ID -f FILE [-u URL] -t
TOKEN [-uid {"",sis_login_id,sis_user_id}]
grade-uploader -t [token] -c 1268501 -a 7148451 -f ~/Desktop/Midterm_scores.csv
CANVAS_TOKEN
in your environment. This will be used if no -t
option is provided.As a module:
var postGrades = require('canvas-grade-uploader');
postGrades(options, data, callback); // See below for options
NOTE The module interface is currently a work in progress. Breaking changes to this interface will be semver-minor, at least until it's fully stable.
The grade uploader uploads grades to a specific Canvas assignment. To do this a few details are required. The command line help will walk you through most of them.
Canvas assignment and course IDs are easily obtained from the URL of the assignments page.
For example:
https://bcourses.berkeley.edu/courses/1268501/assignments/7148451
https://bcourses.berkeley.edu/
1268501
7148451
Canvas authenticates users with Oauth Tokens. You can generate a token for yourself by visiting your personal settings page. There is Canvas documentation about generating your own token.
The short version is: Visit this page.
https:/<canvas-instance>/profile/settings
This tool was built to speed up working with Gradescope
The CSV file requires the following values:
Currently, there are a couple default values which as "Berkeley-specific". If this tool gets enough use, I'll gladly change them…
-u
defaults to: https://bcourses.berkeley.edu
-sid
defaults to: sis_user_id
. This parameter controls how Canvas interprets user IDs. See this.(In the future, I'd consider supporting some means of having user-default parameters, so please submit a PR if you'd like!)
Using this as a module requires 3 parameters:
options
: A JS object, with keys that mirror the command line arguments. Note: in this form, the only defaults that are applied are the CSV column names. The file parameter is not required.
{
course_id: '1268501',
assignment_id: '7148451',
url: 'https://bcourses.berkeley.edu/',
token: '<token>',
user_id_format: 'sis_user_id'
}
data
: This is the CSV data, as a string.callback
: This is called with a string, updating the progress of uploading grades. Note that it will be called quite a few times in the process uploading grades.
(err, resp)
very soon.http://<domain>.beta.instructure.com/
FAQs
Upload a CSV file of grades to Canvas
The npm package canvas-grade-uploader receives a total of 8 weekly downloads. As such, canvas-grade-uploader popularity was classified as not popular.
We found that canvas-grade-uploader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.