Skip to main content

Canvas Integration Plugin

A django app plugin to add Canvas integration to Open edX.

NOTE — edx-platform cherry-pick (legacy instructor dashboard only):

The cherry-pick described below is only required for the legacy (Django-rendered) instructor dashboard. It patches edx-platform to render the “Canvas” tab/section and its tables, and to surface Canvas background-task status in the legacy “Pending Tasks” panel.

It is NOT required when using the OEP-65 ``frontend-base`` instructor dashboard MFE. On the MFE, this plugin is self-contained:

  • The “Canvas” tab is added via the InstructorDashboardTabsRequested filter (org.openedx.learning.instructor.dashboard.tabs.requested.v1) — see pipeline.py — and only for courses with canvas_id set.

  • Background-task status is served as JSON by the plugin’s own list_canvas_tasks endpoint (see views.py), which formats Canvas task output itself, so no edx-platform patch to get_task_completion_info / list_instructor_tasks is needed.

  • The tab content (tables, etc.) is rendered by the MFE’s React components.

If you run only the MFE instructor dashboard, you can skip the cherry-pick entirely. The section below applies if you still serve the legacy instructor dashboard.

Legacy instructor dashboard — the edx-platform branch/tag you’re using must include one of the below commits for the legacy “Canvas” tab to work properly:

For “Sumac” or more recent release of edX platform, you should cherry-pick below commit:

TBA - Will be added when we merge the PR in edx-platform

For “Quince” to “Redwood” release of edX platform, you should cherry-pick below commit:

https://github.com/mitodl/edx-platform/commit/7a2edd5d29ead6845cb33d2001746207cf696383

For “Nutmeg” to “Palm” release of edX platform, you should cherry-pick below commit:

For any release prior to “Nutmeg” you should cherry-pick below commit:

Version Compatibility

For “Sumac” through “Teak” release of edX platform

Use a version between 0.4.0 and 0.8.3 of this plugin. For Ulmo/Verawood+, see the Open edX Release Compatibility table below.

For “Quince” to “Redwood” release of edX platform

Use 0.3.0 or a above version of this plugin

For “Nutmeg” to “Palm” release of edX platform

Use 0.2.4 or a above version of this plugin

For releases prior to “Nutmeg”

Use 0.1.1 version of this plugin

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

Installation

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • LMS

  • CMS

Configuration

1) edx-platform configuration

  • Add the following configuration values to the config files in Open edX. For any release after Juniper, that config file is /edx/etc/lms.yml for LMS and /edx/etc/cms.yml for CMS. If you’re using private.py, add these values to lms/envs/private.py and cms/envs/private.py. These should be added to the top level. Ask a fellow developer or devops for these values.

    CANVAS_ACCESS_TOKEN: <some access token value>
    CANVAS_BASE_URL: <the base URL where Canvas is running>
  • (Optional) CANVAS_COURSE_ID_CACHE_TIMEOUT controls how long, in seconds, the plugin caches whether a course is linked to Canvas. This avoids a full course lookup on every graded learner interaction platform-wide. Defaults to 300 (5 minutes). Only needs to be set in the LMS config, since the grade-sync check only runs in the LMS.

  • Add the following configuration to you CMS settings (depending on you deployment method). These values defined in the LMS settings and are used in tasks.py. Since Celery’s auto-discovery imports this automatically in the CMS worker, these values need to be defined in the CMS settings to avoid Celery worker failure.

    BULK_EMAIL_MAX_RETRIES = 5
    BULK_EMAIL_DEFAULT_RETRY_DELAY = 30
  • For Tutor installations, these values can also be managed through a custom tutor plugin.

2) Add course settings value

  1. Open your course in Studio.

  2. Navigate to “Advanced Settings”.

  3. Enable other course settings by enabling ENABLE_OTHER_COURSE_SETTINGS feature flag in CMS

  4. Open course advanced settings in Open edX CMS, Add a dictionary in {"canvas_id": <canvas_course_id>, "use_canvas_due_dates": <True/False>}. The canvas_course_id should be the id of a course that exists on Canvas. The use_canvas_due_dates is an optional flag (defaults to False) to sync the assignment due dates from Canvas to Open edX. (NOTE: Canvas tab would only be visible if canvas_id is set)

