Conversation
|
Great job @erseco After the first tests:
- In certain situations, the edit button with eXe appears in places where it shouldn't.
|
|
Hi @pabloamayab I’ve made the requested corrections based on your previous review. Could you please check it again when you have a moment? Thanks. |
ignaciogros
left a comment
There was a problem hiding this comment.
Thank you for this great tool, @erseco.
I've been testing with Moodle 4.5.10 using the static editor.
If you add a new activity an click on "Save and display" you get this PHP error:
Exception - array_keys(): Argument #1 ($array) must be of type array, null given
The same error is displayed when you click con "Save and return" (it returns to the course) and then you click on the name of the activity to see it.
Apart from that, the "Edit in eXeLearning" button is visible when Moodle's "Edit mode" is off, but that's just a detail.
|
I suggest creating a new branch for this and integrating the development into this repository as soon as possible, so it's easier to contribute. |
I fixed this exception, please review again if you can
yjs-loader.js?v=v0.0.0-alpha:26 [EmbeddingBridge] Rejected message from untrusted origin: https://moodle.educarex.es
|
|
I also think it would be useful for some administrations to have available de "File" menú, in case they want users to use one of their templates, or let users download thei rcontents in different formats, import an elp/elpx... This would be the same for both plugins |
Simplify workflow using blueprint-file input and update README with the Moodle Playground SVG button.
The GITHUB_TOKEN lacks write permissions on the base repo when the PR comes from a fork. Skip the job entirely in that case.
…ontent to blueprint
Set display=1 (Embed) so content renders inline instead of showing a "Click link to view" download link.
Non-admins see "contact your site administrator", admins see a link to the plugin settings page. Translations added for en/es/ca/eu/gl.
Build the link with target=_top directly in the HTML output instead of passing it through lang strings where Moodle HTML Purifier strips the target attribute. Use a custom error page for admin instead of moodle_exception.
Remove link button that navigated incorrectly inside iframe. Admin now sees a text message to install from plugin settings.
…matting - Remove duplicate string blocks in es/ca/eu/gl lang files - Remove unused embeddednotinstalled base string (only admin/contactadmin variants are used) - Fix concatenated string definitions on same line
Change the editor install/uninstall UX to match wp-exelearning: - Button text changes to "Installing..." / "Removing..." while running - Spinner with message "This may take a minute..." instead of progress bar - Translations added for en/es/ca/eu/gl
- Add admin setting widget, external services, and installer classes - Add source resolver for moodledata/bundled editor precedence - Add capability mod/exescorm:manageembeddededitor - Simplify editor/static.php and lib.php helper functions - Remove obsolete AMD build files (edit_confirmation, editor_modal, fullscreen) - Update README and version
The min.js files for editor_modal, edit_confirmation, fullscreen and moodle_exe_bridge were accidentally deleted. Restore them from source since they are still referenced by player.php and view.php.
Pre-populate all settings with their defaults so the Playground shows filled-in values instead of empty fields.
- Restore edit_confirmation.min.js and fullscreen.min.js from main (properly compiled AMD format with source maps) - Manually transpile editor_modal.js ES modules to AMD define() wrapper
Moodle Playground runs in debug mode and loads from amd/src/ directly. ES module import/export syntax fails with RequireJS. Convert editor_modal.js and edit_confirmation.js to AMD define() format so they work in both debug and production modes.
Replace throw moodle_exception (returns 500) with a custom HTML error page function (returns 200), matching the approach used in mod_exeweb. This prevents a 500 error when the editor opens inside an iframe and the embedded editor is not yet installed.
Extract only the origin (scheme + host) from wwwroot instead of using the full URL. The EmbeddingBridge compares message origins which don't include the path, causing "Rejected message from untrusted origin" on deployments with a subpath (e.g. Moodle Playground).






This pull request introduces several foundational improvements to the project, focusing on build automation, environment configuration, packaging, and editor integration. The most significant changes include the addition of a comprehensive
Makefilefor cross-platform development, a new GitHub Actions workflow for automated releases, environment variable management, packaging rules, and the initial implementation of a modal controller for the embedded eXeLearning editor.Build and Packaging Automation:
Makefileto automate Docker management, dependency installation, code linting, testing, static editor building, submodule management, and packaging into distributable ZIP files. The Makefile includes robust environment and Docker checks, OS detection, and help documentation..distignorefile to control which files and directories are excluded from the distributable package, ensuring clean and minimal releases..env.disttemplate file to document and manage required environment variables for local development and Docker Compose usage. (,R1-R21)Release Workflow:
.github/workflows/release.yml) to automate building the static editor, packaging the plugin, and uploading the ZIP file as a release asset whenever a new release is published.Editor Integration:
amd/src/editor_modal.js, which provides a modal overlay for the embedded eXeLearning editor. This includes fullscreen modal creation, save/close button handling, postMessage communication with the iframe editor, and integration with Moodle's string APIs and logging.exelearningsubmodule in.gitmodulespointing to the appropriate feature branch for the embedded static editor.These changes lay the groundwork for streamlined development, consistent packaging, and seamless integration of the embedded editor within the Moodle plugin.