Don't show certificate on profile if no active config.
Stop showing certificate information on profile page if there is no active certificate configuration. PROD-1200
This commit is contained in:
@@ -44,7 +44,10 @@ class LearnerAchievementsFragmentView(EdxFragmentView):
|
||||
course_overview = CourseOverview.get_from_id(course_key)
|
||||
course_certificate['course'] = course_overview
|
||||
if certificates_viewable_for_course(course_overview):
|
||||
passing_certificates.append(course_certificate)
|
||||
# add certificate into passing certificate list only if it's a PDF certificate
|
||||
# or there is an active certificate configuration.
|
||||
if course_certificate['is_pdf_certificate'] or course_overview.has_any_active_web_certificate:
|
||||
passing_certificates.append(course_certificate)
|
||||
except CourseOverview.DoesNotExist:
|
||||
# This is unlikely to fail as the course should exist.
|
||||
# Ideally the cert should have all the information that
|
||||
|
||||
Reference in New Issue
Block a user