Learning with Texts - Fork 2.9.0-fork
Learn foreign languages with texts
Loading...
Searching...
No Matches
Namespaces | Functions
set_test_status.php File Reference

Change status of term while testing. More...

Namespaces

namespace  Lwt
 

Functions

 do_set_test_status_html ($status, $oldstatus, $newscore, $oldscore)
 
 set_test_status_change_progress ($stchange)
 
 do_set_test_status_javascript ( $wid, $status, $stchange, $tests_status=array(), $ajax=false)
 
 do_set_test_status_content ($wid, $status, $oldstatus, $stchange, $ajax=false)
 
 start_set_text_status ()
 

Detailed Description

Change status of term while testing.

Call: set_test_status.php?wid=[wordid]&stchange=+1/-1&[ajax=1] set_test_status.php?wid=[wordid]&status=1..5/98/99&[ajax=1]

PHP version 8.1

Function Documentation

◆ do_set_test_status_content()

do_set_test_status_content (   $wid,
  $status,
  $oldstatus,
  $stchange,
  $ajax = false 
)

Make the page content of the word status page.

Parameters
int$widWord ID
int$statusNew learning status for the word
int$oldstatusPrevious learning status
int$stchange-1, 0, or 1 if status is rising or not
Returns
void

@global string $tbpref Database table prefix

◆ do_set_test_status_html()

do_set_test_status_html (   $status,
  $oldstatus,
  $newscore,
  $oldscore 
)

Echo the page HTML content when setting word status.

Parameters
int$statusNew learning status for the word
int$oldstatusPrevious learning status
int$newscoreNew score for the word
int$oldscorePrevious score
Returns
void

◆ do_set_test_status_javascript()

do_set_test_status_javascript (   $wid,
  $status,
  $stchange,
  $tests_status = array(),
  $ajax = false 
)

Make the JavaScript action for setting a word status.

Parameters
int$widWord ID
int$statusNew learning status for the word
int$stchange-1, 0, or 1 if status is rising or not
Returns
void

Update remaining words count.

Get a new word.

◆ set_test_status_change_progress()

set_test_status_change_progress (   $stchange)

Increment the session progress in learning new words.

Parameters
int$stchange-1, 0, or 1 if status is rising or not
Returns
int[] Tests data

@psalm-return array{total: int, wrong: int, correct: int, nottested: int}

◆ start_set_text_status()

start_set_text_status ( )

Start the word status set page.

Returns
void

@global string $tbpref Database table prefix