Merge pull request #1768 from pateljannat/issues-136

fix: misc zoom issues
This commit is contained in:
Jannat Patel
2025-10-10 11:48:47 +05:30
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@@ -146,7 +146,10 @@ def create_live_class(
auto_recording,
description=None,
):
frappe.only_for("Moderator")
instructors = frappe.get_all(
"Course Instructor", {"parenttype": "LMS Batch", "parent": batch_name}, pluck="instructor"
)
payload = {
"topic": title,
"start_time": format_datetime(f"{date} {time}", "yyyy-MM-ddTHH:mm:ssZ"),
@@ -155,6 +158,9 @@ def create_live_class(
"private_meeting": True,
"auto_recording": "none" if auto_recording == "No Recording" else auto_recording.lower(),
"timezone": timezone,
"settings": {
"alternative_hosts": ";".join(instructors) if instructors else "",
},
}
headers = {
"Authorization": "Bearer " + authenticate(zoom_account),

View File

@@ -29,6 +29,7 @@ class LMSLiveClass(Document):
{
"doctype": "Event",
"subject": f"Live Class on {self.title}",
"event_type": "Public",
"starts_on": start,
"ends_on": get_datetime(start) + timedelta(minutes=cint(self.duration)),
}
@@ -38,7 +39,9 @@ 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")
instructors = frappe.get_all(
"Course Instructor", {"parenttype": "LMS Batch", "parent": self.batch_name}, pluck="instructor"
)
participants.append(frappe.session.user)
participants.extend(instructors)