Skip to content

Add homework submission editing with enrollment quick access and clear buttons#152

Merged
alexeygrigorev merged 3 commits into
mainfrom
copilot/edit-homework-submission-scores
Jan 30, 2026
Merged

Add homework submission editing with enrollment quick access and clear buttons#152
alexeygrigorev merged 3 commits into
mainfrom
copilot/edit-homework-submission-scores

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

Adds ability to edit homework submission answers and learning in public links. Mirrors existing project submission edit functionality. Includes quick access from enrollment pages and one-click clear buttons for learning in public data.

Changes

Backend

  • New homework_submission_edit view at /cadmin/<course>/<homework>/submissions/<id>/edit
  • Handles answer updates across all question types (free form, multiple choice, checkboxes)
  • Reuses existing update_score() to recalculate questions/FAQ/learning-in-public scores
  • Triggers update_leaderboard() only when total score changes
  • Updated enrollment_edit view to display homework and project submissions with edit links

Frontend

  • Edit form displays all questions with current answers, correct answers for reference, and answer status badges
  • Learning in public links editable as comma-separated values
  • Edit button added to submissions list
  • NEW: Enrollment edit page shows all homework and project submissions with direct edit links
  • NEW: "Remove Learning in Public Links" button on homework edit page (clears field without global disable)
  • NEW: "Remove Learning in Public Score" buttons on project edit page (zeros scores without global disable)

Tests

  • 3 new tests covering form display, score recalculation, and leaderboard updates

Screenshots

Submissions List

Edit Form with Clear Button

After Clearing Learning in Public Links

Enrollment Edit with Submission Quick Access

From the enrollment/leaderboard management page, staff can now view and edit all homework and project submissions for a student in one place.

Original prompt

This section details on the original issue you should resolve

<issue_title>Edit submission scores for homework</issue_title>
<issue_description>Just like we have submission edit functionality for projects, let's do the same for homework submissions

I want to edit correct answers and also learning in public links. That should trigger leaderboard recalculation if the score changes </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to edit homework submission scores Add homework submission editing with automatic score recalculation Jan 30, 2026
Copilot AI requested a review from alexeygrigorev January 30, 2026 06:21
@alexeygrigorev
Copy link
Copy Markdown
Member

@copilot for cadmin link from the leaderboard record: I want to use that page to edit both homework and project submissions

Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 30, 2026

@copilot for cadmin link from the leaderboard record: I want to use that page to edit both homework and project submissions

Added in commit 3a00a3d. The enrollment edit page now shows tables with all homework and project submissions for the student, each with an Edit link to quickly jump to submission editing.

Screenshots:

Copilot AI changed the title Add homework submission editing with automatic score recalculation Add homework submission editing with enrollment quick access and clear buttons Jan 30, 2026
@alexeygrigorev alexeygrigorev marked this pull request as ready for review January 30, 2026 17:03
@alexeygrigorev alexeygrigorev merged commit e8850e7 into main Jan 30, 2026
2 checks passed
@alexeygrigorev alexeygrigorev deleted the copilot/edit-homework-submission-scores branch January 30, 2026 18:46
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.

Edit submission scores for homework

2 participants