def get_entrance_exam_content(user, course):
 required_content = get_required_content(course, user)
 exam_module = None
 for content in required_content:
  usage_key = course.id.make_usage_key_from_deprecated_string(content)
  module_item = modulestore().get_item(usage_key)
  if ((not module_item.hide_from_toc) and module_item.is_entrance_exam):
   exam_module = module_item
   break
 return exam_module

def get_entrance_exam_content ( user , course ) : required_content = get_required_content ( course , user ) exam_module = None for content in required_content : usage_key = course . id . make_usage_key_from_deprecated_string ( content ) module_item = modulestore ( ) . get_item ( usage_key ) if ( ( not module_item . hide_from_toc ) and module_item . is_entrance_exam ) : exam_module = module_item break return exam_module
get the entrance exam content information .