Skip to content

Conversation

@bra-i-am
Copy link

@bra-i-am bra-i-am commented Jan 9, 2026

Description

This pull request updates the block creation logic in view_handlers.py to ensure that all operations related to creating and syncing a block are performed within a bulk operation context, improving data consistency and performance.

Improvements to block creation and synchronization:

  • Ensured that the modulestore is instantiated and its bulk_operations context is used when creating a new block, so all related changes are grouped and atomic.
  • Moved the store instantiation to the top of the function and reused it in both the block creation and library content synchronization steps, reducing redundant code and potential errors.

Testing instructions

Please follow the instructions to test eduNEXT/frontend-app-authoring#2; the difference you would find with and without this change is that this allows adding problems again and again

@bra-i-am bra-i-am marked this pull request as ready for review January 14, 2026 13:14
@MaferMazu MaferMazu self-requested a review January 15, 2026 15:55
@MaferMazu MaferMazu self-assigned this Jan 17, 2026
Copy link

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bra-i-am Thanks a lot for this PR! ✨

It definitely helps with performance and data consistency, treating the creation as a bulk operation.

Thanks ✅

@MaferMazu MaferMazu merged commit 18e5b2c into open-release/teak.ceibal Jan 17, 2026
47 checks passed
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.

3 participants