Let the studio book lessons and record intake collected elsewhere
CI / Tests (PHP 8.1) (pull_request) Successful in 6m39s
CI / Tests (PHP 8.2) (pull_request) Successful in 57s
CI / Tests (PHP 8.3) (pull_request) Successful in 2m59s
CI / Tests (PHP 8.5) (pull_request) Successful in 3m31s
CI / No Debug Code (pull_request) Successful in 3s
CI / Coding Standards & Static Analysis (pull_request) Successful in 3m28s
CI / Build Plugin Zip (pull_request) Skipped

Two related gaps, closed together because the second is created by the first.

A private lesson could only be booked by the student or their guardian, so a
booking taken over the phone had no way in — where group classes have had "Add
students directly" all along. "Book a lesson for a student" is now a panel on
Scheduler and My Lessons: student, open time, lesson type, with weekly term
reservations and a no-charge option for make-up lessons. The booking core is
extracted to Booking\LessonBooker and shared with POST /bookings, so the two
paths cannot drift on offering rules, slot claiming, or billing.

That leaves a registration with no intake answers and no policy acceptances,
because nobody was at a keyboard to give them — already true of every directly
added group-class student. Ticking the boxes on a student's behalf would be an
audit trail that says something untrue, so instead the answers are collected
another way and recorded afterwards, from a lesson's or an enrolment's detail
page. Every recording must say how it was collected, which is stamped on each
row along with who typed it and shown in a new "How it was given" column: a
policy ticked online and one transcribed from paper must never look alike.

Only staff-made registrations qualify (us_lessons.booked_by,
us_group_enrollments.enrolled_by) — one the student made already holds their
own answers. Only what is still missing can be recorded, re-checked at write
time, so a stale or double-posted form cannot duplicate or overwrite. No IP is
stored for a transcription, and accepted_by stays the student while recorded_by
names the staff member.

Intake is now generic over Registration\IntakeSubject, which Lesson and
Enrollment both implement; LessonDetail became Registration\IntakeAudit and is
shared by both detail views rather than duplicated.

