Skip to content

Commit

Permalink
fix: "Course org display str" option doesnt influence certificate (op…
Browse files Browse the repository at this point in the history
…enedx#34465)

"Course organization display string" option in Advanced settings doesn't influence certificate
Co-authored-by: Dima Alipov <[email protected]>
  • Loading branch information
DmytroAlipov authored Apr 23, 2024
1 parent 7ef3674 commit 9738f61
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lms/djangoapps/certificates/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,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
Expand Down

0 comments on commit 9738f61

Please sign in to comment.