Skip to content

feat(gradebook): add gradebook page with column picker, CSV export, and statistics bridge#8400

Open
LWS49 wants to merge 2 commits into
masterfrom
lws49/feat-gradebook-export
Open

feat(gradebook): add gradebook page with column picker, CSV export, and statistics bridge#8400
LWS49 wants to merge 2 commits into
masterfrom
lws49/feat-gradebook-export

Conversation

@LWS49
Copy link
Copy Markdown
Collaborator

@LWS49 LWS49 commented May 21, 2026

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 having read_gradebook permission) 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 state
  • GradebookIndex.test.tsx - covers loading state, table render, empty student state, column picker toggle, and error toast on fetch failure
  • GradebookTable.test.tsx - covers grade cell rendering, unsubmitted placeholder, column visibility, CSV export header/row content, and localStorage persistence across remounts
  • AssessmentsStatisticsTable.test.tsx - covers "Open in Gradebook" link present when enabled, absent when disabled, and row-selection checkboxes retained after toolbar removal
  • Backend: gradebook_controller_spec.rb (authorization, index JSON shape), assessment_spec.rb and submission_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.

@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 4 times, most recently from 3525c59 to 702f85e Compare May 21, 2026 11:43
@LWS49 LWS49 marked this pull request as ready for review May 21, 2026 11:53
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 9 times, most recently from fa7a036 to 031c2e1 Compare May 25, 2026 05:53
@LWS49 LWS49 changed the base branch from master to lws49/feat-table-column-picker May 26, 2026 08:07
@LWS49 LWS49 force-pushed the lws49/feat-table-column-picker branch 4 times, most recently from 0bb52e5 to 8a7d3be Compare May 29, 2026 04:27
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 4 times, most recently from cd70de2 to 64927b1 Compare May 29, 2026 09:08
Base automatically changed from lws49/feat-table-column-picker to master June 1, 2026 10:12
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 3 times, most recently from 217cebd to 33def9e Compare June 4, 2026 02:22
@LWS49 LWS49 changed the title feat(gradebook): add gradebook with column picker and CSV export feat(gradebook): add gradebook page with column picker and CSV export Jun 4, 2026
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch from 33def9e to 7eb8f5d Compare June 4, 2026 02:36
@LWS49 LWS49 changed the title feat(gradebook): add gradebook page with column picker and CSV export feat(gradebook): add gradebook page with column picker, CSV export, and statistics bridge Jun 4, 2026
LWS49 added 2 commits June 4, 2026 12:15
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.
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch from 3517914 to b3e0042 Compare June 4, 2026 04:16
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