'Returns the course certification information for the given user.'

def _user_certificate_info(self, user, context, course_grade, bulk_certs):

    is_whitelisted = (user.id in bulk_certs.whitelisted_user_ids)
    certificate_info = certificate_info_for_user(user, course_grade.letter_grade, is_whitelisted, bulk_certs.certificates_by_user.get(user.id))
    TASK_LOG.info(u'Student    certificate    eligibility:    %s    (user=%s,    course_id=%s,    grade_percent=%s    letter_grade=%s    gradecutoffs=%s,    allow_certificate=%s,    is_whitelisted=%s)', certificate_info[0], user, context.course_id, course_grade.percent, course_grade.letter_grade, context.course.grade_cutoffs, user.profile.allow_certificate, is_whitelisted)
    return certificate_info
