Skip to content
Snippets Groups Projects
Unverified Commit 94f65768 authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #17466 from edx/revert-17164-afzaledx/WL-1289

Revert "Made the certificates section on the user profile page site aware. WL-1289"
parents f3ebb92e f4e9f3ac
No related merge requests found
......@@ -3,7 +3,6 @@ Views to render a learner's achievements.
"""
from django.template.loader import render_to_string
from student.views import get_org_black_and_whitelist_for_site
from lms.djangoapps.certificates import api as certificate_api
from openedx.core.djangoapps.certificates.api import certificates_viewable_for_course
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
......@@ -42,16 +41,6 @@ class LearnerAchievementsFragmentView(EdxFragmentView):
course_key = course_certificate['course_key']
try:
course_overview = CourseOverview.get_from_id(course_key)
site_org_whitelist, site_org_blacklist = get_org_black_and_whitelist_for_site(request.user)
# Filter out anything that is not in the whitelist.
if site_org_whitelist and course_overview.location.org not in site_org_whitelist:
continue
# Conversely, filter out any enrollments in the blacklist.
elif site_org_blacklist and course_overview.location.org in site_org_blacklist:
continue
course_certificate['course'] = course_overview
if certificates_viewable_for_course(course_overview):
passing_certificates.append(course_certificate)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment