Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Pål Jørgensen
    @fnoks
    @juho-jaakkola : I don't know of the email you are talking about. I guess @falcon-git, who was not at work yesterday, knows more about that.
    I am at least positive to try out the PR-way. What about you, @icc ?
    Frode Petterson
    @icc
    Yes, I can't see any harm in that :-)
    Kelvin Mungai
    @munga4

    @juho-jaakkola Hi can you help on this please Currently we can't upgrade out H5P content to the latest version of the H5P content libraries. One of our H5P contents causes it to crash. We need to find which one it is, and the submit this to the H5P team as a bug.

    The best way to find it I think would be using a manual "divide and conquer" method. I.e. on a local system, we delete half of the H5P content and see if the update works. Then we can eliminate half of the H5P contents, and then we continue like this until we find the one that crashes.

    Juho Jaakkola
    @juho-jaakkola
    @fnoks @icc My bad, the email was indeed sent only to @falcon-git. :) The PR way is of course a bit slower because you need to wait for review, and additionally you may need to rebase some of the pending PRs if they become too diverged from the master. But in the end it this workflow results in better code, so I believe it is worth the trouble.
    @munga4 sorry, but I'm not in the official H5P dev team. I'm also still just learning how H5P works.
    I'm confused because this is not the first time people are asking H5P support from me directly. what have I done wrong (right?)? :D
    Kelvin Mungai
    @munga4
    @juho-jaakkola Cool no problem
    @usernamenumber Hey can you help me on this, Currently we can't upgrade out H5P content to the latest version of the H5P content libraries. One of our H5P contents causes it to crash. We need to find which one it is, and the submit this to the H5P team as a bug.
    Kelvin Mungai
    @munga4
    @mjannino Again are you familiar with H5p libralies?
    Kelvin Mungai
    @munga4
    @icc Hello are you familiar with h5p libraries
    Juho Jaakkola
    @juho-jaakkola
    FYI this is the official H5P team: https://github.com/orgs/h5p/people
    Frode Petterson
    @icc
    @munga4 What is the error message printed? You could try to open the browser console (Ctrl+Shift+J in Chrome) to look for further errors.
    Kelvin Mungai
    @munga4
    @icc when we try to sync we always get error on libraries
    Frode Petterson
    @icc
    @munga4 what do you mean sync, is it the content upgrade process? How do you know you're having an error, is the system hanging or do you get an error message?
    Kelvin Mungai
    @munga4
    @icc I normally get an error message
    @icc When we try to pull the content from the server to the local machine
    Frode Petterson
    @icc
    @munga4 you must make sure that you get all the files inside wp-content/uploads/h5p/* for WordPress or sites/default/files/h5p/* for Drupal.
    Kelvin Mungai
    @munga4
    @icc Cool thank you but we already have 2015-2016 libraries and we want them to be upgrading each time there is library which has comeup.
    @icc We are using open source
    Frode Petterson
    @icc
    @munga4 That is good. Unfortunately, there's no automatic upgrade for old content yet. You have to visit the Libraries page and then use the green arrowed upgrade button next to the content type you wish to upgrade, like in this guide: https://h5p.org/update-all-content-types
    New content that is created will use the latest version.
    Juho Jaakkola
    @juho-jaakkola
    is it possible to register a custom event handler that would get triggered when course presentation sends the results to server?
    Frode Petterson
    @icc
    @juho-jaakkola you should be able to use the externalEventDispatcher described here: https://h5p.org/documentation/x-api
    But you must check the event data
    Juho Jaakkola
    @juho-jaakkola
    ok, thanks! I'll look into that.
    the moodle plugin has the problem that the last slide of course presentation tells the amount of correct answers, but there's no way of telling the user whether the points were enough to get a passing grade or not.
    I'm trying to figure out a workaround for that.
    (it seems the summary page needs some refactoring before something like that can be implemented to it out of the box.)
    Kelvin Mungai
    @munga4
    @icc Thank you very much i will try to work with this and see whats up!!!
    Kelvin Mungai
    @munga4
    @icc Actually the WordPress managed to fix the bug someone can upgrade automatic.
    Frode Petterson
    @icc
    I'm glad it worked out!
    Kelvin Mungai
    @munga4
    @icc yeah thank you.
    Juho Jaakkola
    @juho-jaakkola
    for some reason I'm not able to access the iFrame contents form a script added to parent. is there something special in the way the iframe is being added to the page?
    Juho Jaakkola
    @juho-jaakkola
    AFAIK accessing the contents should be as easy as:
    $( ".h5p-iframe" ).contents().find( ".selector" ).doStuff("foo");
    Frode Petterson
    @icc
    @juho-jaakkola yes, you should be able to access the iframe using that code. Do you get any error messages?
    Juho Jaakkola
    @juho-jaakkola
    no errors. it simply does not have any affect.
    Frode Petterson
    @icc
    What does this give you?
    H5P.jQuery('.h5p-iframe')[0].contentWindow.H5P;
    Juho Jaakkola
    @juho-jaakkola
    that works. I get the H5P object.
    Juho Jaakkola
    @juho-jaakkola
    can I use that to modify the DOM inside the iframe?
    Frode Petterson
    @icc
    it might be that you have to use the jQuery inside the iframe,...contentWindow.H5P.jQuery('selector')
    but I guess it depends on what you want to do
    Juho Jaakkola
    @juho-jaakkola
    indeed, that did the trick! thanks!
    Juho Jaakkola
    @juho-jaakkola
    although that works only when I bind it to a user-triggered event. I cannot seem to find a reliable way to bind it to loading of the page.
    Juho Jaakkola
    @juho-jaakkola
    this works:
    H5P.jQuery(document).on('click', function() {
        H5P.jQuery('.h5p-iframe')[0].contentWindow.H5P.jQuery('.selector').append('TEST');
    });
    Frode Petterson
    @icc
    ah, have you tried listening to the iframe's 'load' event?
    Juho Jaakkola
    @juho-jaakkola
    yes, doesn't help
    there must be something I'm missing...
    Juho Jaakkola
    @juho-jaakkola
    H5P.jQuery('.h5p-iframe').ready(function () {
        H5P.jQuery('.h5p-iframe')[0].contentWindow.H5P.jQuery('.selector'); // -> Cannot read property 'jQuery' of undefined
    });
    Frode Petterson
    @icc
    It might be that you get two events, and that it's only the second that will work
    Juho Jaakkola
    @juho-jaakkola
    shouldn't I then get console.log('test') printed twice? that is not happening.