def cert_generation_enabled(course_key):
 return (CertificateGenerationConfiguration.current().enabled and CertificateGenerationCourseSetting.is_enabled_for_course(course_key))

def cert_generation_enabled ( course_key ) : return ( CertificateGenerationConfiguration . current ( ) . enabled and CertificateGenerationCourseSetting . is_enabled_for_course ( course_key ) )
check whether certificate generation is enabled for a course .