openedx / openedx/xblocks-core

test: port grades/tests/integration/test_problems.py coverage (grades pipeline + ProblemBlock)

Open
#266 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
15
Avg merge
5d 16m
Merged PRs (30d)
7

Description

Context

As part of the Slash-n-Burn Built-In XBlocks epic (openedx-platform#37819), the file `grades/tests/integration/test_problems.py` was deleted from openedx-platform in PR #38751.

This test file covered grades-pipeline integration with ProblemBlock, which now lives in xblocks-contrib. The coverage was not ported before deletion.

What needs to be ported

`grades/tests/integration/test_problems.py` covered:

  • Grades pipeline integration — full grade calculation flow with ProblemBlock as the leaf component
  • Score update propagation — `SCORE_PUBLISHED` signal handling through the grades subsystem
  • Problem submission → grade — end-to-end: student submits answer → score stored → course grade updated
  • Weighted grading — subsection and course-level grade aggregation with ProblemBlock scores
  • Graded vs ungraded — behaviour differences when a ProblemBlock is inside a graded vs ungraded subsection

This integration test lives in the grades subsystem today but its primary subject — ProblemBlock correctness under grading — should have a home in xblocks-contrib.

Acceptance Criteria

  • Port equivalent integration tests into xblocks-contrib (may require a lightweight grades-stub or rely on openedx-platform test infrastructure via tox)
  • Tests should exercise ProblemBlock's grading contract without depending on xmodule internals
  • CI must remain green

Related

  • openedx-platform PR: #38751
  • Epic: openedx-platform#37819

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 by reading the deleted grades/tests/integration/test_problems.py coverage and the linked openedx-platform PR #38751. Then inspect the ProblemBlock implementation in xblocks-contrib and determine whether a lightweight grades stub or tox-based openedx-platform infrastructure is appropriate. Done means equivalent tests cover grading flow, score propagation, submissions, weighted aggregation, and graded versus ungraded subsections while CI stays green.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.