Gradescope-Canvas Dashboard
The Computer and Information Science Department at Penn is building cross-departmental monitoring tools to help with advising and student support.
Our goal is a single aggregation point for tracking student progress (and triggering alarms as appropriate) across many courses. Ultimately there will be both "pull" and "push" components (messages vs dashboard).
We pull from both the Gradescope and Canvas APIs.
Getting Started
This library requires a bit of setup to ensure it crawls Gradescope and Canvas appropriately.
- Copy
config.yaml.defaulttoconfig.yaml - Log into Canvas, go into Account, Settings, and create a New Access Token (give it a name like "Canvas Monitoring") and copy the key.
- Update the
config.yamlas follows:
- Change the YAML key
gradescope/gs_loginto the Gradescope email address of an account given instructor permission on the courses you want to monitor. - Update
gradescope/gs_pwdto the password for above account. - Update
canvas/api_keyto the new Canvas access token you created above. - Set
siteto your Canvas host URL (e.g.,https://canvas.upenn.edufor Penn)
Optionally you'll want to restrict the courses to a subset of the available ones:
canvas/course_ids: a list of specific Canvas course IDs to crawl, rather than all that are currently active. Each should be on a separate line indented with a leading dashgradescope/semesters: a list of the Gradescope "years" / semesters to crawl
Then set up and run the environment:
python -m venv venv # Create a virtual environment
chmod +x venv/bin/activate # Make the activate script executable
source venv/bin/activate # Activate the virtual environment
pip install -r requirements.txt # Install dependencies
python collect_events.py # Run the script
After the script runs, there should be a series of files in the current directory:
gs_courses.csv/canvas_courses.csv: list of courses to which we have accessgs_assignments.csv/canvas_assignments.csv: list of student assignments (quizzes, exams, HWs)gs_students.csv/canvas_students.csv: list of enrolled students by course_idgs_extensions.csv/canvas_student_summaries.csv: list of student info including late days, extensions, etc.gs_submissions.csv/canvas_submissions.csv: list of homework submissions including timestamps, whether late, etc.
Alternatively, you can use the libraries directly:
import pandas as pd
from gscdash.pycanvas.pycanvas import CanvasStatus
from gscdash.pyscope.pyscope import GradescopeStatus
# Restrict to these course IDs
canvas_course_list = []
# Restrict to these semesters
gradescope_sem_list = []
canvas = CanvasStatus(canvas_url, canvas_api_key, canvas_course_list)
canvas_courses, all_students, all_assignments, all_submissions, all_student_summaries = canvas.get_course_info()
gs = GradescopeStatus(email, pwd, gradescope_sem_list)
gs_courses, gs_students, gs_assignments, gs_submissions, gs_extensions = gs.get_course_info()
Potential To-Dos:
- Add download from Gradescope Review Similarity for each assignment?
- Generate ics for all deadlines?
Gradescope APIs
We leverage and adapt the pyscope API, which we have updated to 2023 Gradescope with extensions. Gradescope does not really have an external API, but through some clever work by prior authors, HTML crawling is used to pull the important data and wrap it in objects.
Credit: The pyscope codebase is derived from Sagar Reddy Patil's Gradescope iCalendar Converter, sagarredypatil/gradescope-ics, which also leverages the original Gradescope codebase from Anton Pozharski, apozharski/gradescope-api. This overall package inherits the AGPL license as a result of this. However, new subsystems use the standard Apache 2 license.
Major changes:
- Support for extracting courses for which we have either instructor or student access. Instructor access has more comprehensive support, e.g., of downloading rosters.
- Instructor access uses the full assignments page rather than the main dashboard, for comprehensiveness. This requires changes to parsing.
- New
course.get_roster()API call. - Roster extraction update to match the 2023 HTML formatting of Gradescope.
- Homework assignment extraction now pulls the assignment ID.
- Extraction of homework submissions.
- Extraction of homework extensions.
Canvas APIs
We leverage the Canvas LTI APIs from the U of Florida library. Substantial layering over these libraries has been added in the pycanvas package, and a common API between the Canvas and Gradescope modules has been implemented as CourseApi.
Metadata
Release files for gscdash 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gscdash-0.0.4.tar.gz | 30.0 kB | Without provenance | Details for gscdash-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gscdash-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for gscdash-0.0.4-py3-none-any.whl |
Total release size: 62.0 kB
Release files / gscdash-0.0.4.tar.gz
| Download URL | gscdash-0.0.4.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c15901ca6e35636dfbaac1466bdff4cef333f7dedadcada80fe3afda5952b040
|
|
BLAKE2b-256 checksum How to use checksums |
cd07d52941b6ea97526ad9950167c20417a0236e930d004edd11c65c48f39440
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / gscdash-0.0.4-py3-none-any.whl
| Download URL | gscdash-0.0.4-py3-none-any.whl |
|---|---|
| Size | 32.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f7598e40e67dbf131198419417a68a036a02ee58461bd20fea188ec7d2eeedf
|
|
BLAKE2b-256 checksum How to use checksums |
fda7fde44a6ac56475e7aa49cb5a76039834d50e31d545ac0b4d850cc6c341f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for gscdash 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.