Closed Jarvil closed 10 months ago
Noted, will look when I get time.
Great!
Yes I can replicate. But there is a problem. The H5P mod script is a dynamic one that orchestrates itself on page load to generate the markup required to the available space (there is a resize script to cope with window resize). But if the script detects that the content is hidden (i.e. display: none) then it does not render it. When the container 'display' is changed by CT then the script is unaware that it needs to recalculate things etc.
Looking at h5p-resizer.js with:
// Let h5p iframes know we're ready!
var iframes = document.getElementsByTagName('iframe');
var ready = {
context: 'h5p',
action: 'ready'
};
for (var i = 0; i < iframes.length; i++) {
if (iframes[i].src.indexOf('h5p') !== -1) {
iframes[i].contentWindow.postMessage(ready, '*');
}
}
there might be a way of telling the H5P frames when the state changes and therefore to redraw.
Do you know?
To be continued....
Marked as an 'Enhancement' as not a fault with the code but integration with a 3rd party plugin.
Hello,
I'm sorry but I don't know H5P myself any better.
You should see;
Is this still an issue?
@Jarvil Is this still an issue?
No more information forthcoming, closing.
Hello,
There is a problem with Collapsed topic and H5P Embed -feature (iframe).
Tested with Moodle 3.3, Mod_hvp 1.6 and format_topcoll 3.3.1.0 (2017042202) and Clean-theme
Steps to repeat;
Embed H5P activity to some section f.ex section 1 Click "close all" to fold all sections Edit some random activity on the course (no need to edit it) and select "save and return to course" Expand the section 1 and notice how the embedded H5P-activity isn't displayed, it only displays the bottom bar of the embedded H5P-activity If you refresh the page with F5 then the embedded activity is displayed. So the problem is that embedded H5P-activity isn't displayed if you fold all sections -> edit something -> return to the cousre frontpage until you manually refresh the page.