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 = 30For Tutor installations, these values can also be managed through a custom tutor plugin.
2) Add course settings value
Open your course in Studio.
Navigate to “Advanced Settings”.
Enable other course settings by enabling ENABLE_OTHER_COURSE_SETTINGS feature flag in CMS
Open course advanced settings in Open edX CMS, Add a dictionary in {"canvas_id": <canvas_course_id>, "use_canvas_due_dates": <True/False>, "sync_canvas_grades_after_due_date": <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) The sync_canvas_grades_after_due_date is an optional flag (defaults to false) to keep syncing grades to Canvas after an assignment’s Canvas due date, for both the automatic sync and the Push all MITx grades to Canvas button. Use the unquoted JSON value true to enable it; any other value, including the string "true", keeps the cutoff.
How To Use
Manual Operations
In Studio, create/navigate to a course and create some graded assignments/quizzes.
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. Grades for an assignment whose Canvas due date has passed are not synced, unless sync_canvas_grades_after_due_date is set to true in course advanced settings.
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.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ol_openedx_canvas_integration-0.10.1.tar.gz | 26.0 kB | Without provenance | Details for ol_openedx_canvas_integration-0.10.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ol_openedx_canvas_integration-0.10.1-py3-none-any.whl | Python 3 | none | any | Details for ol_openedx_canvas_integration-0.10.1-py3-none-any.whl |
Total release size: 63.1 kB
Release files / ol_openedx_canvas_integration-0.10.1.tar.gz
| Download URL | ol_openedx_canvas_integration-0.10.1.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28733539dd4f5e7b78baea74f176e00239c19c887f55849bbdc03d30b4b9642c
|
|
BLAKE2b-256 checksum How to use checksums |
75fd800a3dd16241220b6f11c8e07f989c3dfe2d3067a6dc8316499c2b63a9d3
|
| 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.10.1-py3-none-any.whl
| Download URL | ol_openedx_canvas_integration-0.10.1-py3-none-any.whl |
|---|---|
| Size | 37.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fd5af63156d33db992bce1cff62b976878c0b903898ad9701e618d5b43ef0ba
|
|
BLAKE2b-256 checksum How to use checksums |
867403bd669b2611a93346276e5f12b0ed7a24ed532fbf43171e9f1212436057
|
| 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.10.1
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.