updated terminology from "Coach" to "Counselor" across multiple files for consistency and clarity
Some checks failed
PHPUnit / test (push) Has been cancelled
Some checks failed
PHPUnit / test (push) Has been cancelled
This commit is contained in:
@ -346,7 +346,7 @@ function qdb_coach_recent_submissions(
|
||||
$chk->execute([':id' => $coachID]);
|
||||
$coach = $chk->fetch(PDO::FETCH_ASSOC);
|
||||
if (!$coach) {
|
||||
json_error('NOT_FOUND', 'Coach not found', 404);
|
||||
json_error('NOT_FOUND', 'Counselor not found', 404);
|
||||
}
|
||||
if ($role === 'supervisor' && ($coach['supervisorID'] ?? '') !== $entityID) {
|
||||
json_error('FORBIDDEN', 'Not authorized for this coach', 403);
|
||||
|
||||
@ -93,13 +93,13 @@ function qdb_import_dev_fixture(PDO $pdo, array $fixture): array
|
||||
$username = qdb_dev_norm_username($row, $prefix);
|
||||
$svUser = trim($row['supervisor'] ?? $row['supervisorUsername'] ?? '');
|
||||
if ($svUser === '' || !qdb_dev_has_prefix($svUser, $prefix)) {
|
||||
$errors[] = "Coach $username: missing or invalid supervisor";
|
||||
$errors[] = "Counselor $username: missing or invalid supervisor";
|
||||
continue;
|
||||
}
|
||||
$supervisorID = $supervisorIdByUsername[$svUser]
|
||||
?? qdb_dev_lookup_entity_id($pdo, $svUser);
|
||||
if ($supervisorID === '') {
|
||||
$errors[] = "Coach $username: supervisor $svUser not found";
|
||||
$errors[] = "Counselor $username: supervisor $svUser not found";
|
||||
continue;
|
||||
}
|
||||
if (qdb_dev_user_exists($pdo, $username)) {
|
||||
|
||||
Reference in New Issue
Block a user