Merge pull request #117 from fossunited/lesson-progress
feat: lesson progress
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<h1 class="mt-5">{{ batch.title }}</h1>
|
||||
</div>
|
||||
<div class="course-details">
|
||||
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True) }}
|
||||
{{ widgets.CourseOutline(course=course, batch=batch, show_link=True, show_progress=True) }}
|
||||
</div>
|
||||
<div class="w-25">
|
||||
<h2>Batch Schedule</h2>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||
<div class="lesson-page">
|
||||
|
||||
<h2>{{ 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 }}">
|
||||
|
||||
11
community/www/batch/learn.js
Normal file
11
community/www/batch/learn.js
Normal file
@@ -0,0 +1,11 @@
|
||||
frappe.ready(() => {
|
||||
if (!$(".title").hasClass("is_mentor")) {
|
||||
frappe.call({
|
||||
method: "community.lms.doctype.lesson.lesson.save_progress",
|
||||
args: {
|
||||
lesson: $(".title").attr("data-name"),
|
||||
batch: $(".title").attr("data-batch")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user