'Add a task to create an example certificate.
Unlike other certificates, an example certificate is
not associated with any particular user and is never
shown to students.
If an error occurs when adding the example certificate
to the queue, the example certificate status
will be set to "error".
Arguments:
example_cert (ExampleCertificate)'

def add_example_cert(self, example_cert):

    contents = {'action': 'create', 'course_id': unicode(example_cert.course_key), 'name': example_cert.full_name, 'template_pdf': example_cert.template, 'username': example_cert.uuid, 'example_certificate': True}
    callback_url_path = reverse('certificates.views.update_example_certificate')
    try:
        self._send_to_xqueue(contents, example_cert.access_key, task_identifier=example_cert.uuid, callback_url_path=callback_url_path)
        LOGGER.info(u"Started    generating    example    certificates    for    course    '%s'.", example_cert.course_key)
    except XQueueAddToQueueError as exc:
        example_cert.update_status(ExampleCertificate.STATUS_ERROR, error_reason=unicode(exc))
        LOGGER.critical(u"Could    not    add    example    certificate    with    uuid    '%s'    to    XQueue.        The    exception    was    %s.        The    example    certificate    has    been    marked    with    status    'error'.", example_cert.uuid, unicode(exc))
