feat(gradebook): tab weight + excluded flag API (pr2 of 3)#8412
Draft
LWS49 wants to merge 2 commits into
Draft
Conversation
caee9cd to
e4bcfb6
Compare
8718f51 to
f91df1d
Compare
298ef61 to
f572984
Compare
333c45a to
8b79b30
Compare
…alog, toolbar buttons, visibility state, and tests
- Add MuiColumnPickerDialog with Apply/Export actions, locked-column enforcement, and optional dataColumnIds hint when no data columns are selected
- Update MuiTableToolbar to render a trigger button (opens dialog) and a direct export button alongside the existing CSV download icon
- Extend useTanStackTableBuilder with column visibility state (localStorage persistence, dynamic reconciliation), onExportFromPicker, onDirectExport, and cross-page selection helpers (selectedCount, toggleAllFiltered, etc.)
- Add ColumnPickerTemplate interface and Body.ts selection fields
- Add full test coverage for dialog, toolbar, and hook behaviour
- Add lib.components.table.* locale keys (en/ko/zh)
- add Tab.update_gradebook_weights: transactional bulk update scoped to course tabs, with pre-flight ID validation and single pre-fetch query - extend GET /gradebook index JSON with weightedViewEnabled, canManageWeights, and per-tab gradebookWeight (gated by setting) - add PATCH /gradebook/weights: manager-only, returns 422 on validation failure or foreign tab, transactionally rolls back on any error
f572984 to
b7c8418
Compare
8b79b30 to
1025c75
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 the backend API layer for the gradebook weighted view. Introduces a
PATCH /gradebook/weightsendpoint for managers to update each tab'sgradebook_weightandgradebook_excludedflag in a single atomic transaction. A newgradebook_excludedboolean column oncourse_assessment_tabs(default false) marks tabs as "not graded", distinct fromweight=0which still participates in the normalised total. TheGET /gradebookindex now exposesgradebookWeight,gradebookExcluded,weightedViewEnabled, andcanManageWeightsso the frontend can render the weighted table without a second request.Design decisions
excludedis optional in each update entry - if the key is absent the flag is not touched. This lets callers update weights only (or excluded only in future) without clearing state they didn't intend to change.gradebookWeightandgradebookExcludedare only serialised per-tab whenweighted_view_enabledis true, consistent with the existing conditional in the jbuilder - clients that don't use weighted view never receive these fields.update_gradebook_weightsvalidates all tab IDs belong to the course before entering the transaction, so a foreign tab ID fails fast with a 422 rather than silently skipping or partially writing.Regression prevention
gradebookWeightandgradebookExcludedwhen weighted view enabled and omits them when disabled.update_gradebook_weightsis additive and backward-compatible with callers that omitexcluded.