Skip to content

Course reporting scoped to tenant - #127

Merged
andreia merged 1 commit into
4.xfrom
report_scoped_tenant
Sep 10, 2026
Merged

Course reporting scoped to tenant#127
andreia merged 1 commit into
4.xfrom
report_scoped_tenant

Conversation

@andreia

@andreia andreia commented Sep 8, 2026

Copy link
Copy Markdown
Member

Details

Course reporting scoped to tenant.


Note

Medium Risk
Changes reporting data boundaries in multi-tenant setups; incorrect scoping could expose other tenants’ progress, though behavior is covered by new tests and reuses existing tenant column helpers.

Overview
Course completion reporting now respects LMS tenancy: when filament-lms.tenancy.enabled is on and a Filament tenant is active, CourseProgressQueryService::buildQuery() only includes progress for courses belonging to that tenant (via TenantHelper’s tenant column). If tenancy is enabled but no tenant is selected, the report stays unscoped (all tenants), matching the new test expectation.

The User filter on the Reporting page no longer loads every user from users; it uses new reportUserFilterOptions(), which lists emails only for learners that appear in the (tenant-scoped) report query—so exports and filters stay aligned with the table.

Feature tests cover tenant isolation, filter options, and the no-tenant-selected case; a minimal TestTeam model supports tenancy in tests.

Reviewed by Cursor Bugbot for commit b0cee4b. Bugbot is set up for automated code reviews on this repo. Configure here.

@andreia
andreia requested a review from swilla September 8, 2026 20:55
@andreia
andreia merged commit 3bef754 into 4.x Sep 10, 2026
16 checks passed
@andreia
andreia deleted the report_scoped_tenant branch September 10, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant