tce__functions__test__stats_8php

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 File Reference

Namespaces

 com\tecnick\tcexam\shared
 TCExam Shared Area.
 

Functions

 F_getUserTestStat ($test_id, $user_id=0, $testuser_id=0)
 
 F_getUserTestTotals ($test_id, $user_id=0, $testuser_id=0)
 
 F_getTestStat ($test_id, $group_id=0, $user_id=0, $startdate=0, $enddate=0, $testuser_id=0, $pubmode=false)
 
 F_getRawTestStat ($test_id, $group_id=0, $user_id=0, $startdate=0, $enddate=0, $testuser_id=0, $data=array(), $pubmode=false)
 
 F_normalizeTestStatAverages ($data)
 
 F_printTestStat ($test_id, $group_id=0, $user_id=0, $startdate=0, $enddate=0, $testuser_id=0, $ts=array(), $display_mode=2, $pubmode=false)
 
 F_printTestResultStat ($data, $nextorderdir, $order_field, $filter, $pubmode=false, $stats=1)
 
 F_printUserTestStat ($testuser_id)
 
 F_getAllUsersTestStat ($test_id, $group_id=0, $user_id=0, $startdate=0, $enddate=0, $full_order_field=‘total_score’, $pubmode=false, $stats=2)
 
 F_lockUserTest ($test_id, $user_id)
 
 F_getTestIDResults ($test_id, $user_id)
 
 F_getTestIDReports ($test_id, $user_id)
 
 F_getTestIDs ($test_id, $user_id, $filter=‘test_results_to_users’)
 

Detailed Description

Statistical functions for test results.

Function Documentation

F_getAllUsersTestStat (   $test_id,
  $group_id = 0,
  $user_id = 0,
  $startdate = 0,
  $enddate = 0,
  $full_order_field = ‘total_score’,
  $pubmode = false,
  $stats = 2 
)

Returns users statistic array for the selected test.

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(string) Ordering fields for SQL query.
$pubmode(boolean) If true filter the results for the public interface.
$stats(int) 2 = full stats; 1 = user stats; 0 = disabled stats; return $data array containing test statistics.

F_getRawTestStat (   $test_id,
  $group_id = 0,
  $user_id = 0,
  $startdate = 0,
  $enddate = 0,
  $testuser_id = 0,
  $data = array(),
  $pubmode = false 
)

Returns raw statistic array for the selected test.

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 of existing data to be merged with the current one.
$pubmode(boolean) If true filter the results for the public interface. return $data array containing test statistics.

F_getTestIDReports (   $test_id,
  $user_id 
)

Returns a comma separated string of test IDs with test_results_to_users enabled

Parameters
$test_id(int) Test ID.
Returns
string

F_getTestIDResults (   $test_id,
  $user_id 
)

Returns a comma separated string of test IDs with test_results_to_users enabled

Parameters
$test_id(int) Test ID.
Returns
string

F_getTestIDs (   $test_id,
  $user_id,
  $filter = ‘test_results_to_users’ 
)

Returns a comma separated string of test IDs with test_results_to_users enabled

Parameters
$test_id(int) Test ID.
Returns
string

F_getTestStat (   $test_id,
  $group_id = 0,
  $user_id = 0,
  $startdate = 0,
  $enddate = 0,
  $testuser_id = 0,
  $pubmode = false 
)

Returns statistic array for the selected test.

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(boolean) If true filter the results for the public interface. return $data array containing test statistics.

F_getUserTestStat (   $test_id,
  $user_id = 0,
  $testuser_id = 0 
)

Returns statistic array for the test-user

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. return $data array containing test-user statistics.

F_getUserTestTotals (   $test_id,
  $user_id = 0,
  $testuser_id = 0 
)

Returns test-user totals

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. return $data array containing test-user statistics.

F_lockUserTest (   $test_id,
  $user_id 
)

Lock the user’s test.

Parameters
$test_id(int) test ID
$user_id(int) user ID

F_normalizeTestStatAverages (   $data)

Calculate average values from TestStat array

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

F_printTestResultStat (   $data,
  $nextorderdir,
  $order_field,
  $filter,
  $pubmode = false,
  $stats = 1 
)

Returns test stats as HTML table

Parameters
$data(array) Array containing test statistics.
$nextorderdir(int) next order direction.
$order_field(string) order fields.
$filter(string) filter string for URLs.
$pubmode(boolean) If true filter the results for the public interface.
$stats(int) 2 = full stats; 1 = user stats; 0 = disabled stats; return HTML table string.

F_printTestStat (   $test_id,
  $group_id = 0,
  $user_id = 0,
  $startdate = 0,
  $enddate = 0,
  $testuser_id = 0,
  $ts = array(),
  $display_mode = 2,
  $pubmode = false 
)

Returns test stats as HTML table

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 of stats to print (leave empty to automatically generate new data).
$display_modedisplay (int) mode: 0 = disabled; 1 = minimum; 2 = module; 3 = subject; 4 = question; 5 = answer.
$pubmode(boolean) If true filter the results for the public interface. return $data string containing HTML table.

F_printUserTestStat (   $testuser_id)

Returns user test stats as HTML table

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

 

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