Enrollments Page: Match table style to requests, set default limit to 100, reposition sync button, and add sync timestamp.#438
Open
cycomachead wants to merge 2 commits into
Open
Conversation
- Match table styling to requests pages using flextensions-table classes - Set default DataTable page limit to 100 - Reposition sync button to bottom-left with updated outline styling - Display "last synced at" timestamp for enrollment data - Expand sync permissions to all course staff (including TAs) Co-authored-by: Claude Code <noreply@anthropic.com>
Replace inline role string comparison with a dedicated `course_staff?` method in the Course model to improve consistency and maintainability of permission logic. Co-authored-by: Claude Code <noreply@anthropic.com>
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.
General Info
Changes
Updates the Enrollments page UI to match the style of the Requests pages, and expands sync permissions to all course staff.
Table styling: Added
flextensions-tableclass and updated the header to usetable-blue-medium text-whitewith a<thead>element, matching the pattern used on the requests pages. Wrapped the table in atable-responsivediv.Default page limit: Changed the DataTable
pageLengthfrom500to100.Sync button: Moved from a centered layout to bottom-left (
text-start), and updated the style frombtn btn-infotobtn btn-outline-primary(dark blue outline). Removed the@is_course_admingate so all course staff can see and use the button.Sync permissions: Updated
sync_enrollmentsin the controller to allow any course staff member (@role == 'instructor') rather than only course admins. This ensures TAs can actually use the sync button rather than receiving a forbidden error. Updated the corresponding spec to reflect this.Last synced timestamp: Added an
enrollments_last_synced_athelper that readscourse_to_lms.recent_roster_sync['synced_at']and displays it below the sync button as "Enrollments last synced at [time]", or "never" if no sync has occurred.Testing
courses_controller_spec.rbto expect:okinstead of:forbiddenforsync_enrollments.Documentation
No documentation changes required.
Checklist
Superconductor Ticket Implementation | App Preview | Guided Review