# 7. Maintenance & Operations

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 7. Maintenance & Operations

### 7.1 Maintenance Mode
**What it does:** Takes the platform (or a defined scope of it) into maintenance mode: user access is paused with a clear maintenance message while the Super Administrator (and authorized staff) perform updates or repairs. It supports scheduled and emergency maintenance, with a controlled entry and exit, an authorized-access path for staff, and user communication.

**Sub-features:**
- Enable maintenance mode (platform-wide or a defined scope)
- Maintenance message: the user-facing notice shown during maintenance
- Scheduled maintenance: set a window in advance with a pre-notification
- Emergency maintenance: enable immediately with the message
- Authorized access: staff/Super Admin can access during maintenance (bypass path)
- Exit: end maintenance and restore normal access
- User communication: pre-notification for scheduled, the message during, and a restoration notice
- Audit logging of maintenance mode entry and exit

**Super Administrator User Journey:**
1. A platform update is planned for a low-traffic window. Super Admin schedules the maintenance: sets the window, writes the maintenance message, and enables the pre-notification (users are told in advance).
2. At the window, Super Admin enables maintenance mode. User access is paused; the maintenance message is shown to anyone who tries to log in or use the platform.
3. Authorized staff (including the Super Admin) use the bypass path to access the platform for the update work.
4. Performs the update/repair, verifying the changes in the maintenance window.
5. Ends maintenance mode; normal access is restored immediately, and the restoration notice is sent.
6. For an emergency issue (a critical fault), Super Admin enables maintenance mode immediately with the message, performs the urgent fix, and exits — the entry and exit are both logged.
7. Reviews the maintenance log: each window shows the start, end, the message, the scope, and the acting admin.
8. The maintenance mode entry and exit are audit-logged with the scope, message, and timestamps.

**Rules & Edge Cases:**
- Maintenance mode pauses user access with a clear message; it is not a silent outage.
- Scheduled maintenance pre-notifies users; emergency maintenance is immediate with the message shown.
- Authorized staff retain access during maintenance via the bypass path; the bypass is itself controlled and logged.
- Exit restores access immediately; there is no lingering maintenance state.
- The scope is explicit (platform-wide or defined); a scoped maintenance does not affect out-of-scope surfaces.
- Maintenance entry and exit are audit-logged with the scope, message, and timestamps.

### 7.2 Banner Announcements and Popup Messages
**What it does:** Displays proactive messages to users: persistent banner announcements (e.g., a scheduled downtime notice, a new-feature highlight) and one-time popup messages (e.g., a welcome or a critical notice). The Super Administrator creates, schedules, and targets these messages so users are informed without individual communication.

**Sub-features:**
- Banner announcements: persistent messages shown in the interface, with start/end times
- Popup messages: one-time messages shown on next login/visit, dismissible
- Targeting: all users or a segment (by type, institute, or status)
- Scheduling: start and end times for the message's visibility
- Priority/styling: the message's prominence (info, warning, critical)
- Dismissal handling: a popup is shown once per user; a banner persists until its end time
- Audit logging of message creation, scheduling, and removal

**Super Administrator User Journey:**
1. A scheduled maintenance is in 2 days. Super Admin creates a banner announcement: "Scheduled maintenance on [date/time] — brief downtime expected," with the start (now) and end (after the maintenance) times, targeted to all users, styled as info.
2. Saves; the banner appears in users' interfaces from now until the end time.
3. For a critical notice (a security advisory), Super Admin creates a popup message styled as critical, targeted to all users, shown on next login.
4. A user logs in and sees the critical popup; they read and dismiss it. It is not shown to them again (one-time per user).
5. For a segment-targeted message (a new feature for a specific institute's staff), Super Admin targets the institute's staff; only they see it.
6. Reviews the active messages: the banner and popups with their targeting, timing, and styling are as intended.
7. Removes the banner early (the maintenance is moved); it disappears from interfaces immediately.
8. The message creation, scheduling, targeting, and removal are audit-logged with the acting admin and timestamps.

**Rules & Edge Cases:**
- A banner persists from its start to its end time; a popup is shown once per user and then dismissed permanently for them.
- Targeting is explicit: a message reaches all users or the defined segment, not an accidental subset.
- Styling matches the message's importance (info, warning, critical); a critical message is visually distinct.
- A message can be removed early; removal takes effect immediately.
- Scheduling is honored: a message is not visible outside its start/end window.
- Message creation, scheduling, targeting, and removal are audit-logged with the acting admin and timestamps.

### 7.3 Scheduled Notifications
**What it does:** Sends notifications to users at scheduled times — for example, a reminder before a deadline, a periodic digest, or a timed announcement — as opposed to the event-driven notifications elsewhere. The Super Administrator creates and manages scheduled notifications with a defined audience, content, and send time, and can preview, send, and cancel them.

**Sub-features:**
- Scheduled notification creation: audience, content, channel(s), and send time
- Audience targeting: all users or a segment (by type, institute, status, or list)
- Channel selection from the configured channels (per the notification settings)
- Preview before scheduling (content and audience summary)
- Send-time scheduling with a status (scheduled, sent, cancelled)
- Cancellation of a scheduled notification before its send time
- Audit logging of scheduled notification creation, send, and cancellation

**Super Administrator User Journey:**
1. A course deadline is in 3 days for a cohort. Super Admin creates a scheduled notification: audience = the cohort, content = the deadline reminder, channel = push (per the defaults), send time = 24 hours before the deadline.
2. Previews the notification: the content renders correctly and the audience summary shows the cohort size.
3. Schedules it; the status is "scheduled" with the send time.
4. At the send time, the notification is delivered to the cohort via the configured channel; the status moves to "sent".
5. For a periodic digest (a weekly summary for institute admins), Super Admin sets the recurring schedule; it sends on cadence.
6. When a plan changes (the deadline moves), Super Admin cancels the pending scheduled notification before its send time; the status moves to "cancelled" and nothing is sent.
7. Reviews the scheduled notification list: the scheduled, sent, and cancelled items with their audiences, times, and statuses.
8. The creation, send, and cancellation are audit-logged with the audience, content, channel, time, and the acting admin.

**Rules & Edge Cases:**
- A scheduled notification sends only at its defined time to its defined audience; it is not event-driven.
- The preview shows the content and audience before scheduling, so a mis-targeted send is caught early.
- Cancellation before the send time prevents the send; a cancelled notification is not delivered.
- Channels are selected from the configured set (per the notification settings); a channel capability check applies at send.
- The status (scheduled, sent, cancelled) is tracked and visible for each notification.
- Scheduled notification creation, send, and cancellation are audit-logged with the acting admin and timestamps.
