## /shared/code/tce_functions_test_stats.php

Description

Statistical functions for test results.

- since: 2004-06-10
- link: www.tecnick.com
- copyright: Copyright &copy; 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
- author: Nicola Asuni

Functions
F_getQuestionTestStat (line 81)

Returns test data structure for selected question:

- $data['right'] = number of right answers
- $data['wrong'] = number of wrong answers
- $data['unanswered'] = number of unanswered questions
- $data['undisplayed'] = number of undisplayed questions

void F_getQuestionTestStat (int $test_id, int $question_id)

- int $test_id: test ID
- int $question_id: question ID return $data

F_getUserTestStat (line 144)

Returns test data structure for selected user:

- $data['all'] = total number of questions
- $data['right'] = number of right answers for multiple-choice questions (score &gt; 50% max points)
- $data['wrong'] = number of wrong answers for multiple-choice questions (score &lt;= 50% max points)
- $data['textright'] = number of right answers for free-text questions (score &gt; 50% max points)
- $data['textwrong'] = number of wrong answers for free-text questions (score &lt;= 50% max points)
- $data['unanswered'] = total number of unanswered questions
- $data['undisplayed'] = total number of undisplayed questions
- $data['basic_score'] = basic points for each difficulty level of questions
- $data['max_score'] = maximum test score
- $data['score'] = user's score
- $data['comment'] = user's test comment

- usedby: tce_test_results.php

void F_getUserTestStat (int $test_id, mixed $user_id, int $testuser_id)

- int $test_id: test ID
- int $testuser_id: user's test ID return array $data

F_lockUserTest (line 59)

Lock the user's test.

- usedby: tce_test_results.php

void F_lockUserTest (int $test_id, int $user_id)

- int $test_id: test ID
- int $user_id: user ID

pdfLink (line 41)

Returns an URL to open the PDF generator page.

string pdfLink (string $mode, string $testid, string $userid, [string $orderfield = ""], string $orderdir)

- string $mode: PDF mode (1=all users results, 2=questions stats, 3=detailed report for single user 4=all users details)
- string $testid: test iD
- string $userid: user ID
- string $orderfield: table order field name
- string $orderdir: order direction (1, -1)

Documentation generated on Fri, 24 Nov 2006 21:16:25 +0100 by phpDocumentor 1.3.0RC3