• Hi, maybe my question is not for here but I’ll be grateful for any guidelines where to find information.

    In h5p mycred integration there is a hook which gives points for complete h5p exercise but only the first time. I want to give points every time when user do the same exercise over and over again.

    I’m not a programmer but I think if I can get the code of that hook it just have to change the option: not to check if this exercise is done before!?

    Is my logic right or it’s more complicated than that? ??

    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi gazarko!

    I assume that indeed the support of the mycred plugin is the right place for your question, because the feature that you describe has not been created by the H5P core team.

    If you want to check the code before – even though you’re not a programmer – then you can check the “Development” tab of any WordPress plugin listed in the WordPress repository in order to get access to the code, here https://www.ads-software.com/plugins/mycred-h5p/#developers.

    I glanced at the code, and although I don’t know for sure what the “has_entry” function is for and I’d have to take a deeper look, the plugin seems to check whether a result has been stored before for the current user/content and in that case skips processing (https://plugins.trac.www.ads-software.com/browser/mycred-h5p/trunk/includes/mycred-h5p-specific-hook.php#L55). You could try to (temporarily) uncomment lines 54 to 57 in the respective file in your wp-content/plugins/mycred-h5p folder and check whether that helps, but that won’t be a final solution, because a) any update of the plugin would overwrite your changes and b) there should rather be some way to configure the behavior in the plugin.

    Cheers,
    Oliver

    Thread Starter gazarko

    (@gazarko)

    Hi Oliver!

    Thank you very much for your time and response, it’s very useful!
    In mycred you can create custom hooks, so my plan is to get the code from the primary hook and with little modification to create my hook.
    Again thank you for your support.

    Best Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘H5p hooks for mycred’ is closed to new replies.