Collection Certificate Generator

'collection-certificate-generator' job is used to generate certificates.

Configuration variables:

VariableDefault ValuePurpose

kafka.input.topic

{{env}}.generate.certificate.request

Kafka topic from which messages/events are read to be processed.

kafka.output.failed.topic

{{env}}.generate.certificate.failed

Kafka topic to which message is written when an exception occurs while processing an event.

kafka.output.audit.topic

{{env}}.telemetry.raw

Kakfa topic to which and audit message is written to.

kafka.groupId

{{env}}-certificate-generator-group

Kafka input topic group Id

lms-cassandra.keyspace

sunbird_courses

Cassandra keyspace name

lms-cassandra.course_batch.table

course_batch

Cassandra table used to store batch details of a collection. Batch status, start date , end date , batch enrolment end date, enrolment type (open/invite-only), certificate templates etc are stored in this table.

lms-cassandra.user_enrolments.table

user_enrolments

Cassandra table used to store user enrolment data in a collection of a particular batch. This also holds the consumption progress, enrolment status and issued certificate details

lms-cassandra.sbkeyspace

sunbird

Sunbird Keyspace

lms-cassandra.certreg.table

cert_registry

Cassandra table used to store user certificates (old format)

task.rc.badcharlist

\x00,\\aaa,\aaa,Ø,Ý

service.content.basePath

Content service URL

service.learner.basePath

User-Org service URL

service.enc.basePath

Encryption service base path

service.rc.basePath

Sunbird RC base path

service.rc.entity

TrainingCertificate

variable used to specify sunbird RC API endpoint for certificate

enable.rc.certificate

true

variable used to enable RC certificate generation

enable.suppress.exception

true

Variable used to suppress exception if the signatory list is empty

cloud_storage_base_url

variable to identify the cloud storage base url. Used to replace the base url with variable mentioned in cloud_store_base_path_placeholder while storing to databases

cloud_store_base_path_placeholder

CLOUD_BASE_PATH

relative variable used to replace cloud storage base urls and stored in database

content_cloud_storage_container

cloud storage container name

cloud_storage_cname_url

variable used to replace 'cloud_store_base_path_placeholder' value with cname or cloud storage url while reading data from database.

Sample event:

{
  "eid": "BE_JOB_REQUEST",
  "ets": 1563788371969,
  "mid": "LMS.1563788371969.590c5fa0-0ce8-46ed-bf6c-681c0a1fdac8",
  "actor": {
    "type": "System",
    "id": "Certificate Generator"
  },
  "context": {
    "pdata": {
      "ver": "1.0",
      "id": "org.sunbird.platform"
    }
  },
  "object": {
    "type": "GenerateCertificate",
    "id": "874ed8a5-782e-4f6c-8f36-e0288455901e"
  },
  "edata": {
    "userId": "user001",
    "svgTemplate": "https://ntpstagingall.blob.core.windows.net/user/cert/File-01311849840255795242.svg",
    "templateId": "template_01_dev_001",
    "courseName": "new course may23",
    "data": [
      {
        "recipientName": "Creation ",
        "recipientId": "user001"
      }
    ],
    "name": "100PercentCompletionCertificate",
    "tag": "0125450863553740809",
    "issuer": {
      "name": "Gujarat Council of Educational Research and Training",
      "url": "https://gcert.gujarat.gov.in/gcert/",
      "publicKey": [
        "1",
        "2"
      ]
    },
    "signatoryList": [
      {
        "name": "CEO Gujarat",
        "id": "CEO",
        "designation": "CEO",
        "image": "https://cdn.pixabay.com/photo/2014/11/09/08/06/signature-523237__340.jpg"
      }
    ],
    "criteria": {
      "narrative": "course completion certificate"
    },
    "basePath": "https://dev.sunbirded.org/certs",
    "related": {
      "type": "course",
      "batchId": "0131000245281587206",
      "courseId": "do_11309999837886054415"
    }
  }
}

Source code:

Last updated