From b036cd002bfa89111d451ce382af264e5556edad Mon Sep 17 00:00:00 2001 From: Dmytro <98233552+DmytroAlipov@users.noreply.github.com> Date: Tue, 23 Apr 2024 15:24:18 +0200 Subject: [PATCH] fix: "Course org display str" option doesnt influence certificate (#34466) "Course organization display string" option in Advanced settings doesn't influence certificate. Co-authored-by: Dima Alipov --- lms/djangoapps/certificates/views/webview.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index 4d99b7d7722d..eddddbb88717 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -458,14 +458,15 @@ def _update_organization_context(context, course): Updates context with organization related info. """ partner_long_name, organization_logo = None, None - partner_short_name = course.display_organization if course.display_organization else course.org + course_org_display = course.display_organization organizations = organizations_api.get_course_organizations(course_key=course.id) if organizations: # TODO Need to add support for multiple organizations, Currently we are interested in the first one. organization = organizations[0] partner_long_name = organization.get('name', partner_long_name) - partner_short_name = organization.get('short_name', partner_short_name) + course_org_display = course_org_display or organization.get('short_name') organization_logo = organization.get('logo', None) + partner_short_name = course_org_display or course.org context['organization_long_name'] = partner_long_name context['organization_short_name'] = partner_short_name