openedx / openedx/openedx-platform

Bug: calculate_problem_responses_csv raises UsageKeyNotInBlockStructure with no way for the instructor to see it

Open
#39,119 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

POST /api/instructor/v2/courses/<key>/reports/problem_responses/generate for a
problem whose section was published within the last publish-task delay (~30 s on
Tutor) answers 200, and the task then raises UsageKeyNotInBlockStructure. The
report reads the collected block structure, which the delayed publish task
rebuilds.

There is no task id returned for this task to read the failure from, and
instructor_tasks lists only running tasks, so it is simply empty. To the
instructor the report just never appears, with no error anywhere in the UI.

Expected: validate the location against the collected structure in the view
and answer 400 with a clear message, or have the task fall back to the
modulestore. Returning a task id as other tasks do would also let a client surface
the failure.

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 at POST /api/instructor/v2/courses//reports/problem_responses/generate and trace the report task that reads the collected block structure. Reproduce the recent-publish timing, then inspect how instructor_tasks exposes task failures. Done means the instructor receives a clear 400 response or the task failure is surfaced through a returned task id, with coverage for this race.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.