Skip to content

Fix camelCase kwarg bug: instructorTriggered → instructor_triggered in rsmanage - #1351

Closed
bnmnetp with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-code-review-comment
Closed

Fix camelCase kwarg bug: instructorTriggered → instructor_triggered in rsmanage#1351
bnmnetp with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-code-review-comment

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown

recompute_totals_detail accepts instructor_triggered (snake_case), but the call in bases/rsptx/rsmanage/core.py passed instructorTriggered=True (camelCase), which would raise TypeError: got an unexpected keyword argument at runtime when fixtotals is invoked.

Changes

  • bases/rsptx/rsmanage/core.py: Rename kwarg instructorTriggered=Trueinstructor_triggered=True at the recompute_totals_detail(...) call site in fixtotals.
# Before (broken)
changes = await recompute_totals_detail(
    c, a, sids, dry_run=dry_run, only_existing=not create_missing,
    instructorTriggered=True,  # TypeError at runtime
)

# After (fixed)
changes = await recompute_totals_detail(
    c, a, sids, dry_run=dry_run, only_existing=not create_missing,
    instructor_triggered=True,
)

Copilot AI lite review requested due to automatic review settings August 7, 2026 18:51

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 wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Andrew Scholer and others added 5 commits August 7, 2026 18:55
Co-authored-by: bnmnetp <51115+bnmnetp@users.noreply.github.com>
…tion

Co-authored-by: bnmnetp <51115+bnmnetp@users.noreply.github.com>
Co-authored-by: bnmnetp <51115+bnmnetp@users.noreply.github.com>
Co-authored-by: bnmnetp <51115+bnmnetp@users.noreply.github.com>
Co-authored-by: bnmnetp <51115+bnmnetp@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 7, 2026 18:55
Copilot AI changed the title [WIP] Fix code as per review comment Fix camelCase kwarg bug: instructorTriggered → instructor_triggered in rsmanage Aug 7, 2026
Copilot AI requested a review from bnmnetp August 7, 2026 18:56
@bnmnetp bnmnetp closed this Aug 7, 2026

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Suppressed comments (1)

components/rsptx/lti1p3/core.py:89

  • When instructor_triggered=True and the assignment has a duedate, _submitted_at_for_score always uses duedate - 1 minute for submission.submittedAt. If an instructor triggers a push before the deadline, this can produce a submittedAt timestamp that is in the future relative to the grade timestamp, which is inconsistent and may be rejected or misinterpreted by the LMS. Consider clamping to the score timestamp when duedate - 1 minute is later than the score timestamp.
def _submitted_at_for_score(
    rs_assignment: Assignment, score_timestamp: str, instructor_triggered: bool
) -> str:
    if not instructor_triggered:
        return score_timestamp
    if rs_assignment.duedate is None:
        return score_timestamp
    return _format_lti_timestamp(rs_assignment.duedate - datetime.timedelta(minutes=1))

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