cgiuffr / autocanvas

Automate simple Canvas tasks related to course enrollments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

autocanvas

Automate simple Canvas tasks related to course enrollments.

Dependencies:

Relevant API documentation:

To create a Canvas API key:

  • Go to Canvas --> Profile --> Settings.
  • Click on 'Approved integrations' --> 'New access token'.

Usage (simple mode):

$ cp params_default.py params.py # and edit params.py
$ ./autocanvas.py

Example workflow to delete unenrolled students from a course:

  • Create a Canvas API key as described above.
  • Create a params.py file from params_default.py file.
  • Edit params.py as follows:
    • API_KEY: Paste your newly created API key (access token).
    • API_URL: Edit the base URL if necessary.
    • course: Enter your course ID.
    • user_file: Enter the name of the file with all the enrolled students.
  • Run ./autocanvas.py to verify the list of to-be-deleted unenrolled ones.
  • Edit params.py again as follows:
    • action: Enter delete (Warning: this action cannot be undone).
  • Run ./autocanvas.py again to actually delete unenrolled students.

Usage (batch mode, note this requires admin rights):

$ cp params_default.py params.py # and edit params.py
$ ./autocanvas-batch.py

Example workflow to refresh all the students of a course:

  • Create a Canvas API key as described above.
  • Create a params.py file from params_default.py file.
  • Edit params.py as follows:
    • API_KEY: Paste your newly created API key (access token).
    • API_URL: Edit the base URL if necessary.
    • user_file: Enter the name of the file with all the <course,student-number> pairs.
  • Run ./autocanvas-batch.py to verify the list of to-be-deleted/added students.
  • Edit params.py again as follows:
    • action: Enter new-active (Warning: this action cannot be undone).
  • Run ./autocanvas-batch.py again to actually refresh the course.

About

Automate simple Canvas tasks related to course enrollments.

License:Apache License 2.0


Languages

Language:Python 100.0%