Fix record_audio on exercises - refs BT#14834

pull/2729/head
Angel Fernando Quiroz Campos 7 years ago
parent be976f9db3
commit 3b8f9ebca9
  1. 5
      main/inc/lib/javascript/record_audio/record_audio.js
  2. 5
      main/template/default/document/record_audio.tpl
  3. 6
      main/template/default/exercise/oral_expression.tpl

@ -28,7 +28,10 @@ window.RecordAudio = (function () {
formData.append('audio_dir', rtcInfo.directory);
$.ajax({
url: _p.web_ajax + 'record_audio_rtc.ajax.php?type='+rtcInfo.type+'&tool=' + (!!txtName.length ? 'document' : 'exercise'),
url: _p.web_ajax + 'record_audio_rtc.ajax.php?' + $.param({
type: rtcInfo.type,
tool: (!!txtName.length ? 'document' : 'exercise')
}),
data: formData,
processData: false,
contentType: false,

@ -67,13 +67,14 @@
plyrPreviewId: '#record-preview',
directory: '{{ directory }}',
reload_page: 1,
type : 'document'
type: 'document'
},
{
blockId: '#record-audio-wami',
containerId: 'record-audio-wami-container',
directory: '{{ directory }}',
userId: {{ user_id }}
userId: {{ user_id }},
type: 'document'
},
null
);

@ -54,12 +54,14 @@ $(document).on('ready', function () {
btnPlayId: '#btn-play-record-{{ question_id }}',
btnStopId: '#btn-stop-record-{{ question_id }}',
plyrPreviewId: '#record-preview-{{ question_id }}',
directory: '{{ directory }}'
directory: '{{ directory }}',
type: 'document'
}, {
blockId: '#record-audio-wami-{{ question_id }}',
containerId: 'record-audio-wami-container-{{ question_id }}',
directory: '{{ directory }}',
userId: {{ user_id }}
userId: {{ user_id }},
type: 'document'
}, '{{ file_name }}');
if (0 === $('#hide_description_{{ question_id }}_options').length) {

Loading…
Cancel
Save