Add "Generate Feedback" button to Submission form view#94
Draft
Add "Generate Feedback" button to Submission form view#94
Conversation
- Add action_generate_feedback method to APSResourceSubmission model - Faculty-only guard (raises UserError if non-faculty) - Guard against overwriting existing feedback - Builds HTML template with score summary and model answer reference - Uses html_sanitize for safe HTML embedding - Returns display_notification on success - Add "Generate Feedback" button to the form header in aps_resource_submission_views.xml, visible only to faculty Agent-Logs-Url: https://github.com/agrogers/aps_sis/sessions/6aa08eb8-9606-45ee-8013-42f9b610d3a6 Co-authored-by: agrogers <13920678+agrogers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add generate feedback button to submission view
Add "Generate Feedback" button to Submission form view
Apr 1, 2026
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 a faculty-only "Generate Feedback" button to the header of the submission form view that scaffolds an HTML feedback template from available submission data.
Model (
aps_resource_submission.py)action_generate_feedback()method:UserErrorfor non-faculty usersUserErrorif feedback already exists (prevents silent overwrite)html_sanitizewhen embeddingmodel_answercontentdisplay_notificationsuccess actionView (
aps_resource_submission_views.xml)<header>, before "Reviewed"invisible="not is_current_user_faculty"— students never see it