fix: show Edit button in popup/new/open/frame display modes#46
Conversation
ignaciogros
left a comment
There was a problem hiding this comment.
In the "Iframe" options, the fullscreen and the "Edit in eXeLearning" button are not working.
I don’t really see what this option adds, because "Embed" also uses an iframe. Should we remove it?
If we decide to keep it, I'llfix a few minor presentation issues once the functionality is fixed.
Thanks.
- Render the action bar (eXeLearning Edit button) in the workaround view used by Display = In pop-up, Open and New window. The button was previously only available in Embed mode, leaving teachers no way to edit the package from any of these display modes. - Remove the legacy In frame (HTML4 frameset) display option per reviewer feedback. The mode duplicated Embed (which already uses an iframe) and made the editor modal and fullscreen control unusable. Existing activities saved with display=FRAME are migrated to EMBED on upgrade and the orphan framesize admin setting is dropped.
309f147 to
bb0ae30
Compare
|
I've updated the branch to address @ignaciogros' review. The new approach follows your suggestion to drop the In frame display mode instead of trying to repair it: as you pointed out, Embed already covers the same need via What changed
Test plan
Sibling PR with the analogous fix on the SCORM side: exelearning/mod_exescorm#59. |
When the embedded eXeLearning editor modal is opened from inside a small frame (e.g. a popup-mode launcher or any embedded iframe), the overlay was previously appended to that cramped frame's body. The result was a dialog "stuck at the bottom" of the frame with the Save/Close buttons rendered out of reach. Walk up the window chain to the topmost same-origin window before mounting, so the overlay always covers the full viewport. Cross-origin parents fall back to the current window. Mirrors exelearning/mod_exeweb#46.
ignaciogros
left a comment
There was a problem hiding this comment.
After updating the plugin, a SCORM package displayed in an iframe still shows the iframe option in the activity Settings dropdown (and it remains selected):
But even with that value selected, saving the changes renders the content correctly as if the iframe option did not exist, and it can be edited without problems.
What is missing is the automatic conversion from the iframe type to the expected one.
Summary
Fixes #43.
mod_exeweb/action_bartemplate (which carries the eXeLearning Online / embedded editor Edit button) inexeweb_print_workaround()and in the FRAME-mode top frame. Previously the Edit button only existed inembed_general.mustache, so any teacher whose activity used In popup / Open / New window / In frame had no way to edit the package from the activity view.Test plan
exewebactivity with Display = In pop-up and confirm the Edit button is visible on the activity view and opens the editor modal.Moodle Playground Preview
The changes in this pull request can be previewed and tested using a Moodle Playground instance.