'Return certificate white list for the given course as dict object,
returned dictionary will have the following key-value pairs
id:         \'id (pk) of CertificateWhitelist item\'
user_id:    \'User Id of the student\'
user_name:  \'name of the student\'
user_email: \'email of the student\'
course_id:  \'Course key of the course to whom certificate exception belongs\'
created:    \'Creation date of the certificate exception\'
notes:      \'Additional notes for the certificate exception\''

@classmethod
def get_certificate_white_list(cls, course_id, student=None):

    white_list = cls.objects.filter(course_id=course_id, whitelist=True)
    if student:
        white_list = white_list.filter(user=student)
    result = []
    generated_certificates = GeneratedCertificate.eligible_certificates.filter(course_id=course_id, user__in=[exception.user for exception in white_list], status=CertificateStatuses.downloadable)
    generated_certificates = {certificate['user']: certificate['created_date'] for certificate in generated_certificates.values('user', 'created_date')}
    for item in white_list:
        certificate_generated = generated_certificates.get(item.user.id, '')
        result.append({'id': item.id, 'user_id': item.user.id, 'user_name': unicode(item.user.username), 'user_email': unicode(item.user.email), 'course_id': unicode(item.course_id), 'created': item.created.strftime('%B    %d,    %Y'), 'certificate_generated': (certificate_generated and certificate_generated.strftime('%B    %d,    %Y')), 'notes': unicode((item.notes or ''))})
    return result
