openedx-pok
Introduction
This repository contains a plugin for Open edX that replaces the standard certificate generation system with a custom integration using the POK API. The main goal is to enable the issuance of personalized and advanced certificates, managed via the POK API, while maintaining interoperability with the Open edX ecosystem.
The plugin uses Open edX-provided filters to intercept events related to certificate creation and rendering, redirecting these processes to the POK API. This allows for a seamless and transparent integration for end users.
Architecture and Operation
### 1. Event Interception Using Filters
The plugin leverages Open edX filters to intercept the following key events:
CertificateCreationRequested: This filter is triggered when a certificate creation request is made. The plugin redirects this request to the POK API to generate the certificate.
CertificateRenderStarted: This filter is triggered when a certificate is about to be rendered. The plugin redirects the rendering process to the POK API to display the generated certificate or an intermediate status (e.g., processing, error).
### 2. Integration with the POK API
The POK API client (PokApiClient) handles all communication with the external API. This includes:
Requesting custom certificates.
Retrieving details of existing certificates.
Generating previews of certificate templates.
Managing custom parameters defined in POK templates.
### 3. Database Models
The plugin defines two main models:
PokCertificate: Stores information about certificates generated via POK, including status, viewing URL, and additional metadata.
CertificateTemplate: Links an Open edX course to a specific POK template, enabling per-course certificate customization.
### 4. Administration and Configuration
The plugin includes a Django admin interface to manage certificates and templates. Additionally, plugin settings are defined in settings.common.py, where parameters such as the POK API URL, authentication keys, and timeout values are configured.
Workflow
Certificate Creation: - When a certificate is requested, the CertificateCreationRequested filter intercepts the request. - The POK API client is used to send user, course, and custom parameter data. - The POK API generates the certificate and returns a unique identifier, which is stored in the PokCertificate model.
Certificate Rendering: - When a user attempts to view a certificate, the CertificateRenderStarted filter intercepts the request. - Depending on the certificate status (issued, in progress, etc.), the plugin redirects the user to the appropriate URL or displays an intermediate status page.
Error Handling: - If an error occurs during certificate generation or rendering, the plugin displays a custom error page.
Configuration
This version targets Open edX Verawood with Python 3.12 and Django 5.2. See the Verawood compatibility review for dependency alignment, integration changes, and staging verification steps. Configure COURSE_AUTHORING_MICROFRONTEND_URL and LMS_ROOT_URL to the public Studio frontend and LMS URLs used by certificate pages.
### Prerequisites
A working Open edX installation.
Valid credentials for accessing the POK API.
Certificate templates configured in the POK platform.
### Configuration Variables
The following variables must be set in the settings.common.py file:
POK_API_URL: Base URL of the POK API.
POK_API_KEY: Authentication key for the API.
POK_TEMPLATE_ID: Default template ID.
POK_TIMEOUT: Timeout value for API requests.
### Installation
Clone this repository into the Open edX extensions directory.
Add openedx_pok to the INSTALLED_APPS list in the Django settings.
Configure the required variables in the Open edX settings file.
Run migrations to create the required database tables:
python manage.py migrate openedx_pok
### Usage
Admin Panel: Use the Django admin interface to manage certificates and templates.
Preview: Use the preview functionality to check how a certificate will appear before issuing it.
Monitoring: Check logs to debug issues or monitor the status of POK API requests.
Support
This Open edX plugin was developed by Aulasneo. Feel free to reach out to us if you need a custom version of it. Also, If you encounter issues or have questions, you can open an issue in this repository or join discussions in the Open edX community.
License
This project is licensed under the terms specified in the LICENSE.txt file.
Contributions
Contributions are welcome. Please read the contribution guidelines before submitting a pull request.
Metadata
Release files for openedx-pok 22.0.0
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 |
|---|---|---|---|---|
| openedx_pok-22.0.0.tar.gz | 36.1 kB | With provenance | Details for openedx_pok-22.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openedx_pok-22.0.0-py3-none-any.whl | Python 3 | none | any | Details for openedx_pok-22.0.0-py3-none-any.whl |
Total release size: 72.7 kB
Release files / openedx_pok-22.0.0.tar.gz
| Download URL | openedx_pok-22.0.0.tar.gz |
|---|---|
| Size | 36.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0950553501faa19f4b7ea4fc7a7251a9d82cda877f4af1bbc430c6e16afe852e
|
|
BLAKE2b-256 checksum How to use checksums |
a7e93652ff66edfabdbeaa9cbf5c54e77246963b7416a3eac4065e85ad1fbf31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logRelease files / openedx_pok-22.0.0-py3-none-any.whl
| Download URL | openedx_pok-22.0.0-py3-none-any.whl |
|---|---|
| Size | 36.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f36e8ab70e023ad9fb83c9bceae39897a30034806c4406f571973c95e7eb7329
|
|
BLAKE2b-256 checksum How to use checksums |
4c162f741b20d8912ac1d9bbd7a77894b3fdcdd5262b8f161f0962424b05e8b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logSecurity for openedx-pok 22.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for openedx_pok-22.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency logA 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.