diff --git a/lms/www/batches/batch_details.js b/lms/www/batches/batch_details.js index 865fbcd6..9e1eeeb5 100644 --- a/lms/www/batches/batch_details.js +++ b/lms/www/batches/batch_details.js @@ -60,6 +60,10 @@ const show_course_modal = (e) => { const enroll_batch = (e) => { let batch_name = $(".class-details").data("batch"); + if (frappe.session.user == "Guest") { + window.location.href = + "/login?redirect-to=/batches/details/" + batch_name; + } frappe.call({ method: "lms.lms.doctype.batch_student.batch_student.enroll_batch", args: {