Commit graph

12 commits

Author SHA1 Message Date
4ac9f46986
fix(script): properly load jQuery and Bootstrap in sequence
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.
2024-09-23 09:00:01 +02:00
110ac67686
feat: add function to navigate to course by ID
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.
2024-09-23 08:50:58 +02:00
17e8bc0c18
feat: add dynamic activity name to content button
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.
2024-09-23 08:43:57 +02:00
476606f22f
feat: handle iframe navigation for course pages
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.
2024-09-23 08:28:35 +02:00
85d50e19b8
refactor: simplify script loading and enhance quiz modal
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.
2024-09-06 11:09:44 +02:00
33f55824d8
fix: ensure conditional loading of jQuery & Bootstrap
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.
2024-08-05 12:10:33 +02:00
ad89a284fc
refactor(script.js): remove unused modal resize code
Eliminated unnecessary code handling modal content resizing. This cleanup simplifies the modal setup and avoids redundant calculations, improving code maintainability.
2024-07-08 12:57:59 +02:00
85c509e567
refactor(modal): extract iframe URL setting to reusable function
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.
2024-07-08 10:28:46 +02:00
5b45d9ea82
feat(exp360): add EXP360 module for embedding 360° content
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.
2024-07-05 11:13:58 +02:00
b3b9ea55d1
feat(navigation): enhance link handling and fetch redirects
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.
2024-07-04 14:31:27 +02:00
ffb3945e19
feat: add embedded quiz modal functionality
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
2024-07-02 17:43:06 +02:00
a7368163bf
feat: add scripts for dynamic content loading and embedding
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.
2024-07-02 16:20:55 +02:00