Introduced a new script to set activity completion for a user in a course. Ensures completion is enabled for the course module before marking activities as completed. This enhancement streamlines tracking of user progress within courses.
Reversed the condition checking for edit mode to ensure proper functionality. Previously, the code assumed edit mode when it wasn't, causing unintended behavior. This fix addresses incorrect section handling when the inplace editable class is present.
Wrapped the logic to hide sections in an edit mode check, ensuring it only runs when the page is in edit mode. This prevents unintended hiding of sections during normal view, improving the user experience.
Updated class selector from '.section' to '.course-section' to ensure consistency with the rest of the codebase and avoid potential conflicts or mismatches. This change helps in maintaining uniformity and readability in the script.
Refactored section visibility handling to prevent unnecessary CSS updates by ensuring that only sections after the first matched section are hidden. This improves performance and prevents potential flickering issues.
Introduced a variable to target all ".section" elements before
iterating through them to hide subsequent sections correctly if
they contain certain scripts. This ensures smoother UI operations
by preventing unintended section visibility.
Enhance the visibility control of sections by adding a check for
'script[data-activity-id]'. If a section contains such a script,
all following sections will be hidden to improve user focus and
interface clarity.
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.
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.
Ensures jQuery is fully loaded before attempting to load Bootstrap, improving the reliability of modal handling and iframe interactions. This change corrects potential race conditions where Bootstrap functions might be accessed before jQuery is available. This improves the stability and predictability of modal displays and iframe content interactions.
Introduce goToCourse function that updates the window location
to navigate to a course view page using a given ID. This function
is now accessible via window.top as goToCourse, improving navigation
throughout the application and promoting code reuse.
Modified script.js to dynamically include the activity name in the content button text using a data attribute. Updated view.php to pass the activity name to the script for better contextual display of the content button.
This enhancement improves the user experience by making the button's label more meaningful and relevant.
Added an event handler to detect when the iframe loads a course page and redirect the parent window to the course URL. This ensures users are taken directly to course content, enhancing navigation and user experience.
Removed jQuery and Bootstrap loading logic in favor of directly waiting for Bootstrap, reducing complexity and potential errors. Introduced a flag to manage sequential opening of quiz modals, improving UX by ensuring transitions to subsequent quizzes occur seamlessly.
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.