You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The way I read this comment is that if someone calls block.location = ... on a block from SplitMongo, then we will be a "wrong" situation. So, is this only called for blocks from the OldMongo stub store, which IIRC are only CourseBlocks at this point?
The reason will be displayed to describe this comment to others. Learn more.
I think that the whole reason "split" is called "split" is because definition data is separate from usage data. And they have different types of identifiers. So it's definitely wrong to assign some value to both scope IDs in split mongo. (In Learning Core, who knows - we might get rid of the definition IDs).
But I don't even know if/when this setter would ever be used. Normally you set an XBlock's scope_ids in the constructor and they never change for the life of the block. The only thing that can change is the user_id can be modified when the block is (re)bound to a user. Personally, I'd want to just remove this @location.setter function entirely, and see if anything breaks. "Old Mongo" might still be used for reading some legacy courses which are still in that format, but I'm not sure if this code path is involved in that or not.
d44ca41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bradenmacdonald , I ran across this comment while looking into some followup on openedx/XBlock#690.
The way I read this comment is that if someone calls
block.location = ...
on a block from SplitMongo, then we will be a "wrong" situation. So, is this only called for blocks from the OldMongo stub store, which IIRC are only CourseBlocks at this point?d44ca41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the whole reason "split" is called "split" is because definition data is separate from usage data. And they have different types of identifiers. So it's definitely wrong to assign some value to both scope IDs in split mongo. (In Learning Core, who knows - we might get rid of the definition IDs).
But I don't even know if/when this setter would ever be used. Normally you set an XBlock's scope_ids in the constructor and they never change for the life of the block. The only thing that can change is the
user_id
can be modified when the block is (re)bound to a user. Personally, I'd want to just remove this@location.setter
function entirely, and see if anything breaks. "Old Mongo" might still be used for reading some legacy courses which are still in that format, but I'm not sure if this code path is involved in that or not.d44ca41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kdmccormick ^
d44ca41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me 👍🏻