feat(gradebook): external-ID import, manage panel, and drag-and-drop reorder#8457
Open
LWS49 wants to merge 4 commits into
Open
feat(gradebook): external-ID import, manage panel, and drag-and-drop reorder#8457LWS49 wants to merge 4 commits into
LWS49 wants to merge 4 commits into
Conversation
…links & sorting
Introduce the course gradebook: a frozen-column table of students × assessments
with a column picker, CSV export, and per-grade links into submissions.
Gradebook table
- Page with TanStack-backed table: pinned checkbox + Name columns, sticky
header and Max Marks rows, frozen-column border seams that survive sticky
scroll compositing.
- Column picker (assessments grouped by tab/category) and CSV export of the
selected columns; empty-state hint when no data columns are chosen.
- External ID column, shown when any student has one.
- Grade cells link to the student's submission; a dismissible GradeLinkHint
banner explains the affordance (persisted per-user via useDismissibleOnce).
- "Search students" global search.
- Default sort with name ascending, null/undefined at bottom of sort regardless of order
Shared table builder
- getColumnCanGlobalFilter is gated on column visibility ("search what you
see"): hiding a column via the picker removes it from search, and the
nullable-first-row type sniff is bypassed. Affects all TanStack tables.
Backend
- Gradebook controller, ability and course component; index JSON serializes
students, assessments, submissions (with submissionId) and gamification.
- Submission grade query also selects the submission id for grade links.
- Remove the redundant ScoreAssessmentSummary download from Statistics.
Add weighted view built on top of gradebook: - add tables course_gradebook_contributions and course_gradebook_assessment_contributions - weighted table with equal/custom weight modes and per-assessment weight inputs, with a sum gate on custom weights - points / percentage display toggle - inline per-student assessment breakdown (row expand) - projected-total hint - gradebook_excluded column, serialization, and update-weights API echo - per-assessment include/exclude in the configure-weights modal, seeding custom weights from included assessments only - excluded assessments shown in the breakdown with no contribution - add SegmentedSelect component for stylized selection that is not "on-off"
| end | ||
| end | ||
|
|
||
|
|
There was a problem hiding this comment.
[Correctable] Layout/EmptyLines: Extra blank line detected.
441d043 to
aeb0e66
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
Gives external assessments a proper management home and adds External-ID-based grade import. A single page-level "Manage external assessments" panel (above the tabs) replaces the two scattered toolbar buttons and the in-column kebab menu; it lists every external (Name / Max / Weight / Actions) and hosts Add, Import, Edit, and Delete. Import matches students by "External ID" (the rest of Coursemology's term) or email, with the identifier keyed by column position. Externals can be reordered by drag-and-drop, persisted via a new
positioncolumn and a canonical-order endpoint. Includes the External-ID column made sortable in Manage Users, and an N+1 fix on external delete.Design decisions
canManageWeightsbut not onweightedViewEnabled- recording a paper-exam grade is valid even with weighting off, so externals must stay manageable. The Weight column is shown read-only and only when the weighted view is on (weight editing stays in Configure Weights, to avoid two edit paths).updateWeightsendpoint, using PR1'smaterializedDefaultWeightshelper) - otherwise setting one real weight would disengage the fallback and collapse every other tab to its stored 0. No-op when weights are already configured or the new weight is 0.Regression prevention
Covers: manage panel (list, add/edit/delete, empty state), the delete-prompt confirm/failure-toast/cancel paths, reorder dispatch + failure rollback, buildTemplate header generation, all gradebook operation thunks (id-negation, optimistic apply/rollback, create-weight branch,
DELETE_EXTERNAL_ASSESSMENT), the default-weight materialization on add/edit/import, and the External-ID sortable users column (frontend suites green). Adds thepositionmigration20260624000000(reversible). Backward compatible: existing externals get sequential positions on migrate. External-assessments controller specs run on push/CI.Used-then-replaced note for reviewers: PR1 shipped
ImportExternalAssessmentsButtonandRenameExternalColumnPrompt; this PR removes both as the single entry point and panel replace them. This is intentional, not a regression.Screenshots worth adding: the Manage panel, and the drag-and-drop reorder interaction.