def has_discussion_privileges(user, course_id):
 roles = get_role_ids(course_id)
 for role in roles:
  if (user.id in roles[role]):
   return True
 return False

def has_discussion_privileges ( user , course_id ) : roles = get_role_ids ( course_id ) for role in roles : if ( user . id in roles [ role ] ) : return True return False
returns true if the user is privileged in teams discussions for this course .