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

Fixes database queries related to loading content libraries #4

Merged
merged 1 commit into from
Jan 4, 2016

Conversation

juho-jaakkola
Copy link

Work in progress. Do not merge without proper testing and review.

I'm still not completely sure what exactly the integration should be doing, so some of the changes may include mistakes.

'libraryMajorVersion' => $data->major_version,
'libraryMinorVersion' => $data->minor_version,
'libraryEmbedTypes' => $data->embed_types,
'libraryFullscreen' => $data->fullscreen,
Copy link
Author

Choose a reason for hiding this comment

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

Custom array key names are added here manually just so that they can be immediately renamed again into another array by H5PCore::loadContent()in https://github.com/h5p/h5p-php-library/blob/master/h5p.classes.php#L1735

I'm noticing a bit of a code smell... :)

I think in the long-term the integration library should be refactored to always pass objects as function arguments. That way properties could always be accessed with methods instead of arbitrary array keys. Additionally input type hinting could be used to further clarify what each method is expecting.

I opened a separate issue for further planning and discussion: h5p/h5p-php-library#11

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this is far from ideal.
I suggest we get it working before we start any refactoring.

@icc
Copy link
Member

icc commented Jan 4, 2016

This looks very good to me. I'll merge it in and do some more testing.
I'll also convert some of the TODOs into issues, so we get a better picture of what need to be done.

Good job!

icc added a commit that referenced this pull request Jan 4, 2016
Fixes database queries related to loading content libraries
@icc icc merged commit 9743909 into h5p:master Jan 4, 2016
@juho-jaakkola juho-jaakkola deleted the library_queries branch January 4, 2016 15:14
@ekuncoro ekuncoro mentioned this pull request Feb 5, 2018
golenkovm pushed a commit to golenkovm/h5p-moodle-plugin that referenced this pull request Jun 2, 2022
joel1124 pushed a commit to uofr/h5p-moodle-plugin that referenced this pull request Mar 6, 2023
Add support for result.success & completion
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