Sessions and calendar 2#23
Draft
muhammadammar-ma wants to merge 11 commits into
Draft
Conversation
Phase 1 frontend branching for the single-Zoom model: - CalendarView: SessionPopover and DayPopover render Public/Gated badges, admin "Promote to public" button, and learner CTAs gated by create_zoom_meeting + my_request. Threads onPromoteSession through MonthGrid/WeekGrid/TimeGrid/DayCell. - CalendarPage: handlePromoteSession PATCHes create_zoom_meeting and refreshes after confirm. - SessionList (admin): Public Zoom / Gated Zoom badge per row plus "Promote to public" button on gated sessions. - StudentSessionList (learner): Join Meeting on public Zoom, Join Remote on approved gated, Request CTA otherwise. Mounts SessionRequestModal. Allows leave requests on public-Zoom rows. - SessionRequestModal: defaults to LEAVE when remote_zoom radio is disabled so the user doesn't land on a disabled option. - Hide redundant "Remote approved" badge after a session is promoted to public — learner can already join, badge is noise.
…dges
Backend Phase 2 drops the instructor role; mirror it here by removing
USER_ROLE.INSTRUCTOR and the `userRole === 'instructor'` branches in
CalendarView / CalendarPage / SessionList.
Phase 2.1 UX: introduce ScopeBadge — a single Badge + info-icon +
tooltip component rendered in three places (list, session popover,
day popover). Replaces the jargon labels ("Public Zoom" / "Gated Zoom" /
"Manual Session") with plain language ("Open to all learners" /
"Approved learners only" / "In-person") and an on-hover definition so
non-tech-savvy admins can tell the scopes apart.
Drop the "Promote to public" button + handlers. The edit modal's
`create_zoom_meeting` checkbox already handles the flag flip and
auto-approval — two entry points were redundant.
- Add sessions-admin area at /sessions/:programId/{calendar,requests,attendance}
with shared SessionsAdminLayout (HeaderSlot, ProgramSelector, SectionNav).
- Silent landing at /sessions auto-redirects to the first program's calendar;
legacy /sessions/calendar redirects into the resolver.
- Wire CalendarPage into the shell — chrome stripped from CalendarPage so the
shell owns HeaderSlot/FooterSlot exactly once.
- ProgramSelector renders the program name as a heading when there's only one
program, or a styled <select> chip when 2+ — same visual weight either way.
Label switches between "Program" and "Select a program" by mode.
- Add USER_ROLE.INSTRUCTOR plus an InstructingBadge component; surface the
badge in CalendarView popovers and SessionList rows when the backend
reports user_role === "instructor" for a session.
- Move sessions-admin route paths and Route declarations into
sessions-admin/routes.tsx so src/constants.ts and src/index.jsx no longer
reference any sessions-admin path or component.
Replace the sessions-admin Requests placeholder with a role-aware switch: admins see the cross-course review queue (existing StudentRequestsTab with no courseId filter); learners see their own requests across all sessions via a new MyRequestsView using GET /session-requests/me/. Add server-side pagination to both views and the per-course reviewer tab. DataTable runs in `manualPagination` mode, refetching on each page change. The api helpers `getSessionRequests` / `getMySessionRequests` now accept `page` and `pageSize` params (backwards-compatible — omitting keeps old behaviour). The calendar hydration callsite passes pageSize=200 so the visible window's request badges stay accurate now that /me/ paginates.
Two threads of sessions/calendar work.
Attendance tab (6C polish):
- Sessions pill: client-side DataTable pagination + title/course search
- View/Mark roster: replace raw <table> with Paragon DataTable;
status counts surface as Badges
- New reports/ subtree (PerSessionReport, PerLearnerHistoryReport,
CourseSummaryReport) wired into sessions-admin routes
- Replace native Form.Control selects with the SearchableSelect
primitive across all report filters; constrain widths to ~360-480px
in flex rows
Calendar cancel feature (Phase 8):
- cancelSession(courseId, sessionId) helper PATCHes {status:'cancelled'}
- Cancel button (amber, EventBusy icon) added between Edit and Delete
in SessionPopover and DayPopover; onCancelSession plumbed through
the CalendarView component tree
- CalendarPage cancel modal mirroring the Delete state machine
- Admin action row (Edit + Cancel + Delete) gated on
status==='scheduled' AND scheduled_start_time > now — past,
in-progress, completed, and cancelled sessions are read-only in
the UI
- Auth gate: redirect unauthenticated users to LMS sign-in before
rendering any sessions-admin route. New AuthGate component (uses
redirectToLogin from @edx/frontend-platform/auth) wraps both
SessionsLanding and the layout-shelled routes.
- Block past sessions on create / edit: ScheduleMeetingModal.validate()
rejects scheduled_start_time <= now, matching the backend guard added
alongside.
- Allow weekend recurrence: ALL_WEEK_DAYS now includes Sun (1) and
Sat (7); dropped Mon-Fri clamp in getZoomWeekdayFromDate; weekly_days
filter loosened from 2..6 to 1..7. Daily-mode summary fixed from
"Every weekday (Mon-Fri)" to "Every day".
- 24-hour calendar: START_HOUR=0, END_HOUR=24 in CalendarView so the
week/day grid spans midnight to midnight.
- Toolbar: Today button moved between the prev/next chevrons.
- Search affordance in every SearchableSelect — Form.Control
leadingElement for single-select, inline <Icon src={Search}>
prepended to the chip-input row for multi-select. Matches the
Sessions pill search field.
- Help text under each report's heading (Per-Session, Per-Learner,
Course Summary) so admins know what each report does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.