feat: learning modes

This commit is contained in:
pateljannat
2021-06-18 18:31:10 +05:30
parent dc7eabefb9
commit eb435261fe
19 changed files with 115 additions and 72 deletions

View File

@@ -57,11 +57,13 @@ frappe.ready(() => {
window.location.href = `/login?redirect-to=/courses/${course}`;
return;
}
batch = decodeURIComponent($(e.currentTarget).attr("data-batch"))
var batch = $(e.currentTarget).attr("data-batch");
batch = batch ? decodeURIComponent(batch) : "";
frappe.call({
"method": "community.lms.doctype.lms_batch_membership.lms_batch_membership.create_membership",
"args": {
"batch": batch
"batch": batch ? batch : "",
"course": course
},
"callback": (data) => {
if (data.message == "OK") {