|
Learning with Texts - Fork 2.4.0-fork
Learn foreign languages with texts
|
Show test frame. More...
Namespaces | |
| namespace | Lwt |
Functions | |
| get_test_sql () | |
| get_test_type () | |
| do_test_test_css () | |
| </style > | do_test_test_finished ($testsql, $totaltests) |
| do_test_test_sentence ($wid, $lang, $wordlc) | |
| print_term_test ($wo_record, $sent, $testtype, $nosent, $regexword) | |
| prepare_test_area ($testsql, $totaltests, $count, $testtype) | |
| do_test_test_javascript_interaction ($wo_record, $wb1, $wb2, $wb3, $testtype, $nosent, $save) | |
| prepare_test_footer ($notyettested) | |
| do_test_footer ($notyettested, $wrong, $correct) | |
| do_test_test_javascript ($count) | |
| do_test_test_content () | |
Show test frame.
Call: do_test_test.php?type=[testtype]&lang=[langid] Call: do_test_test.php?type=[testtype]&text=[textid] Call: do_test_test.php?type=[testtype]&selection=1
(SQL via $_SESSION['testsql'])
| do_test_footer | ( | $notyettested, | |
| $wrong, | |||
| $correct | |||
| ) |
Echoes HTML code for the footer of a words test page.
| int | $notyettested | Number of words left to be tested |
| int | $wrong | Number of failed tests |
| int | $correct | Number of correct answers. |
| do_test_test_content | ( | ) |
Do the main content of a test page.
@global int $debug Show debug informations
| do_test_test_css | ( | ) |
Prepare the css code for tests.
| </style > do_test_test_finished | ( | $testsql, | |
| $totaltests | |||
| ) |
Output a message for a finished test, with the number of tests for tomorrow.
| string | $testsql | Query used to select words. |
| int | $totaltests | Total number of tests. |
| do_test_test_javascript | ( | $count | ) |
Prepare JavaScript code for interacting between the different frames.
| int | $count | 1 for timer. |
| do_test_test_javascript_interaction | ( | $wo_record, | |
| $wb1, | |||
| $wb2, | |||
| $wb3, | |||
| $testtype, | |||
| $nosent, | |||
| $save | |||
| ) |
Prepare JavaScript code so that you can click on words.
| array | $wo_record | Word record. Associative array with keys 'WoID', 'WoTranslation'. |
| string | $wb1 | URL of the first dictionary. |
| string | $wb2 | URL of the secondary dictionary. |
| string | $wb3 | URL of the google translate dictionary. |
| int | $testtype | Type of test |
| int | $nosent | 1 to use single word instead of sentence. |
| string | $save | Word or sentence to use for the test |
@global string $tbpref Database table prefix @global string $angDefs Languages definition array
Read the word aloud
| do_test_test_sentence | ( | $wid, | |
| $lang, | |||
| $wordlc | |||
| ) |
Get a sentence containing the word.
| int | $wid | The word to test. |
| string | $lang | ID of the language |
| string | $wordlc |
@global string $tbpref Table prefix @global int $debug Echo the passage number if 1.
| get_test_sql | ( | ) |
Set sql request for the word test.
@global string $tbpref Table prefix
| get_test_type | ( | ) |
Give the test type.
| prepare_test_area | ( | $testsql, | |
| $totaltests, | |||
| $count, | |||
| $testtype | |||
| ) |
Preforms the HTML of the test area.
| string | $testsql | SQL query of for the words that should be tested. |
| int | $totaltests | Total number of tests to do. |
| int | $count | Number of tests left. |
| int | $testtype | Type of test. |
@global string $tbpref Table prefix @global int $debug Show the SQL query used if 1.
@psalm-return int<0, max>
| prepare_test_footer | ( | $notyettested | ) |
Get the data and echoes the footer.
| int | $notyettested | Number of words left to be tested. |
| print_term_test | ( | $wo_record, | |
| $sent, | |||
| $testtype, | |||
| $nosent, | |||
| $regexword | |||
| ) |
Echo the test relative to a word.
| array | $wo_record | Query from the database regarding a word. |
| string | $sent | Sentence containing the word. |
| int | $testtype | Type of test |
| int | $nosent | 1 if you want to hide sentences. |
| string | $regexword | Regex to select the desired word. |