Skip to content

Commit

Permalink
Merge pull request openedx#33551 from openedx/ashultz0/course_enrollm…
Browse files Browse the repository at this point in the history
…ent_clean

small cleanups in course enrollment while researching
  • Loading branch information
ashultz0 authored Oct 26, 2023
2 parents 3bda3be + ad90c05 commit 35eb8c6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions common/djangoapps/student/models/course_enrollment.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,6 @@ def enrollment_counts(self, course_id):
enroll_dict['total'] = total
return enroll_dict

def enrolled_and_dropped_out_users(self, course_id):
"""Return a queryset of Users in the course."""
return User.objects.filter(
courseenrollment__course_id=course_id
)


# Named tuple for fields pertaining to the state of
# CourseEnrollment for a user in a course. This type
Expand Down Expand Up @@ -287,7 +281,7 @@ def course_price(self):
objects = CourseEnrollmentManager()

# cache key format e.g enrollment.<username>.<course_key>.mode = 'honor'
COURSE_ENROLLMENT_CACHE_KEY = "enrollment.{}.{}.mode" # TODO Can this be removed? It doesn't seem to be used.
COURSE_ENROLLMENT_CACHE_KEY = "enrollment.{}.{}.mode"

MODE_CACHE_NAMESPACE = 'CourseEnrollment.mode_and_active'

Expand Down Expand Up @@ -330,7 +324,7 @@ def get_or_create_enrollment(cls, user, course_key):
attribute), this method will automatically save it before
adding an enrollment for it.
`course_id` is our usual course_id string (e.g. "edX/Test101/2013_Fall)
`course_key` must be a opaque_keys CourseKey object.
It is expected that this method is called from a method which has already
verified the user authentication and access.
Expand Down

0 comments on commit 35eb8c6

Please sign in to comment.