Files
Justin Hynes 8d7a13f358 feat: update task and signals responsible for cert available dates in Credentials
[APER-3229]

The monolith and the Credentials IDA keep independent records of a course runs certificate availability/visibility preferences. This PR aims to improve the communication between the monolith and the Credentiala IDA to keep the availability date/preference in sync with the monoliths records.

The current code is too strict and actually prevents valid updates in some configurations.

Additionally, the Credentials IDA doesn't understand the concept of "course pacing" (instructor-paced vs self-paced) and has troubles with courses with an availability date of "end". Instead of having to add the concept of course pacing (and syncing more data between the two systems), this PR proposes sending the end date of a course as the "certificate available date" to Credentials.

This way, the Credentials IDA can manage the visibility of awarded credentials in a course run with a display behavior of "end" using the existing feature set and models of the Credentials service.
2024-03-18 12:30:40 +00:00

16 lines
548 B
Python

"""
Python APIs exposed by the credentials app to other in-process apps.
"""
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig
def is_credentials_enabled():
"""
A utility function wrapping the `is_learner_issurance_enabled` utility function of the CredentialsApiConfig model.
Intended to be an easier to read/grok utility function that informs the caller if use of the Credentials IDA is
enabled for this Open edX instance.
"""
return CredentialsApiConfig.current().is_learner_issuance_enabled