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

Save Improved Annotation. More...

Namespaces

 Lwt
 

Functions

 save_impr_text_data ($textid, $line, $val)
 
 do_ajax_save_impr_text ($textid, $elem, $data)
 
 save_impr_text ($textid, $elem, $data)
 

Detailed Description

Save Improved Annotation.

Call: inc/ajax_save_impr_text.php

Function Documentation

◆ do_ajax_save_impr_text()

do_ajax_save_impr_text (   $textid,
  $elem,
  $data 
)

Save a printed text.

Parameters
int$textidText ID
string$elemElement to edit
mixed$dataJSON data
Returns
string Success string

◆ save_impr_text()

save_impr_text (   $textid,
  $elem,
  $data 
)

Save a text with improved annotations.

Parameters
int$textidText ID
string$elemElement to select
mixed$dataData element
Returns
string[] Result as array, with answer on "error" or "success"

@psalm-return array{error?: string, success?: 'OK'}

◆ save_impr_text_data()

save_impr_text_data (   $textid,
  $line,
  $val 
)

Save data from printed text.

Parameters
int$textidText ID
int$lineLine number to save
string$valProposed new annotation for the term
Returns
string Error message, or "OK" if success.

@global string $tbpref Database table prefix.