Skip to content

Edit individual review criteria scores in project submission and fix message display in cadmin#135

Merged
alexeygrigorev merged 7 commits into
mainfrom
copilot/edit-individual-scores
Jan 16, 2026
Merged

Edit individual review criteria scores in project submission and fix message display in cadmin#135
alexeygrigorev merged 7 commits into
mainfrom
copilot/edit-individual-scores

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 16, 2026

Project Submission Editing and Message Display Fixes

Checklist:

  • Explore repository structure and understand the issue
  • Fix project submission edit to auto-calculate total score
    • Changed from editing aggregate project_score to individual review criteria scores
    • Display each criteria with its description and score options
    • Make each criteria score editable
    • Auto-calculate project_score as sum of all criteria scores
    • Add JavaScript to auto-calculate project and total scores in real-time
    • Update view to handle criteria scores and calculate project_score on save
    • Add proper error handling and validation for criteria scores
  • Fix message display on course admin page
    • Add Django messages display block to course_admin.html template
    • Add Django messages display block to other cadmin templates
    • Refactor to use base template to eliminate message duplication
  • Add tests for project submission editing
    • Test that project_score is calculated from criteria scores
    • Test that editing individual criteria scores updates the total
    • Test editing with checkboxes
    • Test that evaluation scores are properly created/updated
  • Add tests for message display
    • Test that messages appear on the same page after actions
    • Test messages for homework actions
    • Test messages for project actions
  • Run tests to verify all changes work correctly
  • Address code review feedback
    • Improve error handling with descriptive messages
    • Fix grammar in template
    • Make JavaScript more consistent
    • Create base template to eliminate message duplication
  • All tests pass with no review issues
Original prompt

This section details on the original issue you should resolve

<issue_title>Cadmin project submission editing</issue_title>
<issue_description>Now I can edit the project submission, but only the total score. I want to be able to edit indivudual scores instead, not the total. Add this, and make sure the total is adjusted when I edit individual scores. Cover it with tests.

Also, when I click on different actions for homeworks or projects, I get a message, but this messages are not displayed on the page where I click things. They are displayed later when I open other pages. Let's fix it and cover this scenario with tests too.</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.

Copilot AI and others added 3 commits January 16, 2026 09:11
- Make total_score automatically calculated from individual scores
- Add JavaScript to auto-calculate total when editing scores
- Add Django messages display to all cadmin templates
- Add comprehensive tests for submission editing and message display

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 edit individual scores for project submissions Auto-calculate project submission total score and fix message display in cadmin Jan 16, 2026
Copilot AI requested a review from alexeygrigorev January 16, 2026 09:15
@alexeygrigorev alexeygrigorev marked this pull request as ready for review January 16, 2026 09:22
@alexeygrigorev
Copy link
Copy Markdown
Member

@copilot project score is based on individual scores, and then the total score is added to the submission. I want to edit the individual scores for each criteria, and I also want to see these criteria (along with the levels) and see how much they got for this criteria - editable.

…cores

- Display review criteria with their options/levels
- Allow editing individual criteria scores instead of aggregate project_score
- Auto-calculate project_score from sum of criteria scores
- Update tests to reflect new criteria-based scoring approach

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

Copilot AI commented Jan 16, 2026

@copilot project score is based on individual scores, and then the total score is added to the submission. I want to edit the individual scores for each criteria, and I also want to see these criteria...

Updated the implementation to use individual review criteria scores. Now the edit page:

  • Shows each ReviewCriteria with its description (e.g., "Problem Description", "Code Quality")
  • Displays all score options/levels for each criteria (e.g., "Poor: 0 points", "Good: 2 points", "Excellent: 4 points")
  • Allows editing the score for each individual criteria
  • Auto-calculates project_score as the sum of all criteria scores (readonly)
  • Creates/updates ProjectEvaluationScore records for each criteria

Commit: 1a1e9e2

- Add better validation for criteria scores with descriptive error messages
- Fix grammar: 'criteria' -> 'criterion' (singular)
- Use consistent querySelectorAll for all score field selections in JavaScript
- Add 'peer-review-score' class to peer review score fields

Co-authored-by: alexeygrigorev <875246+alexeygrigorev@users.noreply.github.com>
Copilot AI changed the title Auto-calculate project submission total score and fix message display in cadmin Edit individual review criteria scores in project submission and fix message display in cadmin Jan 16, 2026
@alexeygrigorev
Copy link
Copy Markdown
Member

@copilot there's a lot of repetitions for messages. can we create one base template for cadmin, put the messages there and then extend it for all the other templates?

- Create cadmin/base.html that extends base.html and includes messages block
- Update all cadmin templates to extend cadmin/base.html instead of base.html
- Remove duplicate message blocks from all templates
- Templates now use cadmin_content block instead of content block

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

Copilot AI commented Jan 16, 2026

@copilot there's a lot of repetitions for messages. can we create one base template for cadmin, put the messages there and then extend it for all the other templates?

Created cadmin/base.html that extends base.html and includes the messages block. All cadmin templates now extend this base template instead of repeating the message code. This removes ~75 lines of duplicate code across 5 templates.

Commit: f7752e0

@alexeygrigorev alexeygrigorev merged commit e93dd80 into main Jan 16, 2026
2 checks passed
@alexeygrigorev alexeygrigorev deleted the copilot/edit-individual-scores branch January 16, 2026 13:21
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.

Cadmin project submission editing

2 participants