Skip to content
Snippets Groups Projects
Unverified Commit d1d5427b authored by Eric Fischer's avatar Eric Fischer Committed by GitHub
Browse files

Merge pull request #18063 from edx/efischer/cache_partitions

Cache list of course partitions
parents 51d63253 8ed427e9
Branches
Tags
No related merge requests found
......@@ -7,6 +7,7 @@ from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import logging
from openedx.core.djangoapps.request_cache.middleware import request_cached
from xmodule.partitions.partitions import UserPartition, UserPartitionError, ENROLLMENT_TRACK_PARTITION_ID
from xmodule.modulestore.django import modulestore
......@@ -16,6 +17,7 @@ log = logging.getLogger(__name__)
FEATURES = getattr(settings, 'FEATURES', {})
@request_cached
def get_all_partitions_for_course(course, active_only=False):
"""
A method that returns all `UserPartitions` associated with a course, as a List.
......
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