fix: api and orm
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||
<div class="lesson-page">
|
||||
|
||||
<h2 class="title {% if course.is_mentor(frappe.session.user) %} is_mentor {% endif %}" data-name="{{ lesson.name }}">{{ lesson.title }}</h2>
|
||||
<h2 class="title {% if course.is_mentor(frappe.session.user) %} is_mentor {% endif %}" data-name="{{ lesson.name }}" data-batch="{{ batch.name }}">{{ lesson.title }}</h2>
|
||||
|
||||
{% for s in lesson.get_sections() %}
|
||||
<div class="section section-{{ s.type }}">
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
frappe.ready(() => {
|
||||
console.log($(".title").hasClass("is_mentor"))
|
||||
if (!$(".title").hasClass("is_mentor")) {
|
||||
frappe.call({
|
||||
method: "community.lms.doctype.lesson.lesson.save_progress",
|
||||
args: {
|
||||
lesson: $(".title").attr("data-name")
|
||||
lesson: $(".title").attr("data-name"),
|
||||
batch: $(".title").attr("data-batch")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user