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: avoid property duplication in meta metadata #2578

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bartlomiejmarszal
Copy link
Contributor

This will avoid custom properties duplication when exporting tests.

How to test.

  1. Create test with multiple items
  2. Export it using any handler
  3. Download QTI package
  4. Open imsmanifest.xml, check if any property is duplicated.

@bartlomiejmarszal bartlomiejmarszal changed the base branch from master to develop February 12, 2025 16:51
@bartlomiejmarszal bartlomiejmarszal requested review from a team, tikhanovichA, KirylHatalski, pnal, Karol-Stelmaczonek and viktar-dzmitryieu-tao and removed request for a team February 12, 2025 16:51
Copy link
Contributor

@tikhanovichA tikhanovichA left a comment

Choose a reason for hiding this comment

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

Review Checklist

  • 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
  • Pull request's target is not master
  • Commits are following conventional commits
  • Commits messages are meaningful
  • Commits are atomic
  • Changelog is updated according to changes (if applicable)
  • Documentation is updated according to changes (if applicable)


foreach ($properties as $property) {
$propertyExists = false;
if (!empty($customProperties)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that it should not be empty already cause you created them above, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$this->getCustomProperties($manifest); should return empty array on a first loop.

Copy link
Contributor

@Karol-Stelmaczonek Karol-Stelmaczonek left a comment

Choose a reason for hiding this comment

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

  • 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

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.

5 participants