Default new certificate page title to courseware title#3713
Open
zamanafzal wants to merge 1 commit into
Open
Conversation
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>
OpenAPI ChangesShow/hide ## Changes for v0.yaml:Unexpected changes? Ensure your branch is up-to-date with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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> Certificatein its "Certificate Title" (CertificatePage.product_name), because that's what thecreate_coursewarecommand 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.PLACEHOLDER - …title would leak into a signed credential.Change
cms/api.py—create_default_certificate_page:How to test
Automated:
test_create_default_certificate_page_defaults_to_title(new) asserts a newly created certificate page'sproduct_nameequals the courseware title and contains noPLACEHOLDERtext.Manual (optional): create a new courseware page via
create_coursewareand confirm the generated certificate page's "Certificate Title" is the courseware title rather thanPLACEHOLDER - … Certificate.