fix: enrollment in restricted courses by admin

This commit is contained in:
Jannat Patel
2025-12-18 14:59:37 +05:30
parent dc724831c3
commit 46d13d65c1
2 changed files with 17 additions and 32 deletions

View File

@@ -220,8 +220,12 @@ function enrollStudent() {
window.location.href = `/login?redirect-to=${window.location.pathname}`
}, 500)
} else {
call('lms.lms.doctype.lms_enrollment.lms_enrollment.create_membership', {
course: props.course.data.name,
call('frappe.client.insert', {
doc: {
doctype: 'LMS Enrollment',
course: props.course.data.name,
member: user.data.name,
},
})
.then(() => {
capture('enrolled_in_course', {