def check_syllabus_visibility(course, term, update=False):
    """For a specific course, check that course is:
     - in this term and published
     - has a syllabus visible to the institution (public_syllabus_to_auth)
       or is otherwise public
    """
    if course.enrollment_term_id != term:
        return 0
    if course.workflow_state != 'available':
        return 0

    problem_tabs = [t for t in course.get_tabs() if t.id == 'syllabus' and hasattr(t, 'hidden') and t.hidden == True]
    if len(problem_tabs) > 0:
        print("***", course.name, "has syllabus page hidden")

    if course.public_syllabus_to_auth or course.public_syllabus:
        return 0
    print("-->", course.name, course.workflow_state, course.enrollment_term_id)

    if update:
        if not (course.public_syllabus_to_auth or course.public_syllabus):
            course.update(course={'public_syllabus_to_auth':True})
    return 1