Skip to content

feat(gradebook): add weighted view settings foundation (pr1 of 3)#8411

Open
LWS49 wants to merge 2 commits into
lws49/feat-gradebook-exportfrom
lws49/feat-gradebook-weights-pr1-foundation
Open

feat(gradebook): add weighted view settings foundation (pr1 of 3)#8411
LWS49 wants to merge 2 commits into
lws49/feat-gradebook-exportfrom
lws49/feat-gradebook-weights-pr1-foundation

Conversation

@LWS49

@LWS49 LWS49 commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lays the storage and admin-settings foundation for per-tab grade weighting in the gradebook. Adds a gradebook_weight integer column (0-100, default 0) to course_assessment_tabs with model-level validation (integer, 0-100, presence), a new Course::Settings::GradebookComponent with a weighted_view_enabled boolean (default false), two new CanCanCan abilities (manage_gradebook_weights, manage_gradebook_settings) scoped to manager/owner, and a Course Admin → Gradebook settings page where owners can enable or disable the weighted view. No observable change to the gradebook for existing courses — the setting defaults to false, and the weighted view surface (view toggle, Configure Weights button, weighted columns) lands in a later PR.

Design decisions

  • weighted_view_enabled defaults to false - zero UX impact on existing courses; staff who don't use weighting never encounter the feature. Matches Coursemology's existing per-component opt-in pattern.
  • Authorization uses :manage_gradebook_settings, not the generic :manage on the course - tab weighting is a course grading policy, so the settings page is intentionally narrower than full course management; TAs are excluded even though they read the gradebook.

Regression prevention

Covers: migration (gradebook_weight integer, not-null, default 0, reversible), tab validation (0-100 range, integer, presence, default value), settings model (default false, persistence, string "1"/"0" coercion), abilities (manager/owner granted both new abilities; TA and student denied), admin controller (edit returns weightedViewEnabled: false for manager; TA denied on both edit and update; PATCH persists setting and returns updated value; existing tab gradebook_weight values survive toggling the setting in both directions).

Manual: enabled setting as course owner and confirmed persistence across page refresh; disabled and re-enabled confirming tab weights survived the round-trip; confirmed TA is denied on the settings page; confirmed a tab's gradebook_weight was unchanged after toggling weighted_view_enabled off and back on.

Backward compatibility: weighted_view_enabled defaults to false — no change to the gradebook page or any other UI for existing courses.

image

@LWS49 LWS49 changed the base branch from master to lws49/feat-gradebook-export May 28, 2026 09:27
@LWS49 LWS49 changed the title Lws49/feat gradebook weights pr1 foundation feat(gradebook): add weighted view settings foundation May 28, 2026
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weights-pr1-foundation branch 2 times, most recently from 8718f51 to f91df1d Compare May 28, 2026 11:14
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 2 times, most recently from 865ba2b to 6bd0a13 Compare May 29, 2026 06:14
@LWS49 LWS49 changed the title feat(gradebook): add weighted view settings foundation feat(gradebook): add weighted view settings foundation (pr1 of 3) May 29, 2026
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch from 6bd0a13 to cd70de2 Compare May 29, 2026 06:51
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weights-pr1-foundation branch 3 times, most recently from 298ef61 to f572984 Compare May 29, 2026 09:02
@LWS49 LWS49 marked this pull request as ready for review May 29, 2026 09:03
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 6 times, most recently from 3517914 to b3e0042 Compare June 4, 2026 04:16
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weights-pr1-foundation branch from f572984 to b7c8418 Compare June 8, 2026 11:35
@LWS49 LWS49 changed the base branch from lws49/feat-gradebook-export to master June 8, 2026 11:38
@LWS49 LWS49 changed the base branch from master to lws49/feat-gradebook-export June 8, 2026 11:56
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-export branch 2 times, most recently from b813541 to 0db7ef2 Compare June 9, 2026 15:08
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weights-pr1-foundation branch 2 times, most recently from 296dfad to b414770 Compare June 9, 2026 15:41
LWS49 added 2 commits June 11, 2026 15:02
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.
- Add gradebook_weight (0-100 integer) column to course_assessment_tabs
- Add manage_gradebook_weights/settings abilities (manager/owner only)
- Add Course Admin -> Gradebook settings page to toggle the setting
@LWS49 LWS49 force-pushed the lws49/feat-gradebook-weights-pr1-foundation branch from b414770 to 47d4c41 Compare June 11, 2026 07:03
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