def load_single_xblock(request, user_id, course_id, usage_key_string, course=None):
 usage_key = UsageKey.from_string(usage_key_string)
 course_key = CourseKey.from_string(course_id)
 usage_key = usage_key.map_into_course(course_key)
 user = User.objects.get(id=user_id)
 field_data_cache = FieldDataCache.cache_for_descriptor_descendents(course_key, user, modulestore().get_item(usage_key), depth=0)
 instance = get_module(user, request, usage_key, field_data_cache, grade_bucket_type='xqueue', course=course)
 if (instance is None):
  msg = 'No module {0} for user {1}--access denied?'.format(usage_key_string, user)
  log.debug(msg)
  raise Http404
 return instance

def load_single_xblock ( request , user_id , course_id , usage_key_string , course = None ) : usage_key = UsageKey . from_string ( usage_key_string ) course_key = CourseKey . from_string ( course_id ) usage_key = usage_key . map_into_course ( course_key ) user = User . objects . get ( id = user_id ) field_data_cache = FieldDataCache . cache_for_descriptor_descendents ( course_key , user , modulestore ( ) . get_item ( usage_key ) , depth = 0 ) instance = get_module ( user , request , usage_key , field_data_cache , grade_bucket_type = 'xqueue' , course = course ) if ( instance is None ) : msg = 'No module {0} for user {1}--access denied?' . format ( usage_key_string , user ) log . debug ( msg ) raise Http404 return instance
load a single xblock identified by usage_key_string .