def get_annotated_content_info(course_id, content, user, user_info):
 voted = ''
 if (content['id'] in user_info['upvoted_ids']):
  voted = 'up'
 elif (content['id'] in user_info['downvoted_ids']):
  voted = 'down'
 return {'voted': voted, 'subscribed': (content['id'] in user_info['subscribed_thread_ids']), 'ability': get_ability(course_id, content, user)}

def get_annotated_content_info ( course_id , content , user , user_info ) : voted = '' if ( content [ 'id' ] in user_info [ 'upvoted_ids' ] ) : voted = 'up' elif ( content [ 'id' ] in user_info [ 'downvoted_ids' ] ) : voted = 'down' return { 'voted' : voted , 'subscribed' : ( content [ 'id' ] in user_info [ 'subscribed_thread_ids' ] ) , 'ability' : get_ability ( course_id , content , user ) }
get metadata for an individual content .