Skip to content

[BB-9706] fix: ensure certificate has a modified_date#784

Merged
viadanna merged 1 commit intoopencraft-release/sumac.1from
viadanna/fix-certificate-date
May 27, 2025
Merged

[BB-9706] fix: ensure certificate has a modified_date#784
viadanna merged 1 commit intoopencraft-release/sumac.1from
viadanna/fix-certificate-date

Conversation

@viadanna
Copy link
Member

Description

The change in this PR ensures the certificate generated in preview always has a modified date, even when the course has no end date. This is necessary to ensure the certificate is rendered correctly.

Copilot Summary

This pull request includes a small update to the _get_user_certificate function in lms/djangoapps/certificates/views/webview.py. The change ensures that the modified_date field defaults to the current date if no value is provided.

Supporting information

Testing instructions

  1. Go to Studio and create an instructor-paced course without an end date.
  2. Create a certificate for the course.
  3. Click Preview to preview the certificate in the LMS.
  4. Verify that the certificate is displayed without issues.

Deadline

ASAP

@viadanna viadanna requested a review from kaustavb12 May 21, 2025 21:26
@viadanna viadanna self-assigned this May 21, 2025
Copy link
Member

@kaustavb12 kaustavb12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this: Tested in the sandbox that certificate preview is working without a course end date.
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository.

…eal certificates (openedx#36471)

* fix: make the issued date displayed on previewed certificates match real certificates

This PR fixes an inconsistency in the dates displayed on certificates previewed via Studio with "real" certificates rendered to users.
@viadanna viadanna force-pushed the viadanna/fix-certificate-date branch from fc4a553 to c0f047f Compare May 27, 2025 18:16
@viadanna viadanna merged commit 07b030c into opencraft-release/sumac.1 May 27, 2025
49 checks passed
@viadanna viadanna deleted the viadanna/fix-certificate-date branch May 27, 2025 18:50
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.

3 participants