Commit graph

8 commits

Author SHA1 Message Date
762edec903
refactor: remove deprecated event observers and modal HTML
Cleanup of obsolete event observer functions and modal HTML code. This streamlines the codebase by eliminating unused PHP event observer definitions and redundant embedded modal HTML in JS file. Enhances maintainability and reduces potential overhead. No functionality should be directly impacted.
2024-07-05 12:44:26 +02:00
b58487ebb8
fix: always load JS for exp360 events
Simplified the event observer function to always inject the exp360 global JavaScript on relevant pages, removing the conditional check for exp360 instances within the course. This ensures consistent loading behavior and reduces database queries.
2024-07-05 12:36:55 +02:00
5b4a28b00d
fix: adjust script order and import Bootstrap
Reordered modal and script content to ensure proper functionality and added Bootstrap's JS bundle for enhanced UI components. Updated URL to use a CDN for better performance and integrity checks.
2024-07-05 12:31:26 +02:00
131f84f5ef
feat: add renderer for dynamic modal and activity scripts
Introduced a new renderer class to manage the rendering of activity scripts
and modals in the exp360 module. Renderer ensures modals are loaded only
once, enhancing performance. Modified lib.php to utilize the new renderer
for appending necessary scripts and modal content to the course module info.
2024-07-05 12:18:34 +02:00
321c470a23
feat: add event observer for course viewing
Introduces an event observer to inject JavaScript into courses containing the exp360 activity when the course is viewed.

The newly created `db/events.php` initializes event observers, while updates to `lib.php` define the event observer callback and the observer list. Enhancements to `global.js` include modal handling logic for improved UI interaction.

This aids in dynamically loading required scripts, enhancing user experience in courses with exp360 activities.
2024-07-05 12:02:11 +02:00
3a08f0e564
feat: Add dynamic script integration for exp360 module
Introduced a dynamic content management function to enhance the exp360 module's capabilities. This function injects necessary scripts dynamically, improving the modularity and maintainability of the exp360 activities. By adding Bootstrap dependencies and specific scripts directly into the content management info, the changes ensure that the module leverages required resources efficiently.
2024-07-05 11:58:14 +02:00
3247092e59
feat: add intro fields to exp360 module
Added 'intro' and 'introformat' fields to the exp360 module for enhanced activity descriptions. Updated database schema and upgrade script to accommodate new fields. Modified add and update instance functions and the form to manage intro fields. Bumped module version to 2024070503.
2024-07-05 11:38:10 +02:00
87e610d313
feat: add basic structure for exp360 module
Introduced the foundational elements for the exp360 module, including:
- Added access control capabilities
- Implemented index page for course instances
- Created add, update, and delete functions for instances
- Updated plugin version

These changes establish the module's core functionality and prepare it for further development and integration.
2024-07-05 11:30:55 +02:00