Merge pull request #5094 from christianbeeznest/ofaj-21319-3

Exercise: Refactor 'enregistrement-audio' to 'audio-recording-help' for clarity and cosmetic changes" - refs BT#21319
pull/5099/head
Nicolas Ducoulombier 10 months ago committed by GitHub
commit 7e68a490b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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
  5. 6
      public/main/template/default/exercise/oral_expression.html.twig

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

@ -56,6 +56,12 @@
</div>
</div>
<p style="text-align: center;">
<a href="{{ _p.web_main }}inc/ajax/exercise.ajax.php?a=audio-recording-help" class="ajax" rel="noopener" data-title = {{ 'Recording help ' | trans }}>
<span style="color: #84bd00;">{{ 'Recording help ' | trans }}</span>
</a>
</p>
<div class="row" id="record-audio-wami-{{ question_id }}">
<div class="col-sm-4 col-sm-offset-4 text-center">
<div id="record-audio-wami-container-{{ question_id }}" class="wami-container"></div>

Loading…
Cancel
Save