def get_last_accessed_courseware(course, request, user):
 field_data_cache = FieldDataCache.cache_for_descriptor_descendents(course.id, request.user, course, depth=2)
 course_module = get_module_for_descriptor(user, request, course, field_data_cache, course.id, course=course)
 chapter_module = get_current_child(course_module)
 if (chapter_module is not None):
  section_module = get_current_child(chapter_module)
  if (section_module is not None):
   url = reverse('courseware_section', kwargs={'course_id': unicode(course.id), 'chapter': chapter_module.url_name, 'section': section_module.url_name})
   return url
 return None

def get_last_accessed_courseware ( course , request , user ) : field_data_cache = FieldDataCache . cache_for_descriptor_descendents ( course . id , request . user , course , depth = 2 ) course_module = get_module_for_descriptor ( user , request , course , field_data_cache , course . id , course = course ) chapter_module = get_current_child ( course_module ) if ( chapter_module is not None ) : section_module = get_current_child ( chapter_module ) if ( section_module is not None ) : url = reverse ( 'courseware_section' , kwargs = { 'course_id' : unicode ( course . id ) , 'chapter' : chapter_module . url_name , 'section' : section_module . url_name } ) return url return None
return the courseware module url that the user last accessed .