diff --git a/frontend/src/components/LiveClass.vue b/frontend/src/components/LiveClass.vue
index aae328c8..34ab5627 100644
--- a/frontend/src/components/LiveClass.vue
+++ b/frontend/src/components/LiveClass.vue
@@ -54,8 +54,8 @@
- {{ formatTime(cls.time) }} -
- {{ dayjs(getClassEnd(cls)).format('HH:mm A') }}
+ {{ dayjs(getClassStart(cls)).format('hh:mm A') }} -
+ {{ dayjs(getClassEnd(cls)).format('hh:mm A') }}
{
return true
}
+const getClassStart = (cls) => {
+ return new Date(`${cls.date}T${cls.time}`)
+}
+
const getClassEnd = (cls) => {
- const classStart = new Date(`${cls.date}T${cls.time}`)
+ const classStart = getClassStart(cls)
return new Date(classStart.getTime() + cls.duration * 60000)
}
diff --git a/lms/lms/doctype/lms_live_class/lms_live_class.py b/lms/lms/doctype/lms_live_class/lms_live_class.py
index 2f77eef1..5a54c56a 100644
--- a/lms/lms/doctype/lms_live_class/lms_live_class.py
+++ b/lms/lms/doctype/lms_live_class/lms_live_class.py
@@ -38,8 +38,12 @@ class LMSLiveClass(Document):
def add_event_participants(self, event, calendar):
participants = frappe.get_all("LMS Batch Enrollment", {"batch": self.batch_name}, pluck="member")
+ instructors = frappe.get_all("Course Instructor", {"parent": self.batch_name}, pluck="instructor")
participants.append(frappe.session.user)
+ participants.extend(instructors)
+ participants = list(set(participants))
+
for participant in participants:
frappe.get_doc(
{