Commit 051ecfd6 authored by Kevin Lin's avatar Kevin Lin
Browse files


parent 454ef84c
#!/usr/bin/env python3
import csv, os
import canvas_api
import os.path
import readline
if __name__ == "__main__":
token = os.getenv("TOKEN")
if not token:
token = input("Enter a Canvas token ( ")
canvas = canvas_api.Canvas(token)
courses_taught = canvas.get_courses_taught()
if courses_taught is None:
print("Invalid Canvas token.")
course_id = os.getenv("COURSE_ID")
if not course_id:
course_id = input("Enter a Canvas course ID (URL slug): ")
course = canvas.get_course(course_id)
if course is None:
print("Invalid Canvas course.")
groups = course.get_groups()
for group in groups:
for student in groups[group]:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment