From e26d469543fd548c3926c6fd1b4f860223cac494 Mon Sep 17 00:00:00 2001 From: Paul <22284856+ProgramComputer@users.noreply.github.com> Date: Sun, 7 Jan 2024 06:07:51 -0600 Subject: [PATCH 1/4] Utterance checkbox not saved (#185) Adds a new local storage element "utterance-allowed". --- do_test_test.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/do_test_test.php b/do_test_test.php index be2661da..b907075c 100644 --- a/do_test_test.php +++ b/do_test_test.php @@ -485,6 +485,15 @@ function do_test_prepare_ajax_test_area($selector, $selection, $count, $testtype ?>
- + + + = - + + + + - + + + + - + + + Added #169, closing discussion #141. Many thanks to @ProgramComputer! +Date: Sun, 7 Jan 2024 13:33:22 +0100 Subject: [PATCH 4/4] Adds the option to click "Read words aloud" to toggle the checkbox. --- do_test_header.php | 63 +++++++++++++++++++++++----------------------- docs/CHANGELOG.md | 4 ++- docs/info.html | 7 +++++- 3 files changed, 41 insertions(+), 33 deletions(-) diff --git a/do_test_header.php b/do_test_header.php index 5a2c1943..93deb645 100644 --- a/do_test_header.php +++ b/do_test_header.php @@ -52,10 +52,10 @@ function get_sql_test_data(&$title, &$p) echo error_message_with_hide($message, true); return ''; } - $title .= ' in ' . get_first_value( - 'SELECT LgName AS value - FROM ' . $tbpref . 'languages, ' . $testsql . ' AND LgID = WoLgID - LIMIT 1' + $title .= ' IN ' . get_first_value( + "SELECT LgName AS value + FROM {$tbpref}languages, {$testsql} AND LgID = WoLgID + LIMIT 1" ); return $testsql; } @@ -102,7 +102,7 @@ function get_text_test_data(&$title, &$p): string ); saveSetting('currenttext', $_REQUEST['text']); $testsql = - ' ' . $tbpref . 'words, ' . $tbpref . 'textitems2 + ' ' . $tbpref . 'words, ' . $tbpref . 'textitems2 WHERE Ti2LgID = WoLgID AND Ti2WoID = WoID AND Ti2TxID = ' . $textid . ' '; return $testsql; } @@ -117,13 +117,13 @@ function get_text_test_data(&$title, &$p): string function get_test_counts($testsql) { $totalcountdue = get_first_value( - "SELECT count(distinct WoID) AS value - FROM " . $testsql . " AND WoStatus BETWEEN 1 AND 5 + "SELECT count(distinct WoID) AS value + FROM " . $testsql . " AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != '' AND WoTranslation != '*' AND WoTodayScore < 0" ); $totalcount = get_first_value( - "SELECT count(distinct WoID) AS value - FROM " . $testsql . " AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != '' + "SELECT count(distinct WoID) AS value + FROM " . $testsql . " AND WoStatus BETWEEN 1 AND 5 AND WoTranslation != '' AND WoTranslation != '*'" ); return array($totalcountdue, $totalcount); @@ -186,7 +186,7 @@ function do_test_header_js() { ?>