Skip to content
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] Keep translation QTI ID the same #4206

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

shpran
Copy link
Contributor

@shpran shpran commented Feb 14, 2025

AUT-3772

Changes

  • Keep the same QTI identifier for translations even if unique ID feature flag disabled

How to test

  1. Disable FEATURE_FLAG_UNIQUE_NUMERIC_QTI_IDENTIFIER feature flag
  2. Enable FEATURE_FLAG_TRANSLATION_ENABLED feature flag
  3. Create new Item/Test
  4. Add some content
  5. Mark Item/Test as Ready for translation
  6. Translate Item/Test
  7. Compare original and translation QTI IDs
  • Previous behaviour: QTI ID is different
  • New behaviour: QTI ID is the same

Companion PRs

Copy link

github-actions bot commented Feb 14, 2025

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
241 241 0 0

$this->getQtiIdentifierSetter($resource)->set([
AbstractQtiIdentifierSetter::OPTION_RESOURCE => $resource,
AbstractQtiIdentifierSetter::OPTION_IDENTIFIER => $uniqueIdentifier,
]);

if ($this->featureFlagChecker->isEnabled('FEATURE_FLAG_UNIQUE_NUMERIC_QTI_IDENTIFIER')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@shpran I wonder if we really need this if here now? If we are creating a translation, it may be useful to for them to have always the same TaoOntology::PROPERTY_UNIQUE_IDENTIFIER?

I know this is only needed for HKDir for the moment, but I do not see why restrict is as default behavior.

  • I know it was previous rule in place, but better thinking about it, we may remove this condition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If for us it's not a problem if we are going to set this property every time - I will remove this condition 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@gabrielfs7 gabrielfs7 left a comment

Choose a reason for hiding this comment

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

Awesome!

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful

Copy link

Version

Target Version 54.31.1
Last version 54.31.0

There are 0 BREAKING CHANGE, 0 feature, 1 fix

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.

2 participants