feat: live class list display

This commit is contained in:
Jannat Patel
2023-03-03 15:15:49 +05:30
parent e6096bf9ed
commit bb0f3d5962
5 changed files with 70 additions and 36 deletions

View File

@@ -28,6 +28,14 @@ def get_context(context):
"Class Student", {"parent": class_name}, ["student", "student_name", "username"]
)
context.is_moderator = has_course_moderator_role()
context.live_classes = frappe.get_all(
"LMS Live Class",
{"class": class_name},
["title", "description", "time", "date", "start_url", "join_url"],
)
for student in class_students:
if student.student == frappe.session.user:
session_user.append(student)
@@ -38,5 +46,3 @@ def get_context(context):
context.class_students = session_user + remaining_students
else:
context.class_students = class_students
context.is_moderator = has_course_moderator_role()