Add enrollment-level learning in public disable capability#150
Merged
Conversation
Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add ability to disable learning in public for users
Add enrollment-level learning in public disable capability
Jan 29, 2026
Member
|
@copilot let's also check it when rendering the homework and projects pages. If this flag is set we simply don't display the learning in public forms for homeworks, project submissions and project reviews |
Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Contributor
Author
Done in commit d1358c3. The learning in public forms are now hidden on all submission pages (homework, project submission, and peer reviews) when Changes made:
When the flag is set, students won't see the learning in public input fields at all. |
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.
Adds ability to disable learning in public submissions for abusive users at the enrollment level. When disabled, all existing LiP scores are zeroed, future submissions are excluded from scoring, and the LiP form fields are hidden from the user interface.
Changes
Data Model
Enrollment.disable_learning_in_publicboolean field (default:False)Scoring Logic
update_learning_in_public_score(): Returns 0 whenenrollment.disable_learning_in_publicis setscore_project(): Skips LiP calculation for both project submissions and peer reviews when flag is enabledUI Form Hiding
learning_in_public_links.htmltemplate to conditionally render based on the flagCadmin Interface
/cadmin/<course>/enrollments/: List view with LiP status indicators, optimized withannotate(Count())to avoid N+1/cadmin/<course>/enrollment/<id>/edit: Toggle LiP with atomic score zeroing + leaderboard recalcScore Zeroing Implementation
When disabling, bulk updates homework and project submissions:
Leaderboard is recalculated via
update_leaderboard()after score modifications.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.