Skip to content

Commit b2202a0

Browse files
abbr
1 parent 7504fea commit b2202a0

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎api.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ function get_word_test_ajax($testsql, $word_mode, $lgid, $wordregex, $testtype):
235235
$wordregex
236236
);
237237
$solution = get_test_solution($testtype, $word_record, $word_mode, $save);
238-
238+
$abbr = getLanguageCode($word_record['WoLgID'],LWT_LANGUAGES_ARRAY);
239239
return array(
240240
"word_id" => $word_record['WoID'],
241-
"word_lg_id" =>$word_record['WoLgID'],
241+
"word_lg_abbr" =>$abbr,
242242
"solution" => $solution,
243243
"word_text" => $save,
244244
"group" => $html_sentence,

‎do_test_test.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -964,11 +964,11 @@ function prepare_test_frames()
964964
* @param {number} start_sec starting second
965965
* @param {number} end_sec ending second
966966
* @param {string} word_text word text
967-
* @param {string} word_lg_id Word ID
967+
* @param {string} word_lg_abbr Word abbr
968968
* @param {string} solution Test answer
969969
* @param {string} group
970970
*/
971-
function insert_new_word(word_id,tx_id,start_sec,end_sec,word_text,word_lg_id, solution, group) {
971+
function insert_new_word(word_id,tx_id,start_sec,end_sec,word_text,word_lg_abbr, solution, group) {
972972

973973

974974

@@ -979,8 +979,8 @@ function read_word() {
979979
if (('speechSynthesis' in window) &&
980980
document.getElementById('utterance-allowed').checked) {
981981
const text = word_text;
982-
const lang_id = word_lg_id;
983-
readRawTextAloud(text, lang_id);
982+
const lang = word_lg_abbr;
983+
readRawTextAloud(text, lang);
984984
}
985985
}
986986

@@ -1055,7 +1055,7 @@ function (tomorrow_test) {
10551055
);
10561056
} else {
10571057
insert_new_word(
1058-
current_test.word_id,current_test.txID,current_test.startSec,current_test.endSec,current_test.word_text,current_test.word_lg_id,current_test.solution, current_test.group
1058+
current_test.word_id,current_test.txID,current_test.startSec,current_test.endSec,current_test.word_text,current_test.word_lg_abbr,current_test.solution, current_test.group
10591059
);
10601060
}
10611061
}

0 commit comments

Comments
 (0)