Exercise: Refactor 'enregistrement-audio' to 'audio-recording-help' for clarity and cosmetic changes" - refs BT#21319

pull/5094/head
christianbeeznst 2 years ago
parent f7706bba33
commit 04b9f04938
  1. 7
      assets/css/app.scss
  2. 3
      assets/js/legacy/app.js
  3. 10
      assets/js/legacy/exercise.js
  4. 2
      public/main/inc/ajax/exercise.ajax.php

@ -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';

@ -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');
});
});

@ -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());
}
});

@ -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 = '

Loading…
Cancel
Save