Okay
  Public Ticket #3362834
html block in quiz unit
Closed

Comments

  •  12
    MeesterGijs started the conversation

    Hello Alex,

    With the help of a developer I was able to add this code to my quiz. Trying to bring these two closer together. Every quiz has its own height, so it quite a challenge. I don't mind adding this bit of code to all 400 quizzes, but first it has to work. Any idea why, once added, it doesn't show?


    <script>

    const height = document.querySelector('.new_quiz_h5p_wrapper.wplms_iframe_wrapper iframe').contentWindow.document.querySelector('.h5p-content').clientHeight;

    document.querySelector('.new_quiz_h5p_wrapper.wplms_iframe_wrapper iframe').style.height = height + 25 + 'px';

    </script>


  • [deleted] replied

    the scripts cannot be injected in quiz because of react framework . even if you are able to print it injecting it to content it wont run . 

    we can't fix the height there without remocing the custom css that is there to set min height of your quiz . 

  •  12
    MeesterGijs replied

    "we can't fix the height there without remocing the custom css that is there to set min height of your quiz . "

    Can you explain that a bit more? What code is that and what would happen if I delete that custom code?

  • [deleted] replied

    Please share your site url and admin creds in private reply

  •   MeesterGijs replied privately
  • [deleted] replied

    Ok I checked this and found that we have set min height of h5p content o 500px . this is why the issue is appearing

     ,, we would try to fix this in next update of h5p plugin . 


  •  12
    MeesterGijs replied

    Maybe it's possible to let the content of the h5p quiz decide how much px is needed?

    I'll add it to the lit and will patiently? wait for the update. Thank you. :)

  • [deleted] replied

    yes that's what we are doing but there is mistake we left min height 500px;

  •  12
    MeesterGijs replied

    Hi Alex,

    Any updates on this? You acknowledged the mistake, when to expect the fix?

    Thanks again,

    Gijs

  • [deleted] replied

    yes this is still pending : 

    https://trello.com/c/quaQ4xVn

  •  12
    MeesterGijs replied

    Let's keep this open till issue is resolved with a fix.

    Any idea when to expect one?

    Gijs