Skip to content

Grader LTI bugfix and force send all updates - #1584

Open
ascholerChemeketa wants to merge 2 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:grader-lti-updates
Open

ascholerChemeketa wants to merge 2 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:grader-lti-updates

Conversation

@ascholerChemeketa

Copy link
Copy Markdown
Contributor

First commit makes sure that instructor grade changes get sent via LTI even if "auto updates" are turned off.

Second adds a checkbox to the regrade wizard so instructors can forcibly resend even unchanged grades to LTI. Default is false.
This is useful if you do something like change grade reporting from points to percent, open an assignment in your LMS that some students had already done on the RS side, etc...


This pull request introduces a new option to the regrade workflow that allows instructors to force the resending of all assignment totals via LTI, even if the scores have not changed. This affects both the frontend and backend, ensuring that the new option is available in the UI, passed through the API, and handled correctly in the grading logic. Additional tests have been added to verify the new behavior and its interaction with existing options.

Key changes include:

Frontend (UI and API integration):

  • Added a "Resend all scores via LTI (force update even unchanged)" checkbox to the RegradeWizard UI, which defaults to off and is included in both preview and run requests. When enabled, it also forces "Recompute assignment totals" to be enabled and disables its checkbox. [1] [2] [3] [4]
  • Extended the RegradeRequest interface to include the new resend_all_scores_via_lti boolean property, ensuring the option is sent to the backend.

Backend (API and logic):

  • Updated the backend API models (RegradeRequest and RegradeOptions) and endpoints to accept and forward the resend_all_scores_via_lti flag. [1] [2] [3] [4]
  • Modified the core regrade logic so that when the resend option is enabled, assignment totals are recomputed and pushed to the LMS for all students, even if their scores are unchanged. The force flag is now forwarded through the relevant functions to support this behavior. [1] [2] [3] [4] [5]

Testing:

  • Added and updated tests to cover the new resend option, ensuring that unchanged totals are pushed to the LMS when requested, and that the force flag is handled correctly throughout the stack. [1] [2] [3] [4]

Other:

  • Added documentation and code comments to clarify the new behavior and its intent.

Copilot AI balanced review requested due to automatic review settings October 4, 2026 18:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unconditional forcing bypasses LTI settings for student submissions, while direct instructor edits still are not forced.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds forced LTI score resending to the regrade workflow across the UI, API, grading logic, and tests.

Changes:

  • Adds an instructor-facing resend option.
  • Propagates force flags through backend LTI updates.
  • Adds frontend and backend coverage.
File Description
test/​components/​rsptx/​grading_helpers/​test_regrade_batch.py Tests forced and unchanged-score pushes.
components/​rsptx/​grading_helpers/​regrade.py Implements forced LTI resending.
bases/​rsptx/​assignment_server_api/​routers/​grader.py Accepts and forwards the option.
bases/​rsptx/​assignment_server_api/​assignment_builder/​src/​store/​grader/​grader.logic.api.ts Extends the request interface.
bases/​rsptx/​assignment_server_api/​assignment_builder/​src/​components/​routes/​Grader/​components/​RegradeWizard.tsx Adds the resend checkbox.
bases/​rsptx/​assignment_server_api/​assignment_builder/​src/​components/​routes/​Grader/​components/​RegradeWizard.spec.tsx Tests UI request behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

changes,
user_map,
push_unchanged=options.resend_all_scores_via_lti,
force=True,
Comment on lines +410 to +413
assert lti_mock.await_args.kwargs == {
"force": False,
"instructor_triggered": True,
}
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.

2 participants