How To Use

Manual Operations

  1. In Studio, create/navigate to a course and create some graded assignments/quizzes.

  2. In LMS, open the above course, navigate to the “Instructor” tab, and make sure that you see can see a “Canvas” tab.

Some of the functionality available in this tab:

  • List enrollments on Canvas - Show all enrollments for the course on Canvas.

  • Merge enrollment list using Canvas - Enroll all the users that are present on edX. For the users that don’t exist on edX, a CourseEnrollmentAllowed object will be created.

  • Overload enrollment list using Canvas - Ensure that enrollment records in edX match the enrollments in Canvas (i.e.: create any enrollments that exist in Canvas but don’t exist in edX, and delete enrollments that exist in edX but not in Canvas)

  • Push all MITx grades to Canvas - Ensure that Canvas has the equivalent assignments/quizzes for the course, and create/update the user grades for those assignments/quizzes in Canvas (The assignments must have a Published status on Canvas)

  • List Canvas assignments - Show a dropdown of all the assignments that are present on Canvas, and upon selecting an assignment, show a list of grades.

Background Operations

When a Canvas course is linked by adding the canvas_id the Advanced Settings of a course, the following background operations are performed based on user events.

1. Automatic Syncing of Assignments

Whenever the course is Published from the Studio, the graded subsections of the Open edX Course are automatically synced to the linked Canvas course. This includes

  • adding new assignments when new graded subsections are added

  • updating the existing assignments

  • removing any assignment that might exist, when subsections are removed

  • syncing assignment due dates (if use_canvas_due_dates is set to True in course advanced settings) from Canvas to Open edX

2. Automatic Syncing of Grades

Whenever a learner interacts with a graded question in Open edX, the latest grades are automatically posted to Canvas, if it’s a part of a synced assignment. If a grade in Open edX is past the canvas due date, it will not be synced.

3. Automatic Syncing of Due Dates

This feature allows for periodic syncing of assignment due dates from the linked Canvas course to Open edX.

Scheduling the Task

This task is automatically scheduled to run every hour by Celery beat. If Celery beat isn’t configured you can also accomplish this via cron.

The management command can be run (in the dev environment) using the following Tutor command:

tutor dev exec cms -- python manage.py cms sync_canvas_due_dates --all

For Tutor-based installations, you can schedule this using the grove-config plugin which is a part of tutor-contrib-grove. It can be configured using the following Tutor config snippet:

GROVE_CRON_JOBS:
  - name: canvas-sync-due-dates
    service: cms
    script: ./manage.py cms sync_canvas_due_dates --all
    schedule: "0 * * * *"

Metadata

Release files for ol-openedx-canvas-integration 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-canvas-integration 0.9.2
File Size Uploaded Provenance Actions
ol_openedx_canvas_integration-0.9.2.tar.gz 25.6 kB Without provenance Details for ol_openedx_canvas_integration-0.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-canvas-integration 0.9.2
File Interpreter ABI Platform Actions
ol_openedx_canvas_integration-0.9.2-py3-none-any.whl Python 3 none any Details for ol_openedx_canvas_integration-0.9.2-py3-none-any.whl

Total release size: 62.6 kB

Release files / ol_openedx_canvas_integration-0.9.2.tar.gz

Download URL ol_openedx_canvas_integration-0.9.2.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f4b301204c71de72f64a377ae8c1d66eb52da9b684ccddcccfe385442962506a
BLAKE2b-256 checksum
How to use checksums
22ba634bcd6141f296c1ac37728c4b7fceb200a97b75af5560fdc814e042a9a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / ol_openedx_canvas_integration-0.9.2-py3-none-any.whl

Download URL ol_openedx_canvas_integration-0.9.2-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e552d81b120919c681272965bf1abb961e84ef7bdcfdc0e2484ad7a85b133fba
BLAKE2b-256 checksum
How to use checksums
bfb842de83f03dd208323cfe547ce2b3f12a49ba0f2b9d79791cbd558a27d7f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for ol-openedx-canvas-integration 0.9.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page