feat: live class sessions, CE workflow, and docs (#683)
Adds live-class session scheduling on lessons (join link, date/time, timezone) with automatic 24h and 1h reminder emails plus a calendar invite (.ics), a time-change notification with an updated invite, a teacher-authored welcome email and session invite on enrollment, and a "Notify students" quiz nudge. LMS gets an upcoming live-sessions card and Join buttons, plus a reusable live-session card component (3 states) in @cio/ui with a Storybook story. The sidebar content tree now reflects sequential progression locking like the content list, and the course-completion confetti regression is fixed. Org-based emails no longer reference ClassroomIO by name. Docs add live-class, welcome-email, and course-progression guides, expand the certificates guide (design, signatures, corrected labels), move plan-required callouts to the top, flatten how-to-guides to the docs root with redirects, and add screenshots. Includes an add-docs-image skill.
This commit is contained in:
@@ -2,6 +2,7 @@ import * as schema from '@db/schema';
|
||||
|
||||
import type { TCourseNewsfeed, TCourseNewsfeedComment, TNewCourseNewsfeed, TNewCourseNewsfeedComment } from '@db/types';
|
||||
import { and, db, desc, eq, lt, ne, sql } from '@db/drizzle';
|
||||
import { ROLE } from '@cio/utils/constants';
|
||||
|
||||
/**
|
||||
* Gets newsfeed items by course ID
|
||||
@@ -400,6 +401,8 @@ export async function getNewsfeedForEmail(
|
||||
organization: {
|
||||
name: string | null;
|
||||
siteName: string | null;
|
||||
avatarUrl: string | null;
|
||||
theme: string | null;
|
||||
} | null;
|
||||
courseMembers: Array<{
|
||||
email: string | null;
|
||||
@@ -431,7 +434,7 @@ export async function getNewsfeedForEmail(
|
||||
const row = result[0];
|
||||
|
||||
// Get all course members (excluding author if specified)
|
||||
const memberConditions = [eq(schema.course.id, row.course.id)];
|
||||
const memberConditions = [eq(schema.course.id, row.course.id), eq(schema.groupmember.roleId, ROLE.STUDENT)];
|
||||
if (excludeAuthorId) {
|
||||
memberConditions.push(ne(schema.groupmember.id, excludeAuthorId));
|
||||
}
|
||||
@@ -460,7 +463,9 @@ export async function getNewsfeedForEmail(
|
||||
: null,
|
||||
organization: {
|
||||
name: row.organization.name,
|
||||
siteName: row.organization.siteName
|
||||
siteName: row.organization.siteName,
|
||||
avatarUrl: row.organization.avatarUrl,
|
||||
theme: row.organization.theme
|
||||
},
|
||||
courseMembers: membersResult
|
||||
.filter((m) => m.profile?.email) // Only include members with email
|
||||
|
||||
Reference in New Issue
Block a user