openedx / openedx/openedx-platform

[LTI Provider] Improve logging in send_composite_outcome Celery task

Open
#38,442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.2k
Forks
4.4k
Avg merge
6d 18h
Merged PRs (30d)
42

Description

Problem

The send_composite_outcome Celery task currently produces minimal log output. On success, only the generic Celery trace log is emitted — no context about what grade was sent, to whom, or for which user/course/assignment.

Current log output (on success):

Task lms.djangoapps.lti_provider.tasks.send_composite_outcome[<task-id>] succeeded in 2.3s: None

This makes it difficult to:

  • Confirm which grade value was actually sent to the LTI consumer
  • Identify which user or course/assignment was involved
  • Diagnose failures without external timestamps (e.g., checking Canvas directly)

Suggested Improvements

Add structured log statements inside send_composite_outcome (and related tasks) that include:

  1. User identifier — whose grade is being sent (user ID or anonymized ID)
  2. Course and usage key — which course/assignment triggered the passback
  3. Grade value — the score being submitted (e.g., 0.85)
  4. LTI outcome URL — the endpoint on the consumer side receiving the grade
  5. Result on failure — HTTP status code, response body, or exception detail

Expected Benefit

Operators and support teams can confirm grade passback without needing Canvas-side investigation. Failures become immediately diagnosable from logs alone.

Files Likely Involved

  • lms/djangoapps/lti_provider/tasks.py
  • lms/djangoapps/lti_provider/outcomes.py

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lms/djangoapps/lti_provider/tasks.py at send_composite_outcome, then read lms/djangoapps/lti_provider/outcomes.py to trace the grade passback and related tasks. Done means successful and failed submissions emit structured logs containing the requested user, course/usage key, grade, outcome URL, and failure details.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.