diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000..ebf7f749e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +admin/config/ +shared/config/ +public/config/ diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index b1dbad24b..046296feb 100755 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,3 +1,9 @@ +12.0.007 (2013-04-09) + - Automatic "onchange" update on Test Results Summary form was disabled - now you have to press the select button to update results. + - Test selection queries were fixed for postgresql. + - OMR page generation was fixed for some languages. + - New config.default configuration directories were added on admin, public and shared folders to avoid overriding the existing configuration files during "git pull". + 12.0.006 (2013-04-08) - Fixing some SQL queries and result values. diff --git a/README.TXT b/README.TXT index 49597faac..3af702c32 100755 --- a/README.TXT +++ b/README.TXT @@ -10,9 +10,9 @@ FOR ANY COMMERCIAL USAGE PLEASE CONTACT: info@tecnick.com Name: TCExam -Version: 12.0.006 +Version: 12.0.007 -Release date: 2013-04-08 +Release date: 2013-04-09 Author: Nicola Asuni diff --git a/admin/code/tce_pdf_testgen.php b/admin/code/tce_pdf_testgen.php index 6508d06e3..763966d27 100755 --- a/admin/code/tce_pdf_testgen.php +++ b/admin/code/tce_pdf_testgen.php @@ -2,7 +2,7 @@ //============================================================+ // File name : tce_pdf_testgen.php // Begin : 2004-06-13 -// Last Update : 2012-12-28 +// Last Update : 2013-04-09 // // Description : Creates PDF documents for offline testing. // @@ -794,14 +794,14 @@ // select circle $pdf->Circle($x + $circle_half_width, $cy, $circle_radius, 0, 360, 'DF', $line_style, $circle_bg_color, 2); $pdf->SetXY($x,$y); - $pdf->SetFont('helvetica', '', 6); + $pdf->SetFont(PDF_FONT_NAME_DATA, '', 6); $pdf->SetTextColorArray($grid_bg_color); - $pdf->Cell($circle_width, $circle_width, $l['w_true_acronym'], 0, 0, 'C', false, '', 0, true, 'T', 'M'); + $pdf->Cell($circle_width, $circle_width, $l['w_true_acronym'], 0, 0, 'C', false, '', 1, true, 'T', 'M'); $x += $circle_shift; if ($question_type == 2) { // MCMA question $pdf->Circle($x + $circle_half_width, $cy, $circle_radius, 0, 360, 'DF', $line_style, $circle_bg_color, 2); $pdf->SetXY($x,$y); - $pdf->Cell($circle_width, $circle_width, $l['w_false_acronym'], 0, 0, 'C', false, '', 0, true, 'T', 'M'); + $pdf->Cell($circle_width, $circle_width, $l['w_false_acronym'], 0, 0, 'C', false, '', 1, true, 'T', 'M'); } } else { diff --git a/admin/code/tce_select_tests.php b/admin/code/tce_select_tests.php index 6c1523902..857fd22e5 100644 --- a/admin/code/tce_select_tests.php +++ b/admin/code/tce_select_tests.php @@ -2,7 +2,7 @@ //============================================================+ // File name : tce_select_tests.php // Begin : 2012-12-02 -// Last Update : 2012-12-02 +// Last Update : 2013-04-09 // // Description : Display user selection table. // @@ -87,10 +87,14 @@ $terms = preg_split("/[\s]+/i", $searchterms); // Get all the words into an array foreach ($terms as $word) { $word = F_escape_sql($word); - $wherequery .= ' AND ((test_name LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_begin_time LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_end_time LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_description LIKE \'%'.$word.'%\'))'; + $wherequery .= ' AND ('; + $wherequery .= ' (test_name LIKE \'%'.$word.'%\')'; + $wherequery .= ' OR (test_description LIKE \'%'.$word.'%\')'; + if ((preg_match('/^([0-9]{4})[\-]([0-9]{2})[\-]([0-9]{2})$/', $word, $wd) == 1) AND (checkdate($wd[2], $wd[3], $wd[1]))) { + $wherequery .= ' OR ((test_begin_time <= \''.$word.'\')'; + $wherequery .= ' AND (test_end_time >= \''.$word.'\'))'; + } + $wherequery .= ')'; } $wherequery = '('.substr($wherequery, 5).')'; } diff --git a/admin/code/tce_select_tests_popup.php b/admin/code/tce_select_tests_popup.php index 4a83dc81d..129ac6075 100644 --- a/admin/code/tce_select_tests_popup.php +++ b/admin/code/tce_select_tests_popup.php @@ -2,7 +2,7 @@ //============================================================+ // File name : tce_select_tests_popup.php // Begin : 2012-12-02 -// Last Update : 2012-12-02 +// Last Update : 2013-04-09 // // Description : Display user selection table on popup window. // @@ -86,10 +86,14 @@ $terms = preg_split("/[\s]+/i", $searchterms); // Get all the words into an array foreach ($terms as $word) { $word = F_escape_sql($word); - $wherequery .= ' AND ((test_name LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_begin_time LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_end_time LIKE \'%'.$word.'%\')'; - $wherequery .= ' OR (test_description LIKE \'%'.$word.'%\'))'; + $wherequery .= ' AND ('; + $wherequery .= ' (test_name LIKE \'%'.$word.'%\')'; + $wherequery .= ' OR (test_description LIKE \'%'.$word.'%\')'; + if ((preg_match('/^([0-9]{4})[\-]([0-9]{2})[\-]([0-9]{2})$/', $word, $wd) == 1) AND (checkdate($wd[2], $wd[3], $wd[1]))) { + $wherequery .= ' OR ((test_begin_time <= \''.$word.'\')'; + $wherequery .= ' AND (test_end_time >= \''.$word.'\'))'; + } + $wherequery .= ')'; } $wherequery = '('.substr($wherequery, 5).')'; } diff --git a/admin/code/tce_show_result_allusers.php b/admin/code/tce_show_result_allusers.php index 792ee6a9b..c11783c5a 100755 --- a/admin/code/tce_show_result_allusers.php +++ b/admin/code/tce_show_result_allusers.php @@ -2,7 +2,7 @@ //============================================================+ // File name : tce_show_result_allusers.php // Begin : 2004-06-10 -// Last Update : 2013-01-20 +// Last Update : 2013-04-09 // // Description : Display test results summary for all users. // @@ -18,7 +18,7 @@ // info@tecnick.com // // License: -// Copyright (C) 2004-2013 Nicola Asuni - Tecnick.com LTD +// Copyright (C) 2004-2013 Nicola Asuni - Tecnick.com LTD // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as @@ -223,7 +223,8 @@ echo ''.K_NEWLINE; echo ''.K_NEWLINE; echo ''.K_NEWLINE; -echo ''.K_NEWLINE; +echo ''.K_NEWLINE; +//echo ''.K_NEWLINE; $sql = 'SELECT * FROM '.K_TABLE_GROUPS.''; if ($test_id > 0) { $sql .= ' WHERE group_id IN ('.$test_group_ids.')'; @@ -296,7 +298,8 @@ echo ''.K_NEWLINE; echo ''.K_NEWLINE; echo ''.K_NEWLINE; -echo ''.K_NEWLINE; +echo ''.K_NEWLINE; +//echo ''.K_NEWLINE; foreach($detail_modes as $key => $dmode) { echo '