Save the HTTP referer and WordPress post_id in a new context table #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello @otacke!
Thank you very much for your note about filtering verbs!
I'd like to send you this PR for review:
As an additional context array, I'd want to have the
HTTP referrer
and the corresponding WordPresspost_id
from which the H5P content was executed. For my use case, this would give me the remaining information that I'd need.I'm a newbee in all things Web, PHP, Javascript, and I may not yet have the spare learning time to implement a fully functioning H5P gradebook for WordPress using https://github.com/h5p/h5p-php-report yet.
I even used a LRS with https://github.com/otacke/wp-h5p-xapi/tree/remove-hard-directory and that gave me the H5P content URL, but later I also discovered that I also need to have a wordpress hook which also needs the post_id (to set a Tutor LMS lession in which the H5P is used to completed):
This pull request would add a hook to get me the info that I'd need.
Your nice implementation of separate tables for different XAPI data objects
that I also use for this data table minimizes the added database space.
The commit message would be like:
So far, I used the filter below with the additonal arguments to get the information I need.
Instead, an action hook like the one below would be sufficient for me:
I have not tested the hook instead of the filter yet, but I think it should work:
I hope that you like the added post_id and HTTP referer,
and that we can find a way for me to call a hook with them!