feat(gradebook): add gradebook with column picker and CSV export#8400
Open
LWS49 wants to merge 1 commit into
Open
feat(gradebook): add gradebook with column picker and CSV export#8400LWS49 wants to merge 1 commit into
LWS49 wants to merge 1 commit into
Conversation
3525c59 to
702f85e
Compare
5b85fc0 to
fa7a036
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, MuiColumnPickerDialog, ColumnPickerTreeGroup, and toolbar integration used by the gradebook.
fa7a036 to
031c2e1
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 Gradebook page (
GET /courses/:id/gradebook) that shows a matrix of students and their grades across all published assessments. Staff can toggle which columns to include and export a filtered CSV. To support this, the column picker dialog introduced in #8399 is utilized.Features:
-and export as blank; 0 grades display and export as 0Known follow-up: investigate replacing the raw SQL grade summary query with a lazy
ActiveRecord::Relation-based implementation to allow deferral until enumeration.Design decisions
Name is always locked on - simplified over "at least one of name/email must be selected" because that adds complexity with little utility; there is almost no real-world case where a user wants email without name, and if there is, the user can easily delete the name column from the export.
Any valid column selection (including name-only) renders in the table - restricting export or disabling controls when only name is selected does not match user expectations from the UI; users should be able to render or export whatever valid selection they have made.
Infomodal when only student info is selected, but no hard block - informs the user of the unusual state without preventing the action.
check-typesnow passes--noEmit-tsconfig.jsonsetsoutDir: dist, so a baretscinvocation emits compiled JS intodist/as a side effect. Adding--noEmitrestricts the script to type-checking only and prevents polluting the dist directory when a developer runsyarn check-typeslocally.dist/is also added totestPathIgnorePatternsinjest.config.jsas a matching safeguard - Jest would otherwise attempt to scan any previously emitted JS files there.Regression prevention
Course::Assessment.max_grades: covers empty input, correct aggregation, excludes other courses' assessments, excludes assessments with no questionsCourse::Assessment::Submission.grade_summary: covers empty student/assessment IDs, graded submissions, excludes attempting submissions, only counts current answersCourse::GradebookController: controller integration testsIndentedCheckboxmoved fromcourse/duplication/componentstolib/components/core- all six existing consumers updated; no behaviour changejest.config.js: addeddist/totestPathIgnorePatterns- prevents Jest from scanning emitted JS iftscwas ever run without--noEmitViews
Default view has name and all grades selected. If gamification is enabled, its columns will be selected in default view too.
Info modal pops up if only student info is selected. When gamification is disabled, message only mentions grade columns
View with only student name
Blank state view with no students