files-shared-code-tce-functions-test-stats

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

tce_functions_test_stats.php

Tags
file

Statistical functions for test results.

author

Nicola Asuni

since
2004-06-10

Table of Contents

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,  $testuser_id[,  $pubmode = false ]) : mixed
Parameters
$test_id :

(int) test ID.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$testuser_id :

(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.

Return values
mixed

F_getUserTestTotals()

Returns test-user totals

F_getUserTestTotals( $test_id,  $user_id,  $testuser_id[,  $pubmode = false ]) : mixed
Parameters
$test_id :

(int) test ID.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$testuser_id :

(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.

Return values
mixed

F_getTestStat()

Returns statistic array for the selected test.

F_getTestStat( $test_id,  $group_id,  $user_id,  $startdate,  $enddate,  $testuser_id[,  $pubmode = false ]) : mixed
Parameters
$test_id :

(int) test ID.

$group_id :

(int) group ID - if greater than zero, filter stats for the specified user group.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$startdate :

(int) start date ID - if greater than zero, filter stats for the specified starting date

$enddate :

(int) end date ID - if greater than zero, filter stats for the specified ending date

$testuser_id :

(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.

Return values
mixed

F_getRawTestStat()

Returns raw statistic array for the selected test.

F_getRawTestStat( $test_id,  $group_id,  $user_id,  $startdate,  $enddate,  $testuser_id[,  $data = array() ][,  $pubmode = false ]) : mixed
Parameters
$test_id :

(int) test ID.

$group_id :

(int) group ID - if greater than zero, filter stats for the specified user group.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$startdate :

(int) start date ID - if greater than zero, filter stats for the specified starting date

$enddate :

(int) end date ID - if greater than zero, filter stats for the specified ending date

$testuser_id :

(int) test-user ID - if greater than zero, filter stats for the specified test-user.

$data : = array()

(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.

Return values
mixed

F_normalizeTestStatAverages()

Calculate average values from TestStat array

F_normalizeTestStatAverages( $data) : mixed
Parameters
$data :

(array) Raw data array. return $data (array) Processed array.

Return values
mixed

F_printTestStat()

Returns test stats as HTML table

F_printTestStat( $test_id,  $group_id,  $user_id,  $startdate,  $enddate,  $testuser_id[,  $ts = array() ][,  $display_mode = 2 ][,  $pubmode = false ]) : mixed
Parameters
$test_id :

(int) test ID.

$group_id :

(int) group ID - if greater than zero, filter stats for the specified user group.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$startdate :

(int) start date ID - if greater than zero, filter stats for the specified starting date

$enddate :

(int) end date ID - if greater than zero, filter stats for the specified ending date

$testuser_id :

(int) test-user ID - if greater than zero, filter stats for the specified test-user.

$ts : = array()

(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.

Return values
mixed

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.

Return values
mixed

F_printUserTestStat()

Returns user test stats as HTML table

F_printUserTestStat( $testuser_id) : mixed
Parameters
$testuser_id :

(int) test-user ID - if greater than zero, filter stats for the specified test-user. return $data string containing HTML table.

Return values
mixed

F_getAllUsersTestStat()

Returns users statistic array for the selected test.

F_getAllUsersTestStat( $test_id,  $group_id,  $user_id,  $startdate,  $enddate[,  $full_order_field = 'total_score' ][,  $pubmode = false ][,  $stats = 2 ]) : mixed
Parameters
$test_id :

(int) test ID.

$group_id :

(int) group ID - if greater than zero, filter stats for the specified user group.

$user_id :

(int) user ID - if greater than zero, filter stats for the specified user.

$startdate :

(string) start date ID - if greater than zero, filter stats for the specified starting date

$enddate :

(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.

Return values
mixed

F_lockUserTest()

Lock the user's test.<br>

F_lockUserTest( $test_id,  $user_id) : mixed
Parameters
$test_id :

(int) test ID

$user_id :

(int) user ID

Return values
mixed

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
$test_id :

(int) Test ID.

$user_id : mixed
Return values
string

F_getTestIDReports()

Returns a comma separated string of test IDs with test_results_to_users enabled

F_getTestIDReports( $test_id, mixed $user_id) : string
Parameters
$test_id :

(int) Test ID.

$user_id : mixed
Return values
string

F_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
Parameters
$test_id :

(int) Test ID.

$user_id : mixed
$filter : mixed = 'test_results_to_users'
Return values
string
 

© 2004-2022 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy