Skip to content

Update and use case for the COURSE_CERTIFICATE_CONFIG_CHANGED event #477

@justinhynes

Description

@justinhynes

Background

The Credentials IDA is responsible for storing course certificate configurations, which include data on when a certificate becomes available to learners and may be displayed on their Learner Record.

Currently, Credentials receives certificate configuration updates via Celery tasks and REST endpoints. When a course run is published, the system (edx-platform) checks whether the Certificate Display Behavior (CDB) or Certificate Available Date (CAD) has changed. If so, it emits the COURSE_CERT_DATE_CHANGE signal.

This signal is handled by the Programs Django app, which enqueues an update_certificate_available_date_on_course_update Celery task. When executed, this task makes a REST call to Credentials to update its records.

Problem

Instead of relying on Celery tasks and REST calls, we would like Credentials to receive this data via the Event Bus. However, there is currently no Event Bus event that supports passing CDB or CAD updates.

Proposal

The COURSE_CERTIFICATE_CONFIG_CHANGED event exists but is not currently used and is marked for deprecation. Instead of deprecating it, we propose an update and repurposing it.

We could introduce a new CertificateDisplayOptionsData class to encapsulate CDB and CAD details:

{
    "display_behavior": type=str,
    "available_date": type=datetime,
}

Then, modify the CertificateConfigData class to include display options data:

{
  certificate_type: type=str,
  course_key: type=CourseKey,
  title: type=str,
  signatories: type=List[CertificateSignatoryData],
  is_active: type=bool,
  display_options: type=CertificateDisplayOptionsData,
}

Last, emit the COURSE_CERTIFICATE_CONFIG_CHANGED event in the same location where the COURSE_CERT_DATE_CHANGE signal is currently triggered.

This approach would make the event more useful and align it with a use case for the Credentials IDA.

Appreciate any thoughts or concerns!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions