Table of contents
Package: com\tecnick\tcexam\shared
Tags
- file: Functions to import test data from scanned OMR (Optical Mark Recognition) sheets.
- author: Nicola Asuni
- since: 2011-05-17
Functions
F_encodeOMRTestData()
File: tce_functions_omr.php line 29
F_encodeOMRTestData(mixed $data) : encoded
Parameters
- $data : mixed: (array) array to be encoded
Return values
encoded —
string.
F_decodeOMRTestData()
File: tce_functions_omr.php line 42
F_decodeOMRTestData(mixed $str) : array<string|int, mixed>
Parameters
- $str : mixed: (string) string to be decoded.
Return values
array<string|int, mixed> —
with test data (0 => test_id, n => array(0 => question_n_ID, 1 => array(answers_IDs)), or false in case of error.
F_decodeOMRTestDataQRCode()
File: tce_functions_omr.php line 61
F_decodeOMRTestDataQRCode(mixed $image) : array<string|int, mixed>
This function uses the external application zbarimg (http://zbar.sourceforge.net/) .
Parameters
- $image : mixed: (string) image file to be decoded (scanned OMR page).
Return values
array<string|int, mixed> —
with test data or false in case o error
F_decodeOMRPage()
File: tce_functions_omr.php line 79
F_decodeOMRPage(mixed $image) : array<string|int, mixed>
This function requires ImageMagick library and zbarimg (http://zbar.sourceforge.net/) .
Parameters
- $image : mixed: (string) image file to be decoded (scanned OMR page at 200 DPI with full color range).
Return values
array<string|int, mixed> —
of answers data or false in case of error.
F_importOMRTestData()
File: tce_functions_omr.php line 214
F_importOMRTestData(mixed $user_id, mixed $date, mixed $omr_testdata, mixed $omr_answers[, mixed $overwrite = false ]) : bool
Parameters
- $user_id : mixed: (int) user ID.
- $date : mixed: (string) date-time field.
- $omr_testdata : mixed: (array) Array containing test data.
- $omr_answers : mixed: (array) Array containing test answers (from OMR).
- $overwrite : mixed = false: (boolean) If true overwrites the previous answers on non-repeatable tests.
Return values
bool —
TRUE in case of success, FALSE otherwise.