Skip to content

Grader LTI bugfix and force send all updates - #1584

Merged
bnmnetp merged 6 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:grader-lti-updates
Oct 6, 2026
Merged

bnmnetp merged 6 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.

Comment thread components/rsptx/grading_helpers/regrade.py Outdated
Comment thread test/components/rsptx/grading_helpers/test_regrade_batch.py
Copilot AI balanced review requested due to automatic review settings October 5, 2026 00:15

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

Force handling can expose unreleased grades, misses some instructor grading paths, and introduces a failing test.

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

Open (4)
Resolved since last review (1)

Comment thread components/rsptx/grading_helpers/regrade.py
Comment thread test/components/rsptx/grading_helpers/test_regrade_batch.py
Comment thread components/rsptx/grading_helpers/regrade.py
Copilot AI balanced review requested due to automatic review settings October 5, 2026 00:18

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

🔵 Needs a closer look

Forced passback can bypass grade release controls, one instructor flow remains unforced, and a new test currently fails.

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

Open (3)
Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Mark regrade batch test as instructor-triggered

test/​components/​rsptx/​grading_helpers/​test_regrade_batch.py:94

This test calls regrade_batch with its default instructor_triggered=False, so line 746 passes force=False and the assertion below fails. The default is needed by the student route, which also calls regrade_batch; explicitly mark this test invocation as instructor-triggered.

Copilot AI balanced review requested due to automatic review settings October 5, 2026 00:55

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

🟢 Approval recommended

The LTI force behavior is propagated consistently, unreleased grades remain protected, and the new workflow has focused regression tests.

Review effort: Balanced
Findings: None

Resolved since last review (3)

@ascholerChemeketa

Copy link
Copy Markdown
Contributor Author

Looks like I need to fix my react lint setup. Will do and repush.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 01:24
@ascholerChemeketa

Copy link
Copy Markdown
Contributor Author

Force pushed with relinted files rebased back into the commits

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

🟢 Approval recommended

The option is consistently propagated, release safeguards remain intact, and the new behavior has focused regression coverage.

Review effort: Balanced
Findings: None

@bnmnetp
bnmnetp merged commit b755fa2 into RunestoneInteractive:main Oct 6, 2026
5 checks passed
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.

3 participants