Skip to content

feat: hydrate learner state for paginated assessment children - #465

Merged
santhosh-apphelix-2u merged 1 commit into
release-ulmofrom
fix-incremental-assessment-state
Sep 10, 2026
Merged

feat: hydrate learner state for paginated assessment children#465
santhosh-apphelix-2u merged 1 commit into
release-ulmofrom
fix-incremental-assessment-state

Conversation

@santhosh-apphelix-2u

Copy link
Copy Markdown

Summary

Fixes CR-8239, where incrementally loaded assessment questions could appear unanswered even though the learner’s attempt state existed in StudentModule.

When the learner submitted the question again, the backend detected the existing attempt and returned:

The state of this problem has changed since you loaded this page.

Root cause

Lazy children were obtained through parent.get_children() and could already be bound to the parent’s shallow field-data cache. When the endpoint later supplied the correct batch cache, bind_for_student() skipped rebinding because the user ID was unchanged. As a result, the question rendered with default state instead of the learner’s persisted answer and attempt count.

Changes

  • Resolve lazy children as fresh, unbound modulestore descriptors.
  • Hydrate the learner state cache before binding and rendering children.
  • Batch descendant state loading to avoid one state lookup per child.
  • Preserve dynamic child selection, access checks, completion behavior, masquerading, and usage-key ordering.
  • Display and retry individual lazy-load failures in the frontend.
  • Add regression coverage for persisted problem state and batch cache population.

@santhosh-apphelix-2u
santhosh-apphelix-2u merged commit 143b11b into release-ulmo Sep 10, 2026
127 of 129 checks passed
@santhosh-apphelix-2u
santhosh-apphelix-2u deleted the fix-incremental-assessment-state branch September 10, 2026 03:21
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.

2 participants