Enhanced global.js and script.js to conditionally load jQuery and Bootstrap only if they are not already present. This change improves loading efficiency and reduces redundant script execution.
Additionally, fixed a bug in renderer.php by removing duplicate Bootstrap loading, which also reduces external dependency.
A new .gitignore file was added to ignore backup files with a .bak extension, helping to keep the repository clean.
Ensured error logging only displays error messages for better clarity.
Removed the redundant 'v=3' parameter from the script URL to ensure compatibility and potentially improve load performance. The parameter was unnecessary for the script versioning in this context.
Removed an unnecessary require_login call from the view_content.php file. The user is already authenticated earlier in the workflow, ensuring there is no duplicate authentication process. This change streamlines the code and improves efficiency by avoiding redundant checks.
Created openUrlInQuizModal function to centralize and reuse the logic
for setting the iframe's src attribute and displaying the modal.
This change improves code maintainability by reducing redundancy.
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.
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.
Removed extraneous 'sws' characters before the opening PHP tag in the renderer file. This resolves potential syntax errors and ensures proper PHP code execution.
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.
Added new icon images to the project to enhance visual representation. The addition includes both GIF and PNG formats to cater to different use cases and compatibility requirements.
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.
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.
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.
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.
Added 'Activity Name' and 'Content ID' strings to improve clarity and usability for users configuring EXP360 activities. Updated plugin version to ensure the changes are recognized. This enhances the user interface and ensures the correct version tracking.
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.
Added comments to the exp360 table definition in install.xml
to clarify the purpose of the table and its fields. This
provides better documentation and enhances the maintainability
of the database schema.
Introduce the EXP360 activity module to embed interactive 360° content
in Moodle. This update includes:
- Database schema for the exp360 table.
- Language support for the module.
- Frontend form to create exp360 activities.
- Script to handle 360° content embedding within a modal.
- Two new PHP scripts to display and serve 360° content.
- Version and plugin initialization.
These changes allow users to seamlessly integrate and interact with
360° content within Moodle courses.
- Hide all buttons labeled 'Back' on document ready
- Add session key and attempt values logging to assist debugging
- Add AJAX request to finalize quiz attempts upon submission
- Ensure proper navigation or modal closure after quiz submission
These changes improve user experience by providing seamless form submission and debugging support.
Refactored feedback and quiz link detection to push both types
to the feedbackLinks array. Updated nextContent and openQuizModal
functions to handle "/quiz/" links similarly to "/feedback/" links,
including replacing "view" with "attempt" and ensuring they are
fetched to resolve potential redirects. This async handling ensures
users are directed accurately. Also, consolidated logic for URL manipulation to maintain consistency.
Replaced the incorrect parameter check from 'embed' to 'modal' for determining if the quiz is in a modal. This resolves the issue where modals weren't closing as expected when the 'modal' parameter was set in the URL.
Implemented support for triggering and closing an embedded quiz modal based on URL parameters. Refactored the URL parameter retrieval function and added conditional modal handling after AJAX success. Simplified feedback link handling and added modal management functions. This enhancement improves the user experience by enabling embedded quiz handling within modal dialogs
Refactored URL parameter extraction to use the URL API, enhancing readability and maintainability. Improved reliability by leveraging built-in methods, which are less error-prone than regex-based extraction.
Introduce global.js to streamline script loading and URL parameter parsing, enabling conditional embedding of Moodle elements. When the `embed` parameter is set to `1`, specific interface elements are hidden, and necessary scripts (jQuery and Bootstrap) are loaded to enhance form interactions and AJAX handling.
Add script.js to handle dynamic content presentation within a modal. This includes script loading, modal management, and transition between content items, ensuring seamless navigation and adherence to required fields.
Fosters a clean, embedded viewing experience and improves content presentation and interaction.