diff --git a/lms/djangoapps/mobile_api/decorators.py b/lms/djangoapps/mobile_api/decorators.py index c91d88fdb635..ea309ce23f15 100644 --- a/lms/djangoapps/mobile_api/decorators.py +++ b/lms/djangoapps/mobile_api/decorators.py @@ -29,7 +29,7 @@ def _decorator(func): def _wrapper(self, request, *args, **kwargs): """ Expects kwargs to contain 'course_id'. - Passes the course descriptor to the given decorated function. + Passes the course block to the given decorated function. Raises 404 if access to course is disallowed. """ course_id = CourseKey.from_string(kwargs.pop('course_id')) diff --git a/lms/djangoapps/mobile_api/models.py b/lms/djangoapps/mobile_api/models.py index f2a912e78c61..ba6f73721456 100644 --- a/lms/djangoapps/mobile_api/models.py +++ b/lms/djangoapps/mobile_api/models.py @@ -93,7 +93,7 @@ class IgnoreMobileAvailableFlagConfig(ConfigurationModel): Configuration for the mobile_available flag. Default is false. Enabling this configuration will cause the mobile_available flag check in - access.py._is_descriptor_mobile_available to ignore the mobile_available + access.py._is_block_mobile_available to ignore the mobile_available flag. .. no_pii: diff --git a/lms/djangoapps/mobile_api/users/views.py b/lms/djangoapps/mobile_api/users/views.py index 0e2cb61d3114..eca113a88465 100644 --- a/lms/djangoapps/mobile_api/users/views.py +++ b/lms/djangoapps/mobile_api/users/views.py @@ -140,7 +140,7 @@ def _last_visited_block_path(self, request, course): the course block. If there is no such visit, the first item deep enough down the course tree is used. """ - field_data_cache = FieldDataCache.cache_for_descriptor_descendents( + field_data_cache = FieldDataCache.cache_for_block_descendents( course.id, request.user, course, depth=2) course_block = get_block_for_descriptor( @@ -173,14 +173,14 @@ def _update_last_visited_module_id(self, request, course, module_key, modificati """ Saves the module id if the found modification_date is less recent than the passed modification date """ - field_data_cache = FieldDataCache.cache_for_descriptor_descendents( + field_data_cache = FieldDataCache.cache_for_block_descendents( course.id, request.user, course, depth=2) try: - block_descriptor = modulestore().get_item(module_key) + descriptor = modulestore().get_item(module_key) except ItemNotFoundError: return Response(errors.ERROR_INVALID_MODULE_ID, status=400) block = get_block_for_descriptor( - request.user, request, block_descriptor, field_data_cache, course.id, course=course + request.user, request, descriptor, field_data_cache, course.id, course=course ) if modification_date: