Revert "feat: remove field-data binding from the runtime [FC-0026]" (#32740)

* Revert "feat: remove `field-data` service from runtime initialization"

This reverts commit 6c435bb68c.

* Revert "feat: remove field data binding from the runtime"

This reverts commit 5f46ea52cd.
This commit is contained in:
Piotr Surowiec
2023-07-13 19:04:02 +02:00
committed by GitHub
parent 472104a1a6
commit fa06be106e
9 changed files with 65 additions and 23 deletions

View File

@@ -201,7 +201,7 @@ class RebindUserService(Service):
with modulestore().bulk_operations(self.course_id):
course = modulestore().get_course(course_key=self.course_id)
self._ref["prepare_runtime_for_user"](
inner_student_data = self._ref["prepare_runtime_for_user"](
user=real_user,
student_data=student_data_real_user, # These have implicit user bindings, rest of args considered not to
block=block,
@@ -215,10 +215,12 @@ class RebindUserService(Service):
[
partial(DateLookupFieldData, course_id=self.course_id, user=self.user),
partial(OverrideFieldData.wrap, real_user, course),
partial(LmsFieldData, student_data=student_data_real_user),
partial(LmsFieldData, student_data=inner_student_data),
],
)
block.scope_ids = block.scope_ids._replace(user_id=real_user.id)
class EventPublishingService(Service):
"""