File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,27 @@ function setRemoveLink(dataContext) {
297297
298298 echo $ objQuestionTmp ->returnRecorder ();
299299 }
300-
300+ $ fileUrl = $ objQuestionTmp ->getFileUrl ();
301+ if (isset ($ fileUrl )) {
302+ $ s .= '
303+ <div class="col-sm-4 col-sm-offset-4">
304+ <div class="form-group text-center">
305+ <audio src=" ' .$ fileUrl .'" controls></audio>
306+ </div>
307+ </div>
308+ ' ;
309+ }
310+ $ s .= '<script>
311+ // The buttons are blocked waiting for the audio file to be uploaded
312+ $(document).ajaxStart(function() {
313+ $("button").attr("disabled", true);
314+ $("button").attr("title", " ' .get_lang ('WaitingForTheAudioFileToBeUploaded ' ).'");
315+ });
316+ $(document).ajaxComplete(function() {
317+ $("button").attr("disabled", false);
318+ $("button").removeAttr("title");
319+ });
320+ </script> ' ;
301321 $ form = new FormValidator ('free_choice_ ' .$ questionId );
302322 $ config = ['ToolbarSet ' => 'TestFreeAnswer ' ];
303323
You can’t perform that action at this time.
0 commit comments