feat(gradebook): add gradebook page with column picker, CSV export, and statistics bridge#8400
Open
LWS49 wants to merge 2 commits into
Open
feat(gradebook): add gradebook page with column picker, CSV export, and statistics bridge#8400LWS49 wants to merge 2 commits into
LWS49 wants to merge 2 commits into
Conversation
3525c59 to
702f85e
Compare
fa7a036 to
031c2e1
Compare
0bb52e5 to
8a7d3be
Compare
cd70de2 to
64927b1
Compare
217cebd to
33def9e
Compare
33def9e to
7eb8f5d
Compare
Introduces a course-wide gradebook showing per-student grades across all assessments. Instructors can toggle which assessment columns are visible via a hierarchical column picker (grouped by category/tab), then export the current view to CSV. Backend adds GradebookController#index (JSON), ability guard, and model methods on Assessment and Submission for fetching grade data. Table lib gains reusable ColumnPickerTemplate, MuiColumnPickerPrompt, ColumnPickerTreeGroup, and toolbar integration used by the gradebook.
3517914 to
b3e0042
Compare
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
Adds a new Gradebook page (
/courses/:id/gradebook) giving staff a consolidated view of student grades across all published assessments. The page renders a TanStack-backed table with per-student rows and per-assessment grade columns, supports a tree-structured column picker (student info, gamification, and grades branches), persists column visibility to localStorage per user per course, and exports the visible columns as CSV. Gamification columns (Level, XP) are hidden from the picker when the course has gamification disabled. The Statistics → Assessments tab gains an "Open in Gradebook" button (gated by the Gradebook component being enabled and the caller havingread_gradebookpermission) to bridge the two views. The existing "Download Score Summary" button on that tab is removed in full (frontend component, operations, API method, Rails controller action, route, background job, service, and locale keys) since the gradebook supersedes it.Regression prevention
Tests added:
GradebookColumnTree.test.tsx- covers branch rendering, gamification gating, checkbox disabled state, parent toggle propagation, and mixed visibility indeterminate stateGradebookIndex.test.tsx- covers loading state, table render, empty student state, column picker toggle, and error toast on fetch failureGradebookTable.test.tsx- covers grade cell rendering, unsubmitted placeholder, column visibility, CSV export header/row content, and localStorage persistence across remountsAssessmentsStatisticsTable.test.tsx- covers "Open in Gradebook" link present when enabled, absent when disabled, and row-selection checkboxes retained after toolbar removalgradebook_controller_spec.rb(authorization, index JSON shape),assessment_spec.rbandsubmission_spec.rb(new query methods),aggregate_controller_spec.rb(gradebookEnabled flag)Manual testing: All scenarios confirmed - gradebook page loads with students and grades, column picker toggles persist and reflect in CSV, gamification columns absent when disabled, empty state renders cleanly, "Open in Gradebook" link present/absent per component state, checkboxes retained in Statistics tab, score summary button gone.
Backward compat: Score summary download removed for all users on upgrade; no migration needed. All other Statistics features unchanged.