diff --git a/assets/css/app.scss b/assets/css/app.scss index 9fb731cfb5..3e2d1c9b04 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -512,6 +512,13 @@ table#skill_holder { color: #0a0a0a; } +#global-modal { + display: flex; + align-items: center; + justify-content: center; +} + + //@import 'primevue-md-light-indigo/theme.css'; //@import '~primevue/resources/primevue.min.css'; //@import '~primeflex/primeflex.css'; diff --git a/assets/js/legacy/app.js b/assets/js/legacy/app.js index 1f793dadac..3b45d81073 100644 --- a/assets/js/legacy/app.js +++ b/assets/js/legacy/app.js @@ -176,9 +176,6 @@ $(function () { globalModalBody.html(modalContent); globalModalBody.css({'max-height' : "500px", "overflow" : "auto"}); - - $('#global-modal').css({'top' : "10%", "z-index" : "10000", "width" : "60%", "left" : "20%", "border" : "1px solid #ccc"}); - toggleModal('global-modal'); }); }); diff --git a/assets/js/legacy/exercise.js b/assets/js/legacy/exercise.js index 440796d0f9..99a1ab703b 100644 --- a/assets/js/legacy/exercise.js +++ b/assets/js/legacy/exercise.js @@ -11,14 +11,20 @@ import '../../../public/main/inc/lib/javascript/hotspot/js/hotspot.js'; import '../../../public/main/inc/lib/javascript/d3/jquery.xcolor.js'; document.addEventListener("DOMContentLoaded", function() { + // Mapping French paths to their English equivalents + var routeMapping = { + "enregistrement-audio": "audio-recording-help" + }; + var links = document.querySelectorAll('a[href*="web"]'); links.forEach(function(link) { link.classList.add("ajax"); var href = link.getAttribute("href"); var pathSegments = href.split("/"); if (pathSegments.length >= 3) { - var contentIdentifier = pathSegments[2]; - link.setAttribute("href", "/main/inc/ajax/exercise.ajax.php?a=" + contentIdentifier); + var frenchPath = pathSegments[2]; + var englishEquivalent = routeMapping[frenchPath] || frenchPath; + link.setAttribute("href", "/main/inc/ajax/exercise.ajax.php?a=" + englishEquivalent); link.setAttribute("data-title", link.textContent.trim()); } }); diff --git a/public/main/inc/ajax/exercise.ajax.php b/public/main/inc/ajax/exercise.ajax.php index dc8869d009..3495765734 100644 --- a/public/main/inc/ajax/exercise.ajax.php +++ b/public/main/inc/ajax/exercise.ajax.php @@ -1065,7 +1065,7 @@ switch ($action) { } echo 0; break; - case 'enregistrement-audio': + case 'audio-recording-help': $content = get_lang('While recording, you can pause whenever you want. If you are not satisfied, register again. This will overwrite the previous version. Satisfied ? To send the recording to your teacher, click on “Stop recording” then select “End exercise”. The teacher will be able to listen to your recording and give you feedback! All your transmitted recordings can be viewed on the exercise home page.'); $html = '