Remove need for session request when creating mentoring sessions - #5109
Draft
AxonC wants to merge 1 commit into
Draft
Remove need for session request when creating mentoring sessions#5109AxonC wants to merge 1 commit into
AxonC wants to merge 1 commit into
Conversation
Replace pending CTS session-request pickup on the Training Panel Availability Gantt with Training Place–based eligibility, so mentors create sessions directly for students who have a place and availability. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Alongside this, do we want to remove the ability for students to create session requests on CTS. Once this and the TFP one is in place that won't be needed right? |
CLC0609
approved these changes
Aug 9, 2026
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.
Summary
Implements TECH-734 (PR1 of TECH-700 / stakeholder AC TECH-732).
Training Panel mentoring no longer depends on pending CTS session requests. Mentors see students who hold an active Training Place and have availability, then create a session (with position selection) instead of accepting a pre-created request.
This is the Training Panel cutover slice only. It does not change daily availability enforcement emails/rules (TECH-735) or remove the hourly auto-create session-request job (TECH-733).
Why this is safe vs current behaviour
What stays the same
sessionsrows with Core + CTS bookings and the same accepted-session notifications/emails (copy updated only).availability AND request) continues to pass for Training Place holders.What changes (and why it is an improvement)
MentoringPolicy::createIntentional non-goals in this PR
CheckAvailabilityto availability-only (TECH-735). Shipping this first is safe because auto-create still supplies requests for the old check.Known limitation (documented in code)
MentoringSessionsService::createSessionusesDB::transaction()on the default connection only. CTS session/booking writes use thectsconnection and are not rolled back if a later Core write fails (same dual-write pattern as existingacceptSession). Notifications useDB::afterCommit()on the Core transaction.Functional behaviour
Gantt shows a student when all are true:
Create session:
Test plan
php artisan test tests/Feature/TrainingPanel/Mentor/MentoringPageTest.php tests/Unit/Training/Mentoring/MentoringSessionsServiceTest.php tests/Unit/Notifications/Training/Mentoring/MentoringSessionNotificationsTest.phpRelated
Made with Cursor