tce_functions_test_stats.php
Tags
Table of Contents
Functions
- F_getUserTestStat() : mixed
- Returns statistic array for the test-user
- F_getUserTestTotals() : mixed
- Returns test-user totals
- F_getTestStat() : mixed
- Returns statistic array for the selected test.
- F_getRawTestStat() : mixed
- Returns raw statistic array for the selected test.
- F_normalizeTestStatAverages() : mixed
- Calculate average values from TestStat array
- F_printTestStat() : mixed
- Returns test stats as HTML table
- F_printTestResultStat() : mixed
- Returns test stats as HTML table
- F_printUserTestStat() : mixed
- Returns user test stats as HTML table
- F_getAllUsersTestStat() : mixed
- Returns users statistic array for the selected test.
- F_lockUserTest() : mixed
- Lock the user's test.<br>
- F_getTestIDResults() : string
- Returns a comma separated string of test IDs with test_results_to_users enabled
- F_getTestIDReports() : string
- Returns a comma separated string of test IDs with test_results_to_users enabled
- F_getTestIDs() : string
- Returns a comma separated string of test IDs with test_results_to_users enabled
Functions
F_getUserTestStat()
Returns statistic array for the test-user
F_getUserTestStat( $test_id[,
$user_id
= 0
][,
$testuser_id
= 0
][,
$pubmode
= false
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $testuser_id : = 0
-
(int) test-user ID - if greater than zero, filter stats for the specified test-user.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface. return $data array containing test-user statistics.
F_getUserTestTotals()
Returns test-user totals
F_getUserTestTotals( $test_id[,
$user_id
= 0
][,
$testuser_id
= 0
][,
$pubmode
= false
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $testuser_id : = 0
-
(int) test-user ID - if greater than zero, filter stats for the specified test-user.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface. return $data array containing test-user statistics.
F_getTestStat()
Returns statistic array for the selected test.
F_getTestStat( $test_id[,
$group_id
= 0
][,
$user_id
= 0
][,
$startdate
= 0
][,
$enddate
= 0
][,
$testuser_id
= 0
][,
$pubmode
= false
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $group_id : = 0
-
(int) group ID - if greater than zero, filter stats for the specified user group.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $startdate : = 0
-
(int) start date ID - if greater than zero, filter stats for the specified starting date
- $enddate : = 0
-
(int) end date ID - if greater than zero, filter stats for the specified ending date
- $testuser_id : = 0
-
(int) test-user ID - if greater than zero, filter stats for the specified test-user.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface. return $data array containing test statistics.
F_getRawTestStat()
Returns raw statistic array for the selected test.
F_getRawTestStat( $test_id[,
$group_id
= 0
][,
$user_id
= 0
][,
$startdate
= 0
][,
$enddate
= 0
][,
$testuser_id
= 0
][,
$data
= []
][,
$pubmode
= false
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $group_id : = 0
-
(int) group ID - if greater than zero, filter stats for the specified user group.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $startdate : = 0
-
(int) start date ID - if greater than zero, filter stats for the specified starting date
- $enddate : = 0
-
(int) end date ID - if greater than zero, filter stats for the specified ending date
- $testuser_id : = 0
-
(int) test-user ID - if greater than zero, filter stats for the specified test-user.
- $data : = []
-
(array) Array of existing data to be merged with the current one.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface. return $data array containing test statistics.
F_normalizeTestStatAverages()
Calculate average values from TestStat array
F_normalizeTestStatAverages( $data)
: mixed
Parameters
F_printTestStat()
Returns test stats as HTML table
F_printTestStat( $test_id[,
$group_id
= 0
][,
$user_id
= 0
][,
$startdate
= 0
][,
$enddate
= 0
][,
$testuser_id
= 0
][,
$ts =
[]
][,
$display_mode
= 2
][,
$pubmode
= false
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $group_id : = 0
-
(int) group ID - if greater than zero, filter stats for the specified user group.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $startdate : = 0
-
(int) start date ID - if greater than zero, filter stats for the specified starting date
- $enddate : = 0
-
(int) end date ID - if greater than zero, filter stats for the specified ending date
- $testuser_id : = 0
-
(int) test-user ID - if greater than zero, filter stats for the specified test-user.
- $ts : = []
-
(array) array of stats to print (leave empty to automatically generate new data).
- $display_mode : = 2
-
display (int) mode: 0 = disabled; 1 = minimum; 2 = module; 3 = subject; 4 = question; 5 = answer.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface. return $data string containing HTML table.
F_printTestResultStat()
Returns test stats as HTML table
F_printTestResultStat( $data,
$nextorderdir,
$order_field,
$filter[,
$pubmode
= false
][,
$stats
= 1
]) : mixed
Parameters
- $data :
-
(array) Array containing test statistics.
- $nextorderdir :
-
(int) next order direction.
- $order_field :
-
(string) order fields.
- $filter :
-
(string) filter string for URLs.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface.
- $stats : = 1
-
(int) 2 = full stats; 1 = user stats; 0 = disabled stats; return HTML table string.
F_printUserTestStat()
Returns user test stats as HTML table
F_printUserTestStat( $testuser_id)
: mixed
Parameters
F_getAllUsersTestStat()
Returns users statistic array for the selected test.
F_getAllUsersTestStat( $test_id[,
$group_id
= 0
][,
$user_id
= 0
][,
$startdate
= 0
][,
$enddate
= 0
][,
$full_order_field
= 'total_score'
][,
$pubmode
= false
][,
$stats
= 2
]) : mixed
Parameters
- $test_id :
-
(int) test ID.
- $group_id : = 0
-
(int) group ID - if greater than zero, filter stats for the specified user group.
- $user_id : = 0
-
(int) user ID - if greater than zero, filter stats for the specified user.
- $startdate : = 0
-
(string) start date ID - if greater than zero, filter stats for the specified starting date
- $enddate : = 0
-
(string) end date ID - if greater than zero, filter stats for the specified ending date
- $full_order_field : = 'total_score'
-
(string) Ordering fields for SQL query.
- $pubmode : = false
-
(boolean) If true filter the results for the public interface.
- $stats : = 2
-
(int) 2 = full stats; 1 = user stats; 0 = disabled stats; return $data array containing test statistics.
F_lockUserTest()
Lock the user's test.<br>
F_lockUserTest( $test_id,
$user_id)
: mixed
Parameters
F_getTestIDResults()
Returns a comma separated string of test IDs with test_results_to_users enabled
F_getTestIDResults( $test_id,
mixed $user_id)
: string
Parameters
Return values
stringF_getTestIDReports()
Returns a comma separated string of test IDs with test_results_to_users enabled
F_getTestIDReports( $test_id,
mixed $user_id)
: string
Parameters
Return values
stringF_getTestIDs()
Returns a comma separated string of test IDs with test_results_to_users enabled
F_getTestIDs( $test_id,
mixed $user_id[,
mixed $filter
= 'test_results_to_users'
]) : string