def regenerate_user_certificates(student, course_key, course=None, forced_grade=None, template_file=None, insecure=False):
 xqueue = XQueueCertInterface()
 if insecure:
  xqueue.use_https = False
 generate_pdf = (not has_html_certificates_enabled(course_key, course))
 return xqueue.regen_cert(student, course_key, course=course, forced_grade=forced_grade, template_file=template_file, generate_pdf=generate_pdf)

def regenerate_user_certificates ( student , course_key , course = None , forced_grade = None , template_file = None , insecure = False ) : xqueue = XQueueCertInterface ( ) if insecure : xqueue . use_https = False generate_pdf = ( not has_html_certificates_enabled ( course_key , course ) ) return xqueue . regen_cert ( student , course_key , course = course , forced_grade = forced_grade , template_file = template_file , generate_pdf = generate_pdf )
it will add the regen-cert request into the xqueue .