Skip to content

saud-learning-services/canvas-batch-change-dates

Repository files navigation

Canvas Batch Change Dates

  • name: canvas-batch-change-dates
  • ops-run-with: jupyter
  • python>=3.7
  • canvasapi>=2.0.0
  • supports universal environment 🌎

Summary

Canvas Batch Change Dates is a Python script for changing the start/end dates for courses. This script can process multiple courses at once - all courses and start/end dates can be adjusted to preference in ./data/input/start_end_courses.csv.

Inputs

  1. start_end_courses.csv: List all courses by id and enter start and end date values in respective columns

    ex. to change course (12345) to begin Jan-01-2020 and end Jan-01-2021 we'd enter:

    course_id start_date end_date
    12345 2020-01-01 2021-01-01
  2. Canvas API Token: Found in Canvas > Account > Settings > Approved Integrations (prompted by the Jupyter Notebook)

Output

  1. ./data/output/canvas-course-settings_{YYYY-MM-DD HH-MM-SS}.csv: Details status of last run including affected courses, original start/end dates, new start/end dates and any changes to enrollment restrictions
  2. ./data/completed/start_end_courses_{YYYY-MM-DD HH-MM-SS}: This is a copy of your start_end_courses.csv copied over at the end of the run and timestamped. These will automatically get stored in the ./data/complete folder.

⚠️ Important Caveats

  • The changes applied here can be difficult to reverse, so ensure all documentation (README.md and Jupyter Notebook) has been looked at and understood before running
  • The Jupyter Notebook will create a few additional prompts to get the API Token and confirm outcomes

Getting Started

Sauder Operations

Are you Sauder Operations Staff? Please go here for detailed instructions to run in Jupyter. ("The Project", or "the-project" is "canvas-batch-change-dates" or "Canvas Batch Change Dates")

General (terminal instructions)

Project uses conda to manage environment (See official conda documentation here)

First Time

  1. Ensure you have conda installed (Python 3.7 version)
  2. Clone canvas-batch-change-dates repository
  3. Import environment (once): $ conda env create -f environment.yml

Every Time

  1. Run
    1. $ conda activate canvas-batch-change-dates
    2. $ python canvas_batch_change_dates.py
    3. Follow terminal prompts