## mako <%page expression_filter="h"/> <%namespace name='static' file='../static_content.html'/> <%! import json from django.conf import settings from django.urls import reverse from django.utils.translation import gettext as _ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_image_urls_for_user from openedx.core.djangoapps.user_api.accounts.toggles import should_redirect_to_order_history_microfrontend from openedx.features.enterprise_support.utils import get_enterprise_learner_generic_name, get_enterprise_learner_portal %> <% ## This template should not use the target student's details when masquerading, see TNL-4895 self.real_user = getattr(user, 'real_user', user) profile_image_url = get_profile_image_urls_for_user(self.real_user)['medium'] username = self.real_user.username displayname = get_enterprise_learner_generic_name(request) or username enterprise_customer_portal = get_enterprise_learner_portal(request) ## Enterprises with the learner portal enabled should not show order history, as it does ## not apply to the learner's method of purchasing content. should_show_order_history = should_redirect_to_order_history_microfrontend() and not enterprise_customer_portal %>