tce_functions_user_select.php
Tags
Table of Contents
Functions
- F_select_user() : true
- Display user selection for using F_show_select_user function.
- F_show_select_user() : false
- Display user selection XHTML table.
- F_show_select_user_popup() : false
- Display user selection XHTML table (popup mode).
- F_isTestOnGroup() : bool
- Return true if the selected test is active for the selected group
- F_isUserOnGroup() : bool
- Return true if the selected user belongs to the selected group
- F_isAuthorizedEditorForGroup() : bool
- Return true if the current user is an administrator or belongs to the group, false otherwise
- F_isAuthorizedEditorForUser() : bool
- Return true if the current user is authorized to edit the specified user
- F_user_group_select_sql() : sql
- Return the SQL selection query for user groups
- F_user_group_select() : table
- Display select box for user groups
- F_get_user_groups() : array<string|int, mixed>
- Returns an array containing groups IDs to which the specified user belongs
- F_getUIDfromRegnum() : int
- Return the user ID from registration number.
Functions
F_select_user()
Display user selection for using F_show_select_user function.
F_select_user( $order_field,
$orderdir,
$firstrow,
$rowsperpage[,
$group_id
= 0
][,
$andwhere
= ''
][,
$searchterms
= ''
]) : true
Parameters
- $order_field :
-
(string) order by column name
- $orderdir :
-
(string) oreder direction
- $firstrow :
-
(string) number of first row to display
- $rowsperpage :
-
(string) number of rows per page
- $group_id : = 0
-
(int) id of the group (default = 0 = no specific group selected)
- $andwhere : = ''
-
(string) additional SQL WHERE query conditions
- $searchterms : = ''
-
(string) search terms
Tags
Return values
trueF_show_select_user()
Display user selection XHTML table.
F_show_select_user( $order_field,
$orderdir,
$firstrow,
$rowsperpage[,
$group_id
= 0
][,
$andwhere
= ''
][,
$searchterms
= ''
]) : false
Parameters
- $order_field :
-
(string) Order by column name.
- $orderdir :
-
(int) Order direction.
- $firstrow :
-
(int) Number of first row to display.
- $rowsperpage :
-
(int) Number of rows per page.
- $group_id : = 0
-
(int) ID of the group (default = 0 = no specific group selected).
- $andwhere : = ''
-
(string) Additional SQL WHERE query conditions.
- $searchterms : = ''
-
(string) Search terms.
Tags
Return values
false —in case of empty database, true otherwise
F_show_select_user_popup()
Display user selection XHTML table (popup mode).
F_show_select_user_popup( $order_field,
$orderdir,
$firstrow,
$rowsperpage[,
$group_id
= 0
][,
$andwhere
= ''
][,
$searchterms
= ''
][,
string $cid
= 0
]) : false
Parameters
- $order_field :
-
(string) Order by column name.
- $orderdir :
-
(int) Order direction.
- $firstrow :
-
(int) Number of first row to display.
- $rowsperpage :
-
(int) Number of rows per page.
- $group_id : = 0
-
(int) ID of the group (default = 0 = no specific group selected).
- $andwhere : = ''
-
(string) Additional SQL WHERE query conditions.
- $searchterms : = ''
-
(string) Search terms.
- $cid : string = 0
-
ID of the calling form field.
Tags
Return values
false —in case of empty database, true otherwise
F_isTestOnGroup()
Return true if the selected test is active for the selected group
F_isTestOnGroup( $test_id,
$group_id)
: bool
Parameters
Tags
Return values
bool —true/false
F_isUserOnGroup()
Return true if the selected user belongs to the selected group
F_isUserOnGroup( $user_id,
$group_id)
: bool
Parameters
Tags
Return values
bool —true/false
F_isAuthorizedEditorForGroup()
Return true if the current user is an administrator or belongs to the group, false otherwise
F_isAuthorizedEditorForGroup( $group_id)
: bool
Parameters
Tags
Return values
bool —true/false
F_isAuthorizedEditorForUser()
Return true if the current user is authorized to edit the specified user
F_isAuthorizedEditorForUser( $user_id)
: bool
Parameters
Tags
Return values
bool —true/false
F_user_group_select_sql()
Return the SQL selection query for user groups
F_user_group_select_sql([ $where
= ''
]) : sql
Parameters
Tags
Return values
sql —selection string
F_user_group_select()
Display select box for user groups
F_user_group_select([ $name
= 'group_id'
]) : table
Parameters
Return values
table —header element string
F_get_user_groups()
Returns an array containing groups IDs to which the specified user belongs
F_get_user_groups( $user_id)
: array<string|int,
mixed>
Parameters
Return values
array<string|int, mixed> —containing user's groups IDs
F_getUIDfromRegnum()
Return the user ID from registration number.
F_getUIDfromRegnum(mixed $regnum)
: int
Parameters
- $regnum : mixed
Tags
Return values
int —User ID or 0 in case of error.