Closes #182

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QfHt6CyJHz6KkA4RuaS7WK
This commit is contained in:
2026-08-24 14:06:16 -03:00
co-authored by Claude Opus 5
parent 8a34ec41e9
commit 8c21a3fa9d
46 changed files with 3020 additions and 306 deletions
+190
View File
@@ -0,0 +1,190 @@
<?php
declare(strict_types=1);
if (! defined('ABSPATH')) {
exit;
}
/**
* @var array{enrollment_id: int, student: string, class: string, instructor: string, status: string, payment: string}|null $row
* @var list<array{question: string, answer: string, source: string}> $answers
* @var list<array{policy: string, version: string, accepted_at: string, ip: string, source: string}> $accepts
* @var string $baseUrl
* @var string $notice
* @var string $error
* @var array{recordable: bool, questions: list<array{id: int, label: string, required: bool}>, policies: list<array{version_id: int, policy: string, version: string}>, methods: array<string, string>} $intake
*/
?>
<div class="wrap">
<h1><?php esc_html_e('Enrolment details', 'unsupervised-schedular'); ?></h1>
<p><a href="<?php echo esc_url($baseUrl); ?>">&laquo; <?php esc_html_e('Back to group classes', 'unsupervised-schedular'); ?></a></p>
<?php if ('' !== $notice) : ?>
<div class="notice notice-success"><p><?php echo esc_html($notice); ?></p></div>
<?php endif; ?>
<?php if ('' !== $error) : ?>
<div class="notice notice-error"><p><?php echo esc_html($error); ?></p></div>
<?php endif; ?>
<?php if (null === $row) : ?>
<p><?php esc_html_e('This enrolment could not be found.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php esc_html_e('Student', 'unsupervised-schedular'); ?></th>
<td><?php echo esc_html($row['student']); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e('Class', 'unsupervised-schedular'); ?></th>
<td><?php echo esc_html($row['class']); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e('Instructor', 'unsupervised-schedular'); ?></th>
<td><?php echo esc_html($row['instructor']); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e('Enrolment', 'unsupervised-schedular'); ?></th>
<td><?php echo esc_html($row['status']); ?></td>
</tr>
<tr>
<th scope="row"><?php esc_html_e('Payment', 'unsupervised-schedular'); ?></th>
<td><?php echo esc_html($row['payment']); ?></td>
</tr>
</tbody>
</table>
<h2><?php esc_html_e('Policies accepted', 'unsupervised-schedular'); ?></h2>
<?php if (empty($accepts)) : ?>
<p><?php esc_html_e('None recorded for this enrolment.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th><?php esc_html_e('Policy', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Version', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Accepted', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('IP address', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('How it was given', 'unsupervised-schedular'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($accepts as $acceptance) : ?>
<tr>
<td><?php echo esc_html($acceptance['policy']); ?></td>
<td><?php echo esc_html($acceptance['version']); ?></td>
<td><?php echo esc_html('' !== $acceptance['accepted_at'] ? (string) mysql2date('M j, Y g:i A', $acceptance['accepted_at']) : '—'); ?></td>
<td><?php echo esc_html('' !== $acceptance['ip'] ? $acceptance['ip'] : '—'); ?></td>
<td><?php echo esc_html($acceptance['source']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<h2><?php esc_html_e('Intake answers', 'unsupervised-schedular'); ?></h2>
<?php if (empty($answers)) : ?>
<p><?php esc_html_e('None recorded for this enrolment.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th><?php esc_html_e('Question', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Answer', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('How it was given', 'unsupervised-schedular'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($answers as $answer) : ?>
<tr>
<td><?php echo esc_html($answer['question']); ?></td>
<td><?php echo esc_html($answer['answer']); ?></td>
<td><?php echo esc_html($answer['source']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if ($intake['recordable']) : ?>
<h2><?php esc_html_e('Record intake collected elsewhere', 'unsupervised-schedular'); ?></h2>
<p class="description" style="max-width:45em;">
<?php esc_html_e('The studio enrolled this student, so they were never asked these questions online. Anything collected another way — on paper, in person, over the phone — can be entered here. Each entry is stamped with how it was collected and who entered it, and nothing already recorded can be overwritten.', 'unsupervised-schedular'); ?>
</p>
<?php if (empty($intake['questions']) && empty($intake['policies'])) : ?>
<p><?php esc_html_e('Everything has been recorded for this enrolment.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
<form method="post">
<?php wp_nonce_field('usc_group_action'); ?>
<input type="hidden" name="usc_action" value="record_intake">
<?php if (! empty($intake['policies'])) : ?>
<h3><?php esc_html_e('Policies accepted elsewhere', 'unsupervised-schedular'); ?></h3>
<?php foreach ($intake['policies'] as $policy) : ?>
<p style="margin:0 0 6px;">
<label>
<input type="checkbox" name="accepted_policy_version_ids[]" value="<?php echo esc_attr((string) $policy['version_id']); ?>">
<?php echo esc_html($policy['policy'] . ' (' . $policy['version'] . ')'); ?>
</label>
</p>
<?php endforeach; ?>
<p class="description"><?php esc_html_e('Tick only what the student actually agreed to. The acceptance is recorded in their name, against the version shown.', 'unsupervised-schedular'); ?></p>
<?php endif; ?>
<?php if (! empty($intake['questions'])) : ?>
<h3><?php esc_html_e('Intake answers', 'unsupervised-schedular'); ?></h3>
<table class="form-table" role="presentation">
<?php foreach ($intake['questions'] as $question) : ?>
<tr>
<th scope="row">
<label for="usc-answer-<?php echo esc_attr((string) $question['id']); ?>">
<?php echo esc_html($question['label']); ?>
<?php if ($question['required']) : ?>
<span class="description">(<?php esc_html_e('required of students', 'unsupervised-schedular'); ?>)</span>
<?php endif; ?>
</label>
</th>
<td>
<input type="text" class="regular-text"
id="usc-answer-<?php echo esc_attr((string) $question['id']); ?>"
name="answers[<?php echo esc_attr((string) $question['id']); ?>]">
</td>
</tr>
<?php endforeach; ?>
</table>
<p class="description"><?php esc_html_e('Leave blank anything you do not have. You can come back and record the rest later.', 'unsupervised-schedular'); ?></p>
<?php endif; ?>
<h3><?php esc_html_e('How were these collected?', 'unsupervised-schedular'); ?></h3>
<table class="form-table" role="presentation">
<tr>
<th scope="row"><label for="usc-collected-via"><?php esc_html_e('Collected', 'unsupervised-schedular'); ?></label></th>
<td>
<select name="collected_via" id="usc-collected-via" required>
<option value=""><?php esc_html_e('Choose one', 'unsupervised-schedular'); ?></option>
<?php foreach ($intake['methods'] as $value => $label) : ?>
<option value="<?php echo esc_attr($value); ?>"><?php echo esc_html($label); ?></option>
<?php endforeach; ?>
</select>
<p class="description"><?php esc_html_e('Recorded against every entry below, so the audit trail never mistakes a transcription for something the student typed.', 'unsupervised-schedular'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="usc-collected-note"><?php esc_html_e('Details', 'unsupervised-schedular'); ?></label></th>
<td>
<input type="text" class="regular-text" id="usc-collected-note" name="collected_note" maxlength="191">
<p class="description"><?php esc_html_e('Optional — where the paper form is filed, who took the call. Required if you chose "Some other way".', 'unsupervised-schedular'); ?></p>
</td>
</tr>
</table>
<p>
<button type="submit" class="button button-primary"><?php esc_html_e('Record intake', 'unsupervised-schedular'); ?></button>
</p>
</form>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div>
+96 -2
View File
@@ -7,9 +7,12 @@ if (! defined('ABSPATH')) {
/**
* @var array{lesson_id: int, student: string, instructor: string, offering: string, duration: int, recurrence: string, time: string, status: string, notes: string, payment_id: int, currency: string, total: float}|null $row
* @var list<array{question: string, answer: string}> $answers
* @var list<array{policy: string, version: string, accepted_at: string, ip: string}> $accepts
* @var list<array{question: string, answer: string, source: string}> $answers
* @var list<array{policy: string, version: string, accepted_at: string, ip: string, source: string}> $accepts
* @var string $backUrl
* @var string $notice
* @var string $error
* @var array{recordable: bool, questions: list<array{id: int, label: string, required: bool}>, policies: list<array{version_id: int, policy: string, version: string}>, methods: array<string, string>} $intake
*/
?>
<div class="wrap">
@@ -17,6 +20,14 @@ if (! defined('ABSPATH')) {
<p><a href="<?php echo esc_url($backUrl); ?>">&laquo; <?php esc_html_e('Back to lessons', 'unsupervised-schedular'); ?></a></p>
<?php if ('' !== $notice) : ?>
<div class="notice notice-success"><p><?php echo esc_html($notice); ?></p></div>
<?php endif; ?>
<?php if ('' !== $error) : ?>
<div class="notice notice-error"><p><?php echo esc_html($error); ?></p></div>
<?php endif; ?>
<?php if (null === $row) : ?>
<p><?php esc_html_e('This lesson could not be found.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
@@ -81,6 +92,7 @@ if (! defined('ABSPATH')) {
<th><?php esc_html_e('Version', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Accepted', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('IP address', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('How it was given', 'unsupervised-schedular'); ?></th>
</tr>
</thead>
<tbody>
@@ -90,6 +102,7 @@ if (! defined('ABSPATH')) {
<td><?php echo esc_html($acceptance['version']); ?></td>
<td><?php echo esc_html('' !== $acceptance['accepted_at'] ? (string) mysql2date('M j, Y g:i A', $acceptance['accepted_at']) : '—'); ?></td>
<td><?php echo esc_html('' !== $acceptance['ip'] ? $acceptance['ip'] : '—'); ?></td>
<td><?php echo esc_html($acceptance['source']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
@@ -105,6 +118,7 @@ if (! defined('ABSPATH')) {
<tr>
<th><?php esc_html_e('Question', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Answer', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('How it was given', 'unsupervised-schedular'); ?></th>
</tr>
</thead>
<tbody>
@@ -112,10 +126,90 @@ if (! defined('ABSPATH')) {
<tr>
<td><?php echo esc_html($answer['question']); ?></td>
<td><?php echo esc_html($answer['answer']); ?></td>
<td><?php echo esc_html($answer['source']); ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if ($intake['recordable']) : ?>
<h2><?php esc_html_e('Record intake collected elsewhere', 'unsupervised-schedular'); ?></h2>
<p class="description" style="max-width:45em;">
<?php esc_html_e('The studio booked this lesson, so the student was never asked these questions online. Anything collected another way — on paper, in person, over the phone — can be entered here. Each entry is stamped with how it was collected and who entered it, and nothing already recorded can be overwritten.', 'unsupervised-schedular'); ?>
</p>
<?php if (empty($intake['questions']) && empty($intake['policies'])) : ?>
<p><?php esc_html_e('Everything has been recorded for this booking.', 'unsupervised-schedular'); ?></p>
<?php else : ?>
<form method="post">
<?php wp_nonce_field('usc_lesson_action'); ?>
<input type="hidden" name="usc_action" value="record_intake">
<?php if (! empty($intake['policies'])) : ?>
<h3><?php esc_html_e('Policies accepted elsewhere', 'unsupervised-schedular'); ?></h3>
<?php foreach ($intake['policies'] as $policy) : ?>
<p style="margin:0 0 6px;">
<label>
<input type="checkbox" name="accepted_policy_version_ids[]" value="<?php echo esc_attr((string) $policy['version_id']); ?>">
<?php echo esc_html($policy['policy'] . ' (' . $policy['version'] . ')'); ?>
</label>
</p>
<?php endforeach; ?>
<p class="description"><?php esc_html_e('Tick only what the student actually agreed to. The acceptance is recorded in their name, against the version shown.', 'unsupervised-schedular'); ?></p>
<?php endif; ?>
<?php if (! empty($intake['questions'])) : ?>
<h3><?php esc_html_e('Intake answers', 'unsupervised-schedular'); ?></h3>
<table class="form-table" role="presentation">
<?php foreach ($intake['questions'] as $question) : ?>
<tr>
<th scope="row">
<label for="usc-answer-<?php echo esc_attr((string) $question['id']); ?>">
<?php echo esc_html($question['label']); ?>
<?php if ($question['required']) : ?>
<span class="description">(<?php esc_html_e('required of students', 'unsupervised-schedular'); ?>)</span>
<?php endif; ?>
</label>
</th>
<td>
<input type="text" class="regular-text"
id="usc-answer-<?php echo esc_attr((string) $question['id']); ?>"
name="answers[<?php echo esc_attr((string) $question['id']); ?>]">
</td>
</tr>
<?php endforeach; ?>
</table>
<p class="description"><?php esc_html_e('Leave blank anything you do not have. You can come back and record the rest later.', 'unsupervised-schedular'); ?></p>
<?php endif; ?>
<h3><?php esc_html_e('How were these collected?', 'unsupervised-schedular'); ?></h3>
<table class="form-table" role="presentation">
<tr>
<th scope="row"><label for="usc-collected-via"><?php esc_html_e('Collected', 'unsupervised-schedular'); ?></label></th>
<td>
<select name="collected_via" id="usc-collected-via" required>
<option value=""><?php esc_html_e('Choose one', 'unsupervised-schedular'); ?></option>
<?php foreach ($intake['methods'] as $value => $label) : ?>
<option value="<?php echo esc_attr($value); ?>"><?php echo esc_html($label); ?></option>
<?php endforeach; ?>
</select>
<p class="description"><?php esc_html_e('Recorded against every entry below, so the audit trail never mistakes a transcription for something the student typed.', 'unsupervised-schedular'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="usc-collected-note"><?php esc_html_e('Details', 'unsupervised-schedular'); ?></label></th>
<td>
<input type="text" class="regular-text" id="usc-collected-note" name="collected_note" maxlength="191">
<p class="description"><?php esc_html_e('Optional — where the paper form is filed, who took the call. Required if you chose "Some other way".', 'unsupervised-schedular'); ?></p>
</td>
</tr>
</table>
<p>
<button type="submit" class="button button-primary"><?php esc_html_e('Record intake', 'unsupervised-schedular'); ?></button>
</p>
</form>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div>
+91
View File
@@ -13,11 +13,102 @@ if (! defined('ABSPATH')) {
* @var string $prevWeek
* @var string $nextWeek
* @var string $baseUrl
* @var string $notice
* @var string $error
* @var array{students: list<array{id: int, name: string}>, offerings: list<array{id: int, label: string}>, slots: list<array{id: int, label: string, weekly: bool}>} $bookForm
*/
?>
<div class="wrap">
<h1><?php esc_html_e('Lessons', 'unsupervised-schedular'); ?></h1>
<?php if ('' !== $notice) : ?>
<div class="notice notice-success"><p><?php echo esc_html($notice); ?></p></div>
<?php endif; ?>
<?php if ('' !== $error) : ?>
<div class="notice notice-error"><p><?php echo esc_html($error); ?></p></div>
<?php endif; ?>
<details class="usc-book-for-student" style="margin:12px 0;" <?php echo '' !== $error ? 'open' : ''; ?>>
<summary style="cursor:pointer; font-weight:600;"><?php esc_html_e('Book a lesson for a student', 'unsupervised-schedular'); ?></summary>
<?php if (empty($bookForm['students']) || empty($bookForm['slots'])) : ?>
<p class="description" style="margin-top:8px;">
<?php
echo empty($bookForm['students'])
? esc_html__('There are no students to book for yet.', 'unsupervised-schedular')
: esc_html__('There are no open times in the next eight weeks. Add availability first.', 'unsupervised-schedular');
?>
</p>
<?php else : ?>
<form method="post" style="margin-top:8px;">
<?php wp_nonce_field('usc_lesson_action'); ?>
<input type="hidden" name="usc_action" value="book_for_student">
<p class="description">
<?php esc_html_e('Books on the student\'s behalf, without the intake questions and policy agreements they would answer themselves.', 'unsupervised-schedular'); ?>
</p>
<table class="form-table" role="presentation">
<tr>
<th scope="row"><label for="usc-book-student"><?php esc_html_e('Student', 'unsupervised-schedular'); ?></label></th>
<td>
<select name="student_id" id="usc-book-student" required>
<option value=""><?php esc_html_e('Choose a student', 'unsupervised-schedular'); ?></option>
<?php foreach ($bookForm['students'] as $student) : ?>
<option value="<?php echo esc_attr((string) $student['id']); ?>"><?php echo esc_html($student['name']); ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="usc-book-slot"><?php esc_html_e('Time', 'unsupervised-schedular'); ?></label></th>
<td>
<select name="slot_id" id="usc-book-slot" required style="max-width:100%;">
<option value=""><?php esc_html_e('Choose an open time', 'unsupervised-schedular'); ?></option>
<?php foreach ($bookForm['slots'] as $slot) : ?>
<option value="<?php echo esc_attr((string) $slot['id']); ?>"><?php echo esc_html($slot['label']); ?></option>
<?php endforeach; ?>
</select>
</td>
</tr>
<tr>
<th scope="row"><label for="usc-book-offering"><?php esc_html_e('Lesson type', 'unsupervised-schedular'); ?></label></th>
<td>
<select name="offering_id" id="usc-book-offering" style="max-width:100%;">
<option value="0"><?php esc_html_e('Use the time\'s own lesson type', 'unsupervised-schedular'); ?></option>
<?php foreach ($bookForm['offerings'] as $offering) : ?>
<option value="<?php echo esc_attr((string) $offering['id']); ?>"><?php echo esc_html($offering['label']); ?></option>
<?php endforeach; ?>
</select>
<p class="description"><?php esc_html_e('A time already tied to a lesson type is booked as that type; a general time needs one chosen here.', 'unsupervised-schedular'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php esc_html_e('Options', 'unsupervised-schedular'); ?></th>
<td>
<label>
<input type="checkbox" name="recurrence_weekly" value="1">
<?php esc_html_e('Reserve this time weekly for the rest of the term', 'unsupervised-schedular'); ?>
</label>
<p class="description"><?php esc_html_e('Only for a time that repeats weekly. Billed upfront as one payment.', 'unsupervised-schedular'); ?></p>
<label>
<input type="checkbox" name="no_charge" value="1">
<?php esc_html_e('No charge — book it free and confirm it now', 'unsupervised-schedular'); ?>
</label>
<p class="description"><?php esc_html_e('For a make-up or goodwill lesson. Otherwise a pending payment is raised at the lesson type\'s price.', 'unsupervised-schedular'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><label for="usc-book-notes"><?php esc_html_e('Notes', 'unsupervised-schedular'); ?></label></th>
<td><input type="text" name="notes" id="usc-book-notes" class="regular-text" maxlength="500"></td>
</tr>
</table>
<p>
<button type="submit" class="button button-primary"><?php esc_html_e('Book lesson', 'unsupervised-schedular'); ?></button>
</p>
</form>
<?php endif; ?>
</details>
<ul class="subsubsub" style="margin-bottom:12px;">
<li>
<a href="<?php echo esc_url($baseUrl); ?>" <?php echo 'week' === $view ? 'class="current"' : ''; ?>><?php esc_html_e('Week', 'unsupervised-schedular'); ?></a> |
+5 -1
View File
@@ -6,7 +6,7 @@ if (! defined('ABSPATH')) {
}
/**
* @var array{id: int|null, title: string, when: string, capacity: int|null, enrolled: int, invite_only: bool, instructor: string, price: float, currency: string, duration: int|null, description: string|null, schedule_note: string|null, deadline: string, enrollment_open: bool, active: bool, roster: list<array{student: string, status: string, payment: string|null}>, invited: list<array{who: string, kind: string}>} $class
* @var array{id: int|null, title: string, when: string, capacity: int|null, enrolled: int, invite_only: bool, instructor: string, price: float, currency: string, duration: int|null, description: string|null, schedule_note: string|null, deadline: string, enrollment_open: bool, active: bool, roster: list<array{id: int, student: string, status: string, payment: string|null}>, invited: list<array{who: string, kind: string}>} $class
* @var list<array{id: int, name: string}> $students
* @var string $notice
* @var string $baseUrl
@@ -122,6 +122,7 @@ if (! defined('ABSPATH')) {
<th><?php esc_html_e('Student', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Enrolment', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Payment', 'unsupervised-schedular'); ?></th>
<th><?php esc_html_e('Intake', 'unsupervised-schedular'); ?></th>
</tr>
</thead>
<tbody>
@@ -130,6 +131,9 @@ if (! defined('ABSPATH')) {
<td><?php echo esc_html($entry['student']); ?></td>
<td><?php echo esc_html($entry['status']); ?></td>
<td><?php echo esc_html($entry['payment'] ?? '—'); ?></td>
<td>
<a href="<?php echo esc_url(add_query_arg('enrollment_id', (string) $entry['id'], $baseUrl)); ?>"><?php esc_html_e('View', 'unsupervised-schedular'); ?></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>