fix: show system timezone in certificate request

This commit is contained in:
Jannat Patel
2026-02-24 13:01:29 +05:30
parent 2198adf902
commit bf89f3ba2f
3 changed files with 4 additions and 12 deletions

View File

@@ -202,7 +202,7 @@ const openEvalCall = (evl) => {
const evaluationCourses = computed(() => { const evaluationCourses = computed(() => {
return props.courses.filter((course) => { return props.courses.filter((course) => {
return course.evaluator != '' return course.evaluator && course.evaluator != ''
}) })
}) })

View File

@@ -13,6 +13,7 @@ from frappe.utils import (
format_time, format_time,
get_datetime, get_datetime,
get_fullname, get_fullname,
get_system_timezone,
get_time, get_time,
getdate, getdate,
nowtime, nowtime,
@@ -118,16 +119,7 @@ class LMSCertificateRequest(Document):
def validate_timezone(self): def validate_timezone(self):
if self.timezone: if self.timezone:
return return
if self.batch_name: self.timezone = get_system_timezone()
timezone = frappe.db.get_value("LMS Batch", self.batch_name, "timezone")
if timezone:
self.timezone = timezone
return
if self.course:
timezone = frappe.db.get_value("LMS Course", self.course, "timezone")
if timezone:
self.timezone = timezone
return
def send_notification(self): def send_notification(self):
outgoing_email_account = frappe.get_cached_value( outgoing_email_account = frappe.get_cached_value(

View File

@@ -1,6 +1,6 @@
<p> {{ _("Hey {0}").format(member_name) }} </p> <p> {{ _("Hey {0}").format(member_name) }} </p>
<br> <br>
<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(course, date, start_time, timezone) }}</p> <p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} ({3} time).').format(course, date, start_time, timezone) }}</p>
<br> <br>
<p> {{ _("Your evaluator is {0}").format(evaluator) }} </p> <p> {{ _("Your evaluator is {0}").format(evaluator) }} </p>
<br> <br>