fix: redirect from batch/details to batch

This commit is contained in:
Jannat Patel
2026-02-18 15:36:55 +05:30
parent 24bfe69985
commit 8ab6776fa9
12 changed files with 17 additions and 624 deletions

View File

@@ -50,7 +50,7 @@ frappe.ui.form.on("LMS Batch", {
refresh: (frm) => {
const lmsPath = frappe.boot.lms_path || "lms";
frm.add_web_link(
`/${lmsPath}/batches/details/${frm.doc.name}`,
`/${lmsPath}/batches/${frm.doc.name}`,
"See on website"
);
},

View File

@@ -165,7 +165,7 @@ def send_email_notification_for_published_batch(batch):
"medium": batch.medium,
"timezone": batch.timezone,
"instructors": instructors,
"batch_url": frappe.utils.get_url(get_lms_route(f"batches/details/{batch.name}")),
"batch_url": frappe.utils.get_url(get_lms_route(f"batches/{batch.name}")),
}
frappe.sendmail(
@@ -194,7 +194,7 @@ def send_system_notification_for_published_batch(batch):
"document_name": batch.name,
"from_user": instructors[0] if instructors else None,
"type": "Alert",
"link": get_lms_route(f"batches/details/{batch.name}"),
"link": get_lms_route(f"batches/{batch.name}"),
}
)
make_notification_logs(notification, students)