Skip to content

Default new certificate page title to courseware title#3713

Open
zamanafzal wants to merge 1 commit into
mainfrom
zafzal/certificate-page-default-title
Open

Default new certificate page title to courseware title#3713
zamanafzal wants to merge 1 commit into
mainfrom
zafzal/certificate-page-default-title

Conversation

@zamanafzal

@zamanafzal zamanafzal commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Follow-up to the certificate-title work (hq#11907, tracked in hq#11938). Covers item B.

Description

A certificate page can show PLACEHOLDER - <name> Certificate in its "Certificate Title" (CertificatePage.product_name), because that's what the create_courseware command populates when it creates the page. If nobody edits it afterward, the certificate goes out with that placeholder title. This changes the default to the courseware (course/program) title so command-created certificate pages are display-ready out of the box.

This only happens via create_courseware — when an admin creates a certificate page directly in the CMS, the "Certificate Title" field starts empty and they type the real title, so no placeholder is ever produced there.

  • Matters now because the Certificate Title flows into the verifiable credential and the LinkedIn "Add to Profile" name, so a leftover PLACEHOLDER - … title would leak into a signed credential.
  • The Step-1 backfill (#3697) cleans up existing placeholder titles; this only stops new ones from being created.
  • Admins can still overwrite the "Certificate Title" in the CMS.

Change

cms/api.pycreate_default_certificate_page:

cert_page = CertificatePage(
    product_name=courseware.title,
    CEUs=f"PLACEHOLDER - {courseware.title} CEUs",
)

How to test

Automated:

docker compose run --rm web uv run pytest cms/api_test.py::test_create_default_certificate_page_defaults_to_title
  • test_create_default_certificate_page_defaults_to_title (new) asserts a newly created certificate page's product_name equals the courseware title and contains no PLACEHOLDER text.

Manual (optional): create a new courseware page via create_courseware and confirm the generated certificate page's "Certificate Title" is the courseware title rather than PLACEHOLDER - … Certificate.

create_default_certificate_page seeded product_name with
"PLACEHOLDER - <name> Certificate"; default it to the courseware title so
new certificate pages are display-ready (admins can still overwrite). The
CEUs placeholder is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant