> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kralis.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Attendance and Session History

> How Classroom derives attendance from verified presence and preserves every room run.

Classroom attendance is based on the time a participant is actually connected to the live room. Merely opening an event, requesting admission, or being expected does not count as attendance.

## Expected and actual attendance

For scheduled invite-only and class-audience events, Kralis snapshots the expected audience when the event starts. The snapshot includes:

* the creator;
* directly granted users;
* current members of granted collaboration groups; and
* students in the selected class and optional section.

This snapshot is necessary to record a true **absent** result for someone who never joins. Later class or group changes do not rewrite the original roster. Users explicitly added while the event is live can be appended to the expected roster.

Instant and school-wide events still track everyone who joins, but they do not create a potentially huge absence roster for every school user.

## Attendance time

Kralis records join and leave activity for each participant and live session. Reconnecting creates another attendance period without losing the time already recorded.

When calculating duration, Kralis:

1. clamps each interval to the event’s attendance window;
2. treats an open interval as continuing up to the calculation time;
3. merges overlapping intervals to prevent double counting;
4. sums the merged duration;
5. updates first join, last leave, total duration, and join count.

For scheduled events, the attendance window is the planned start-to-end window. For instant events, it is the actual event/session window.

## Attendance statuses

| Status  | Meaning                                                                                    |
| ------- | ------------------------------------------------------------------------------------------ |
| Present | Duration meets the minimum percentage and first join was not late                          |
| Late    | Duration meets the minimum percentage, but first join was after the configured late cutoff |
| Partial | The user joined, but duration was below the minimum percentage                             |
| Absent  | The expected user accumulated no attendance duration                                       |
| Excused | A manager applied an explicit manual override                                              |

The calculated percentage and evidence remain available even when a manager overrides the displayed status.

## Manager attendance workflow

From an event details page, an event manager can open the attendance page to:

* see joined and expected counts;
* search and paginate the roster;
* review first join, duration, percentage, status, and source;
* set a manual status with a required reason;
* clear an override and return to the calculated result.

Every override and clear operation writes an audit event containing the actor, participant, event, status, and reason.

## Student attendance view

Students can see their own read-only attendance for a visible event, including status, joined time, duration, and percentage. Students cannot mark themselves present or change their recorded attendance activity.

## Session history

An event can have more than one Classroom session. Each session records:

* its sequence number;
* pending, starting, live, ended, or failed state;
* actual start and end;
* configured capacity;
* presentation state; and
* recordings and presence associated with that run.

If an event has more than one live run, the event page presents them as a timeline rather than combining them into one record.

## Event completion

When an event ends, Kralis closes active attendance periods, finishes the live session, recalculates attendance, and closes remaining waiting-room requests. Scheduled events receive the same final attendance processing when their time expires.
