-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: unique identifiers #4124
fix: unique identifiers #4124
Conversation
{ | ||
public function getOriginalResourceUri(core_kernel_classes_Resource $resource): ?string | ||
{ | ||
$property = $resource->getProperty(TaoOntology::PROPERTY_TRANSLATION_ORIGINAL_RESOURCE_URI); |
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 see the value of this class, but some points:
- It will be the first time we are creating a class to shortcut ontology getProperty...
- If we keep calling
$resource->getProperty
all the time in a loop or other places, this is actually a performance issue. We would have to cache it.
$this->featureFlagChecker = $featureFlagChecker; | ||
} | ||
|
||
public function retrieve(core_kernel_classes_Resource $resource): ?string |
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 see the value of this class, but some points:
- It will be the first time we are creating a class to shortcut ontology getProperty...
- If we keep calling
$resource->getProperty
all the time in a loop or other places, this is actually a performance issue. We would have to cache it. - If this is a uniqueId retriever, shouldn't it contain the logic to get the unique id in any case? Calling the Proxy you created?
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.
Pre-approved as the expected behavior is working.
Test and styling will be fixed in the integration branch
$this->qtiIdentifierSetters[$resourceType] = $qtiIdentifierSetter; | ||
} | ||
|
||
public function __invoke(core_kernel_classes_Resource $item): void |
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.
We should call it more agnostically $resource
public function __invoke(core_kernel_classes_Resource $item): void | |
public function __invoke(core_kernel_classes_Resource $resource): void |
Fix for unique identifiers + removing unnecessary classes