def get_static_tab_contents(request, course, tab):
 loc = course.id.make_usage_key(tab.type, tab.url_slug)
 field_data_cache = FieldDataCache.cache_for_descriptor_descendents(course.id, request.user, modulestore().get_item(loc), depth=0)
 tab_module = get_module(request.user, request, loc, field_data_cache, static_asset_path=course.static_asset_path, course=course)
 logging.debug('course_module = %s', tab_module)
 html = ''
 if (tab_module is not None):
  try:
   html = tab_module.render(STUDENT_VIEW).content
  except Exception:
   html = render_to_string('courseware/error-message.html', None)
   log.exception(u'Error rendering course=%s, tab=%s', course, tab['url_slug'])
 return html

def get_static_tab_contents ( request , course , tab ) : loc = course . id . make_usage_key ( tab . type , tab . url_slug ) field_data_cache = FieldDataCache . cache_for_descriptor_descendents ( course . id , request . user , modulestore ( ) . get_item ( loc ) , depth = 0 ) tab_module = get_module ( request . user , request , loc , field_data_cache , static_asset_path = course . static_asset_path , course = course ) logging . debug ( 'course_module = %s' , tab_module ) html = '' if ( tab_module is not None ) : try : html = tab_module . render ( STUDENT_VIEW ) . content except Exception : html = render_to_string ( 'courseware/error-message.html' , None ) log . exception ( u'Error rendering course=%s, tab=%s' , course , tab [ 'url_slug' ] ) return html
returns the contents for the given static tab .