def _build_context(self, request, customer_uuid):
        """
        Build common context parts used by different handlers in this view.
        """
        # TODO: pylint acts stupid - find a way around it without suppressing
        enterprise_customer = EnterpriseCustomer.objects.get(uuid=customer_uuid)  # pylint: disable=no-member

        search_keyword = self.get_search_keyword(request)
        linked_learners = self.get_enterprise_customer_user_queryset(request, search_keyword, customer_uuid)
        pending_linked_learners = self.get_pending_users_queryset(search_keyword, customer_uuid)

        context = {
            self.ContextParameters.ENTERPRISE_CUSTOMER: enterprise_customer,
            self.ContextParameters.PENDING_LEARNERS: pending_linked_learners,
            self.ContextParameters.LEARNERS: linked_learners,
            self.ContextParameters.SEARCH_KEYWORD: search_keyword or '',
            self.ContextParameters.ENROLLMENT_URL: settings.LMS_ENROLLMENT_API_PATH,
        }
        context.update(admin.site.each_context(request))
        context.update(self._build_admin_context(request, enterprise_customer))
        return context
def _build_context(self, request, customer_uuid):
        """
        Build common context parts used by different handlers in this view.
        """
        # TODO: pylint acts stupid - find a way around it without suppressing
        enterprise_customer = EnterpriseCustomer.objects.get(uuid=customer_uuid)  # pylint: disable=no-member

        search_keyword = self.get_search_keyword(request)
        linked_learners = self.get_enterprise_customer_user_queryset(request, search_keyword, customer_uuid)
        pending_linked_learners = self.get_pending_users_queryset(search_keyword, customer_uuid)

        context = {
            self.ContextParameters.ENTERPRISE_CUSTOMER: enterprise_customer,
            self.ContextParameters.PENDING_LEARNERS: pending_linked_learners,
            self.ContextParameters.LEARNERS: linked_learners,
            self.ContextParameters.SEARCH_KEYWORD: search_keyword or '',
            self.ContextParameters.ENROLLMENT_URL: settings.LMS_ENROLLMENT_API_PATH,
        }
        context.update(admin.site.each_context(request))
        context.update(self._build_admin_context(request, enterprise_customer))
        return context
def _build_context ( self , request , customer_uuid ) : # TODO: pylint acts stupid - find a way around it without suppressing enterprise_customer = EnterpriseCustomer . objects . get ( uuid = customer_uuid ) # pylint: disable=no-member search_keyword = self . get_search_keyword ( request ) linked_learners = self . get_enterprise_customer_user_queryset ( request , search_keyword , customer_uuid ) pending_linked_learners = self . get_pending_users_queryset ( search_keyword , customer_uuid ) context = { self . ContextParameters . ENTERPRISE_CUSTOMER : enterprise_customer , self . ContextParameters . PENDING_LEARNERS : pending_linked_learners , self . ContextParameters . LEARNERS : linked_learners , self . ContextParameters . SEARCH_KEYWORD : search_keyword or '' , self . ContextParameters . ENROLLMENT_URL : settings . LMS_ENROLLMENT_API_PATH , } context . update ( admin . site . each_context ( request ) ) context . update ( self . _build_admin_context ( request , enterprise_customer ) ) return context
Build common context parts used by different handlers in this view.
Build common context parts used by different handlers in this view .