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

Author: bmtcrilCreated Sep 17, 2026Updated Sep 18, 2026
Labelsbughelp wanted

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.

Source: openedx/openedx-platform