Package: gscdash
Gradescope-Canvas DashboardTheComputer and Information Science Department at Pennis 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 StartedThis library requires a bit of setup to ensure it crawls Gradescope and Canvas appropriately.Copyconfig.yaml.defaulttoconfig.yamlLog into Canvas, go into Account, Settings, and create aNew Access Token(give it a name like "Canvas Monitoring") and copy the key.Update theconfig.yamlas follows:Change the YAML keygradescope/gs_loginto the Gradescope email address of an account given instructor permission on the courses you want to monitor.Updategradescope/gs_pwdto the password for above account.Updatecanvas/api_keyto the new Canvas access token you created above.Setsiteto 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 crawlThen set up and run the environment:python-mvenvvenv# Create a virtual environmentchmod+xvenv/bin/activate# Make the activate script executablesourcevenv/bin/activate# Activate the virtual environmentpipinstall-rrequirements.txt# Install dependenciespythoncollect_events.py# Run the scriptAfter 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 APIsWe leverage and adapt thepyscopeAPI, 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: Thepyscopecodebase 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 eitherinstructororstudentaccess.  Instructor access has more comprehensive support, e.g., of downloading rosters.Instructor access uses the fullassignmentspage rather than the main dashboard, for comprehensiveness.  This requires changes to parsing.Newcourse.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 APIsWe leverage the Canvas LTI APIs from the U of Florida library.  Substantial layering over these libraries has been added in thepycanvaspackage, and a common API between the Canvas and Gradescope modules has been implemented asCourseApi.