ROCKVIEW SLPS — CAMPUS DIRECTOR DATA COLLECTIONS V17

Purpose
Adds Data Collections as a campus-scoped, read-only Campus Director module.

What is included
- Dedicated Director workspace with collection list, campus, owner, status, response count, and latest update.
- Dedicated GET-only API. It requires an authenticated Campus Director, an active Data Collections grant, and active campus assignment(s).
- Every collection query is filtered server-side by dc_forms.campus_id IN the Director's assigned campus IDs.
- Director cannot create, edit, publish, close, reopen, share, delete, correct responses, or access the staff authoring endpoint through this workspace.
- Existing Staff/Admin/Data Expert Data Collections authoring remains unchanged.
- Newly created collections inherit the creator's campus from staff.campus_id or admins.campus_id when available.
- Migration adds dc_forms.campus_id and backfills existing forms from staff/admin campus records. Forms without a known campus remain NULL and are not exposed to Directors.
- Adds data-collections to the central Campus Director delegated-module registry and Staff grant options.

Files in this package (cumulative with V16)
slps/shared/lib/campus_director_access.php
slps/shared/api/campus_director_access.php
slps/shared/views/module_shell.php
slps/shared/api/module.php
slps/shared/api/data_collections.php
slps/shared/api/campus_director_data_collections.php
slps/shared/views/campus_director_data_collections_workspace.php
slps/shared/js/campus-director-data-collections.js
slps/shared/css/campus-director-data-collections.css
slps/database/migrations/20261106_data_collections_campus_scope.sql
slps/docs/CAMPUS_DIRECTOR_DATA_COLLECTIONS_V17.txt

Installation order
1. Back up the current SLPS files and database.
2. Apply the existing Data Collections migrations if not already applied:
   - 20261021_data_collections.sql
   - 20261102_electoral_data_collections_scope.sql
   - 20261105_data_collection_sharing.sql
3. Apply the new migration:
   - 20261106_data_collections_campus_scope.sql
4. Upload all PHP, JS and CSS files in this package, preserving paths and overwriting matching files.
5. Sign in as Staff > Campus Director Access. Grant Data Collections to the intended Director and save.
6. Ensure the collection creator has a campus in staff.campus_id or admins.campus_id. The migration backfills existing forms from these records.
7. Sign out and sign in as the Campus Director. Open Data Collections.

Important data-scope note
The original dc_forms schema had no campus_id. The new migration is required before the feature can work. Existing collections whose owner has no staff/admin campus assignment are deliberately excluded. Assigning a campus to an owner does not automatically backfill after the migration has already run; update the collection's campus_id deliberately after confirming its correct campus.

Validation
Local PHP syntax and ZIP integrity checks are performed. This package has not been exercised against the live Rockview database. Verify migration backup, database column presence, and staff/admin campus assignments before production use.
