def get_published_branch_id(database):
    """Return the IDs of the published-branch courses."""
    collection = 'modulestore.active_versions'
    projection = {'versions.published-branch': 1, '_id': 0}
    cursor = database[collection].find({}, projection)

    published_branch_ids = []
    for result in cursor:
        course_id = result['versions']['published-branch']
        published_branch_ids.append(course_id)

    return published_branch_ids