Commit graph

13 commits

Author SHA1 Message Date
8be9310c36
fix: prevent null PAGE error in path reflection
Added a null check for the $PAGE variable before attempting to access its protected properties via reflection. This ensures the function safely bypasses a known bug related to path handling without encountering a null reference error. Prevents potential errors during dynamic module info processing.
2024-11-14 16:44:09 +01:00
18cbc156dc
fix: bypass issue with URL path in modedit.php
Refactored to use reflection for accessing private URL properties to bypass a bug affecting the path property within moodle_url objects. This addresses an issue where the dynamic content rendering function prematurely exits when navigating to `modedit.php`. Improved function formatting for `mod_exp360_supports` for readability.
2024-11-14 16:41:34 +01:00
0842d40df9
feat: add support for completion tracking
Added a new function to support completion tracking by handling the FEATURE_COMPLETION_TRACKS_VIEWS feature. This enhancement enables tracking user views for module completion, improving user progress monitoring.
2024-09-23 10:10:21 +02:00
dba761ac70
fix: use formatted course module name in activity script
Updated the rendering logic to use the formatted course module name instead of the plain name when generating the activity script. This ensures consistency in presentation and improves readability.

Fixes issues with name formatting in displayed activities.
2024-09-23 09:08:09 +02:00
a40ffdf41f
feat: Include activity name in rendered script tag
Updated the `render_activity` method to accept an additional parameter for activity name and include it in the script tag data attributes. This allows for more descriptive data handling on the client side. Adjusted calls to this method to provide the necessary activity name. Improved readability of the code by adhering to standard formatting practices.
2024-09-23 09:05:20 +02:00
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