def certificate_downloadable_status(student, course_key):
 current_status = certificate_status_for_student(student, course_key)
 response_data = {'is_downloadable': False, 'is_generating': (True if (current_status['status'] in [CertificateStatuses.generating, CertificateStatuses.error]) else False), 'is_unverified': (True if (current_status['status'] == CertificateStatuses.unverified) else False), 'download_url': None, 'uuid': None}
 if (current_status['status'] == CertificateStatuses.downloadable):
  response_data['is_downloadable'] = True
  response_data['download_url'] = (current_status['download_url'] or get_certificate_url(student.id, course_key))
  response_data['uuid'] = current_status['uuid']
 return response_data

def certificate_downloadable_status ( student , course_key ) : current_status = certificate_status_for_student ( student , course_key ) response_data = { 'is_downloadable' : False , 'is_generating' : ( True if ( current_status [ 'status' ] in [ CertificateStatuses . generating , CertificateStatuses . error ] ) else False ) , 'is_unverified' : ( True if ( current_status [ 'status' ] == CertificateStatuses . unverified ) else False ) , 'download_url' : None , 'uuid' : None } if ( current_status [ 'status' ] == CertificateStatuses . downloadable ) : response_data [ 'is_downloadable' ] = True response_data [ 'download_url' ] = ( current_status [ 'download_url' ] or get_certificate_url ( student . id , course_key ) ) response_data [ 'uuid' ] = current_status [ 'uuid' ] return response_data
check the student existing certificates against a given course .