fix: certificate request creation email
This commit is contained in:
@@ -124,14 +124,12 @@ class LMSCertificateRequest(Document):
|
||||
template = "certificate_request_notification"
|
||||
|
||||
args = {
|
||||
"course": frappe.db.get_value("LMS Course", self.course, "title"),
|
||||
"timezone": frappe.db.get_value("LMS Batch", self.batch_name, "timezone")
|
||||
if self.batch_name
|
||||
else "",
|
||||
"course": self.course_title,
|
||||
"timezone": self.timezone if self.batch_name else "",
|
||||
"date": format_date(self.date, "medium"),
|
||||
"member_name": self.member_name,
|
||||
"start_time": format_time(self.start_time, "short"),
|
||||
"evaluator": frappe.db.get_value("User", self.evaluator, "full_name"),
|
||||
"evaluator": self.evaluator_name,
|
||||
}
|
||||
|
||||
frappe.sendmail(
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<p> {{ _("Hey {0}").format(doc.member_name) }} </p>
|
||||
<br>
|
||||
<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(doc.course_title, frappe.utils.format_date(doc.date, "medium"), frappe.utils.format_time(doc.start_time, "short"), doc.timezone) }}</p>
|
||||
<br>
|
||||
<p> {{ _("{0} is your evaluator").format(doc.evaluator_name) }} </p>
|
||||
<br>
|
||||
<p> {{ _("Please prepare well and be on time for the evaluations.") }} </p>
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"attach_print": 0,
|
||||
"channel": "Email",
|
||||
"creation": "2022-06-03 11:02:34.579145",
|
||||
"days_in_advance": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Notification",
|
||||
"document_type": "LMS Certificate Request",
|
||||
"enabled": 1,
|
||||
"event": "New",
|
||||
"idx": 0,
|
||||
"is_standard": 1,
|
||||
"message": "<p> {{ _(\"Hey {0}\").format(doc.member_name) }} </p>\n<br>\n<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(doc.course_title, frappe.utils.format_date(doc.date, \"medium\"), frappe.utils.format_time(doc.start_time, \"short\"), doc.timezone) }}</p>\n<br>\n<p> {{ _(\"{0} is your evaluator\").format(doc.evaluator_name) }} </p>\n<br>\n<p> {{ _(\"Please prepare well and be on time for the evaluations.\") }} </p>\n",
|
||||
"message_type": "HTML",
|
||||
"modified": "2024-09-05 16:33:01.533349",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Certificate Request Creation",
|
||||
"owner": "Administrator",
|
||||
"recipients": [
|
||||
{
|
||||
"receiver_by_document_field": "member"
|
||||
},
|
||||
{
|
||||
"receiver_by_document_field": "evaluator"
|
||||
},
|
||||
{
|
||||
"receiver_by_role": "Frappe School Admin"
|
||||
}
|
||||
],
|
||||
"send_system_notification": 0,
|
||||
"send_to_all_assignees": 0,
|
||||
"subject": "Your evaluation slot has been booked"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def get_context(context):
|
||||
# do your magic here
|
||||
pass
|
||||
@@ -89,4 +89,5 @@ lms.patches.v1_0.change_navbar_urls
|
||||
lms.patches.v1_0.set_published_on
|
||||
lms.patches.v2_0.fix_progress_percentage
|
||||
lms.patches.v2_0.add_discussion_topic_titles
|
||||
lms.patches.v2_0.sidebar_settings
|
||||
lms.patches.v2_0.sidebar_settings
|
||||
lms.patches.v2_0.delete_certificate_request_notification
|
||||
@@ -0,0 +1,4 @@
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.db.delete("Notification", "Certificate Request Creation")
|
||||
@@ -1,4 +1,7 @@
|
||||
<p> {{ _("Hey {0}").format(member_name) }} </p>
|
||||
<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(title, date, start_time, timezone) }}</p>
|
||||
<br>
|
||||
<p> {{ _('Your evaluation for the course {0} has been scheduled on {1} at {2} {3}.').format(course, date, start_time, timezone) }}</p>
|
||||
<br>
|
||||
<p> {{ _("Your evaluator is {0}").format(evaluator) }} </p>
|
||||
<br>
|
||||
<p> {{ _("Please prepare well and be on time for the evaluations.") }} </p>
|
||||
|
||||
Reference in New Issue
Block a user