-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unique Id for Block #218
Comments
I'm not sure it makes sense to have general "information service". I'd rather be more specific/selective, and have services for info about the course, about the current user, and perhaps about the block. Although, simply exposing |
I'd tend to agree with cpennington. This feels core. I'd rather have this available in the XBlock than in an external service. It's not really clear how to write a lot of the client-side code clearly, in particular, without having unique IDs if there are multiple of the same type of XBlock on the same page. My personal preference would be towards something like self.usage or self.id. This would |
This issue is quite old, but in case someone finds it, the Fields API allows initializing a field with See: @cpennington, @pmitros - I assume that due to code from https://github.com/edx/XBlock/pull/249 this issue should be closed. |
@taniwallach I believe @cpennington is now at Reify Health (and sports an awesome beard). I'm also no longer actively involved in Open edX development (and don't appear to have commit access anymore). |
Reported by @pmitros: "To construct useful XBlocks, I need access to a unique ID per element. Cale mentioned this is available in self.scope_ids.usage_id. This is good and useful, but entirely undocumented."
@nedbat: "Yes, let's add this to the list of useful factoids that can be retrieved from the information service, along with student name, course name, etc."
The text was updated successfully, but these errors were encountered: