Skip to content

Commit

Permalink
Merge pull request #1007 from pateljannat/fix-notification
Browse files Browse the repository at this point in the history
fix: certificate request creation email
  • Loading branch information
pateljannat authored Sep 6, 2024
2 parents bd94890 + 050084e commit 9d2ef49
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,12 @@ def send_notification(self):
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(
Expand Down
Empty file.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion lms/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions lms/patches/v2_0/delete_certificate_request_notification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import frappe


def execute():
frappe.db.delete("Notification", "Certificate Request Creation")
5 changes: 4 additions & 1 deletion lms/templates/emails/certificate_request_notification.html
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 9d2ef49

Please sign in to comment.