Learning with Texts - Fork  2.10.0-fork
Learn foreign languages with texts
Namespaces | Functions
do_test_header.php File Reference

Show test header frame. More...

Namespaces

 Lwt
 

Functions

 get_sql_test_data (&$title, &$p)
 
 get_lang_test_data (&$title, &$p)
 
 get_text_test_data (&$title, &$p)
 
 get_test_counts ($testsql)
 
 do_test_header_row ($_p)
 
 do_test_header_js ()
 
 do_test_header_content ($title, $p, $totalcountdue, $totalcount, $language)
 
 get_test_data (&$title, &$p)
 
 do_test_header_page ($title, $p, $totalcountdue, $totalcount, $language)
 
 start_test_header_page ($language='L2')
 

Detailed Description

Show test header frame.

Call: do_test_header.php?lang=[langid] Call: do_test_header.php?text=[textid] Call: do_test_header.php?selection=1 (SQL via $_SESSION['testsql'])

PHP version 8.1

Function Documentation

◆ do_test_header_content()

do_test_header_content (   $title,
  $p,
  $totalcountdue,
  $totalcount,
  $language 
)

Make the header content for tests.

Parameters
string$titlePage title
string$pURL property to use
string$totalcountdueNumber of words due for today
string$totalcountTotal number of words.
string$languageL2 language name
Returns
void

◆ do_test_header_js()

do_test_header_js ( )

Prepare JavaScript content for the header.

Returns
void

Reset frames location

Prepare frames for testing words

Prepare frames for test table.

◆ do_test_header_page()

do_test_header_page (   $title,
  $p,
  $totalcountdue,
  $totalcount,
  $language 
)

Do the header for test page.

Parameters
string$titlePage title
string$pURL property to use
string$totalcountdueNumber of words due for today
string$totalcountTotal number of words.
string$languageL2 Language name
Returns
void

◆ do_test_header_row()

do_test_header_row (   $_p)

Make the header row for tests.

Parameters
mixed$_pURL property to use (unnused), will be removed in LWT 3.0.0
Returns
void

◆ get_lang_test_data()

get_lang_test_data ( $title,
$p 
)

Set useful data for the test using language.

Parameters
string$titleTitle to be overwritten
string$pProperty URL to be overwritten
Returns
string SQL query to use

@global string $tbpref Database table prefix

◆ get_sql_test_data()

get_sql_test_data ( $title,
$p 
)

Set useful data for the test using SQL query.

Parameters
string&$titleTitle to be overwritten
string&$pProperty URL to be overwritten
Returns
string SQL query to use

@global string $tbpref Database table prefix

◆ get_test_counts()

get_test_counts (   $testsql)

Return the words count for this test.

Parameters
string$testsqlSQL query for this test.
Returns
array{0: string, 1: string} Total words due and total words learning

◆ get_test_data()

get_test_data ( $title,
$p 
)

Set useful data for the test.

Parameters
string$titleTitle to be overwritten
string$pProperty URL to be overwritten
Returns
array{0: string, 1: string} Total words due and total words learning

◆ get_text_test_data()

get_text_test_data ( $title,
$p 
)

Set useful data for the test using text.

Parameters
string$titleTitle to be overwritten
string$pProperty URL to be overwritten
Returns
string SQL query to use

@global string $tbpref Database table prefix

◆ start_test_header_page()

start_test_header_page (   $language = 'L2')

Use requests passed to the page to start it.

Parameters
string$languageL2 language name
Returns
void