Skip to content
Snippets Groups Projects
Commit 53d2e242 authored by Simon Chen's avatar Simon Chen
Browse files

Revert "Add logging statements to investigate MST-264"

This reverts commit 51ed4d93df6b795de1b5945a58e6a1f1c6972220.

The logging statement made clear the root cause of the bug.
parent a2ee0079
Branches
Tags release-2020-08-27-11.22
No related merge requests found
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
""" """
ProgramEnrollment Views ProgramEnrollment Views
""" """
import logging
from ccx_keys.locator import CCXLocator from ccx_keys.locator import CCXLocator
from django.conf import settings from django.conf import settings
from django.core.management import call_command from django.core.management import call_command
...@@ -73,8 +71,6 @@ from .utils import ( ...@@ -73,8 +71,6 @@ from .utils import (
verify_user_enrolled_in_program verify_user_enrolled_in_program
) )
logger = logging.getLogger(__name__)
class EnrollmentWriteMixin(object): class EnrollmentWriteMixin(object):
""" """
...@@ -711,11 +707,6 @@ class UserProgramReadOnlyAccessView(DeveloperErrorViewMixin, PaginatedAPIView): ...@@ -711,11 +707,6 @@ class UserProgramReadOnlyAccessView(DeveloperErrorViewMixin, PaginatedAPIView):
programs = [] programs = []
requested_program_type = normalize_program_type(request.GET.get('type', self.DEFAULT_PROGRAM_TYPE)) requested_program_type = normalize_program_type(request.GET.get('type', self.DEFAULT_PROGRAM_TYPE))
logger.info(
'User %s is requesting the program_enrollments for learner portal display',
request_user.id,
)
if request_user.is_staff: if request_user.is_staff:
programs = get_programs_by_type(request.site, requested_program_type) programs = get_programs_by_type(request.site, requested_program_type)
elif self.is_course_staff(request_user): elif self.is_course_staff(request_user):
...@@ -725,17 +716,7 @@ class UserProgramReadOnlyAccessView(DeveloperErrorViewMixin, PaginatedAPIView): ...@@ -725,17 +716,7 @@ class UserProgramReadOnlyAccessView(DeveloperErrorViewMixin, PaginatedAPIView):
user=request.user, user=request.user,
program_enrollment_statuses=ProgramEnrollmentStatuses.__ACTIVE__, program_enrollment_statuses=ProgramEnrollmentStatuses.__ACTIVE__,
) )
logger.info(
'User %s is enrolled into %s programs',
request_user.id,
len(program_enrollments)
)
uuids = [enrollment.program_uuid for enrollment in program_enrollments] uuids = [enrollment.program_uuid for enrollment in program_enrollments]
logger.info(
'The program UUIDs the user %s is enrolled into are: %s',
request_user.id,
','.join([str(uuid) for uuid in uuids])
)
programs = get_programs(uuids=uuids) or [] programs = get_programs(uuids=uuids) or []
programs_in_which_user_has_access = [ programs_in_which_user_has_access = [
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment