@@ -155,7 +155,7 @@ def _last_visited_block_path(self, request, course):
155
155
the course block. If there is no such visit, the first item deep enough down the course
156
156
tree is used.
157
157
"""
158
- field_data_cache = FieldDataCache .cache_for_block_descendents (
158
+ field_data_cache = FieldDataCache .cache_for_descriptor_descendents (
159
159
course .id , request .user , course , depth = 2 )
160
160
161
161
course_block = get_block_for_descriptor (
@@ -188,15 +188,14 @@ def _update_last_visited_module_id(self, request, course, module_key, modificati
188
188
"""
189
189
Saves the module id if the found modification_date is less recent than the passed modification date
190
190
"""
191
- field_data_cache = FieldDataCache .cache_for_block_descendents (
191
+ field_data_cache = FieldDataCache .cache_for_descriptor_descendents (
192
192
course .id , request .user , course , depth = 2 )
193
193
try :
194
- descriptor = modulestore ().get_item (module_key )
194
+ block_descriptor = modulestore ().get_item (module_key )
195
195
except ItemNotFoundError :
196
- log .error (f"{ errors .ERROR_INVALID_MODULE_ID } %s" , module_key )
197
196
return Response (errors .ERROR_INVALID_MODULE_ID , status = 400 )
198
197
block = get_block_for_descriptor (
199
- request .user , request , descriptor , field_data_cache , course .id , course = course
198
+ request .user , request , block_descriptor , field_data_cache , course .id , course = course
200
199
)
201
200
202
201
if modification_date :
0 commit comments