Skip to content

Conversation

@adevicef
Copy link
Contributor

getMetadata fuction returns complete metadata structures for Package, Dublin Core, LOM and LOM-ES. Removed page contents from response, leaving only metadata. Updated test expected file for getMetadata test, and api.md documentation.

@adevicef adevicef marked this pull request as ready for review June 29, 2025 09:27
@erseco erseco requested review from Copilot and erseco June 30, 2025 08:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

The PR refactors getMetadata to return only comprehensive metadata structures for Package, Dublin Core, LOM, and LOM-ES, removing page content from the response and updating documentation accordingly.

  • Restructures the Package schema into nested metadata fields and removes page collection.
  • Simplifies other schemas (Dublin Core, LOM, LOM-ES) to return raw data arrays.
  • Updates the API docs to reflect the metadata-only return value.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/ElpParser.php Overhauled getMetadata: removed page content, restructured Package metadata, and switched other schemas to raw data
docs/api.md Updated the Returns section to indicate metadata-only response
Comments suppressed due to low confidence (2)

src/ElpParser.php:585

  • [nitpick] The schema name 'Dublin core' uses inconsistent capitalization. Consider using 'Dublin Core' for consistency with common conventions.
                'schema' => 'Dublin core',

src/ElpParser.php:547

  • Several new nested metadata fields (e.g., 'description', 'usage', 'project_properties', 'format', 'taxonomy', 'advanced_options') were introduced. Add or update unit tests to verify these fields appear correctly in getMetadata output.
                    'lang' => $data['_lang'] ?? '',

],
'project_properties' => [
'backgroundImg' => $data['_backgroundImg'] ?? '',
'backgroundImgTile' => $data['backgroundImgTile'] ?? '',
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

The key 'backgroundImgTile' is accessed without the leading underscore, while related keys use '_backgroundImg'. If the source field is '_backgroundImgTile', update this index to avoid returning an empty string.

Suggested change
'backgroundImgTile' => $data['backgroundImgTile'] ?? '',
'backgroundImgTile' => $data['_backgroundImgTile'] ?? '',

Copilot uses AI. Check for mistakes.
@erseco erseco merged commit 0d68772 into exelearning:main Jun 30, 2025
6 checks passed
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