diff --git a/lms/lms/doctype/lms_certificate/lms_certificate.json b/lms/lms/doctype/lms_certificate/lms_certificate.json
index 39206779..8033cd8f 100644
--- a/lms/lms/doctype/lms_certificate/lms_certificate.json
+++ b/lms/lms/doctype/lms_certificate/lms_certificate.json
@@ -8,6 +8,7 @@
"course",
"member",
"member_name",
+ "published",
"column_break_3",
"issue_date",
"expiry_date",
@@ -60,11 +61,17 @@
"in_standard_filter": 1,
"label": "Batch",
"options": "LMS Batch"
+ },
+ {
+ "default": "0",
+ "fieldname": "published",
+ "fieldtype": "Check",
+ "label": "Publish on Participant Page"
}
],
"index_web_pages_for_search": 1,
"links": [],
- "modified": "2023-08-29 15:23:08.637215",
+ "modified": "2023-09-13 11:03:23.479255",
"modified_by": "Administrator",
"module": "LMS",
"name": "LMS Certificate",
diff --git a/lms/patches.txt b/lms/patches.txt
index b8e25bf8..19f9a649 100644
--- a/lms/patches.txt
+++ b/lms/patches.txt
@@ -67,4 +67,5 @@ lms.patches.v1_0.rename_lms_batch_doctype
lms.patches.v1_0.rename_lms_batch_membership_doctype
lms.patches.v1_0.rename_lms_class_to_lms_batch
lms.patches.v1_0.rename_classes_in_navbar
-lms.patches.v1_0.publish_batches
\ No newline at end of file
+lms.patches.v1_0.publish_batches
+lms.patches.v1_0.publish_certificates
\ No newline at end of file
diff --git a/lms/patches/v1_0/publish_certificates.py b/lms/patches/v1_0/publish_certificates.py
new file mode 100644
index 00000000..71e5861f
--- /dev/null
+++ b/lms/patches/v1_0/publish_certificates.py
@@ -0,0 +1,8 @@
+import frappe
+
+
+def execute():
+ certificates = frappe.get_all("LMS Certificate", pluck="name")
+
+ for certificate in certificates:
+ frappe.db.set_value("LMS Certificate", certificate, "published", 1)
diff --git a/lms/www/batches/index.html b/lms/www/batches/index.html
index 21178371..d05bf6f5 100644
--- a/lms/www/batches/index.html
+++ b/lms/www/batches/index.html
@@ -174,7 +174,7 @@