This attribute is already deprecated for XBlocks in favour of directly
retrieving it like `block.scope_ids.usage_id.context_key`.
This commit also removes some redundant logging code which was omitted in the
Datadog removal in #19420.
We encountered a bug where learners were sometimes not having their
completion information reset when their exam is reset. It was unclear
what was actually causing the completion to not be reset (it usually
is via a signal listener), but the effect was learners being unable to
reset their due dates in order to attempt the exam again since the exam
believed it was still complete.
This PR will likely be duplicating calls to the Completion API, but we
believe that is worthwhile to ensure successful completion state reset.
This is technically a revert of a revert that also includes some new
logic. The original PR was https://github.com/edx/edx-platform/pull/27770
and the revert PR was https://github.com/edx/edx-platform/pull/27973.
The new logic is to mock a request and create a module with user state
taken into account. We also put this into a celery task to help avoid
any potential concerns with recursing through children.