Skip to content

TICKET-583: Include due date in LTI gradebook sync#7872

Open
Naragod wants to merge 6 commits intomasterfrom
TICKET-583_lti_sync_due_date
Open

TICKET-583: Include due date in LTI gradebook sync#7872
Naragod wants to merge 6 commits intomasterfrom
TICKET-583_lti_sync_due_date

Conversation

@Naragod
Copy link
Copy Markdown
Contributor

@Naragod Naragod commented Mar 20, 2026

Proposed Changes 🐛 Bug fix

When creating or updating a gradebook item via LTI, MarkUs sends a line item payload to Canvas containing the assignment label, resource ID, and maximum score. The dueAt field supported by the LTI Assignment and Grade Services (AGS) specification was missing from this payload, and the due date set in MarkUs remained absent on the corresponding Canvas assignment. The fix adds dueAt as an ISO 8601 timestamp to the payload when the assessment has a due date, ensuring it is synced during both line item creation and updates.

Screenshots of your changes (if applicable) Screenshot 2026-04-20 at 9 36 57 PM
Screen.Recording.2026-05-07.at.12.29.06.PM.mov
Associated documentation repository pull request (if applicable)

Type of Change

(Write an X or a brief description next to the type or types that best describe your changes.)

Type Applies?
🚨 Breaking change (fix or feature that would cause existing functionality to change)
New feature (non-breaking change that adds functionality)
🐛 Bug fix (non-breaking change that fixes an issue) X
🎨 User interface change (change to user interface; provide screenshots)
♻️ Refactoring (internal change to codebase, without changing functionality)
🚦 Test update (change that only adds or modifies tests)
📦 Dependency update (change that updates a dependency)
🔧 Internal (change that only affects developers or continuous integration)

Checklist

(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the [ ] into a [x] in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)

Before opening your pull request:

  • I have performed a self-review of my changes.
    • Check that all changed files included in this pull request are intentional changes.
    • Check that all changes are relevant to the purpose of this pull request, as described above.
  • I have added tests for my changes, if applicable.
    • This is required for all bug fixes and new features.
  • I have updated the project documentation, if applicable.
    • This is required for new features.
  • If this is my first contribution, I have added myself to the list of contributors.

After opening your pull request:

  • I have updated the project Changelog (this is required for all changes).
  • I have verified that the pre-commit.ci checks have passed.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported by Coveralls.
  • I have requested a review from a project maintainer.

Questions and Comments

(Include any questions or comments you have regarding your changes.)

@Naragod Naragod marked this pull request as draft March 20, 2026 21:05
@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Mar 20, 2026

Coverage Report for CI Build 25508597171

Coverage increased (+0.003%) to 91.729%

Details

  • Coverage increased (+0.003%) from the base build.
  • Patch coverage: 67 of 67 lines across 4 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 48751
Covered Lines: 45463
Line Coverage: 93.26%
Relevant Branches: 1870
Covered Branches: 971
Branch Coverage: 51.93%
Branches in Coverage %: Yes
Coverage Strength: 130.21 hits per line

💛 - Coveralls

@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch from 5ac1ae4 to 100ca98 Compare March 23, 2026 14:17
@Naragod Naragod marked this pull request as ready for review March 23, 2026 14:17
@Naragod Naragod requested a review from donny-wong March 23, 2026 14:18
@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch 2 times, most recently from 78c0eda to ca824e6 Compare March 24, 2026 20:23
Copy link
Copy Markdown
Contributor

@donny-wong donny-wong left a comment

Choose a reason for hiding this comment

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

Thanks for this. However, when I tested it locally, the due date was still not syncing to Canvas. Are you able to sync on your end?

@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch from ca824e6 to c29ef77 Compare March 25, 2026 18:06
@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch from c29ef77 to 33fe566 Compare April 21, 2026 01:52
@Naragod
Copy link
Copy Markdown
Contributor Author

Naragod commented Apr 21, 2026

Thanks for this. However, when I tested it locally, the due date was still not syncing to Canvas. Are you able to sync on your end?

Hi Donny, I have updated PR and posted a screenshot.

@Naragod Naragod requested a review from donny-wong April 21, 2026 02:56
@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch from 33fe566 to 41cbd44 Compare April 21, 2026 16:41
@Naragod Naragod linked an issue Apr 23, 2026 that may be closed by this pull request
@donny-wong
Copy link
Copy Markdown
Contributor

Thanks for this. However, when I tested it locally, the due date was still not syncing to Canvas. Are you able to sync on your end?

Hi Donny, I have updated PR and posted a screenshot.

Thanks @Naragod , strange, I am still unable to sync it. Maybe you can show me tomorrow.

Thanks for this. However, when I tested it locally, the due date was still not syncing to Canvas. Are you able to sync on your end?

Hi Donny, I have updated PR and posted a screenshot.

Hi @Naragod , strange, I still cannot sync it on my end. Would you have some idea why that would be?

@Naragod Naragod force-pushed the TICKET-583_lti_sync_due_date branch from 41cbd44 to 1117257 Compare May 7, 2026 16:27
@donny-wong donny-wong requested a review from david-yz-liu May 8, 2026 03:30
Comment thread app/models/assessment.rb
self.completed_result_marks.count(&:zero?)
end

# Re-pushes line item metadata to any LMS that already has this assessment linked,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general please make callback methods private.

it 'sends JSON body with correct LTI AGS Content-Type' do
allow(lti_deployment).to receive(:send_lti_request!) do |req, *|
expect(req.content_type).to eq('application/vnd.ims.lis.v2.lineitem+json')
body = JSON.parse(req.body)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure about the interaction with the content type here, but please try using req.parsed_body instead (which should do the JSON parsing for you); we do this in several other tests.

Comment thread Changelog.md
- Added term-based suffixes to course names created via LTI to ensure uniqueness across academic years (#7881)

### 🐛 Bug fixes
- Sync due date when creating or updating LTI gradebook line items, and re-sync automatically when an assessment is edited (#7756)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please correct the PR number and move this to "enhancements"

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.

LTI - create new gradebook items does not sync due date

4 participants