新浪博客

TCExam考试系统使用心得

2012-06-29 08:46阅读:
TCExam考试系统使用心得
学期末试用了TCExam对学生进行考试,现在来谈谈使用心得 TCExam是一套考试系统,采用免费和商业授权双重协议
我使用的是11.3.000版本,是6月初发布的
由PHP语言编写,同时依赖一些第三方模块
例如支持LaTeX进行排版,支持TCPDF输出PDF格式的试卷与统计数据
支持Optical Mark Recognition (OMR)进行与纸笔测试结合的功能等等
所以在部署时对服务器端的环境有一些基本要求
官方文档介绍得很详尽
http://www.tcexam.org/installation.php
方便起见,我使用的是WAMP的集成环境,刚好也支持我的X64的系统
安装完毕后需要配置一下数据库密码,然后相应的修改一下PHPMyAdmin下面的config.inc.php文件
接着需要在WAMP中配置一下TCExam文件夹的访问权限,允许外网访问
在浏览器中访问 http://localhost/TCExam/install/install.php 地址进行安装
记得填写数据库密码并将host URL改为可外部访问的主机地址
简单的安装之后就可以开始第一次的使用
http://www.tcexam.org/guide_first_test.php

这里介绍一下我的设置方式
修改TCExam\shared\config下的tce_pdf.php文件,使PDF输出支持中文
//define ('PDF_FONT_NAME_MAIN', 'helvetica');
define ('PDF_FONT_NAME_MAIN', 'stsongstdlight');
//define ('PDF_FONT_NAME_DATA', 'helvetica');
define ('PDF_FONT_NAME_DATA', 'stsongstdlight');
此外,此文件还支持配置输出PDF的LOGO、标题、页眉页脚、字号等。
我关闭了注册功能,关闭除中文英文外的其他语言版本,默认中文界面
我的用户组是按学生班级创建,所以在输出PDF报表的时候希望输出班级信息
所以我做了以下修改:
TCExam\admin\code\tce_functions_user_select.php 增加
function F_get_group_name($group_id) {
global $l, $db;
require_once('../config/tce_config.php');
$str = '';
$where = 'group_id ='.$group_id;
$sql = F_user_group_select_sql($where);
if ($r = F_db_query($sql, $db)) {
while ($m = F_db_fetch_array($r)) {
$str .= htmlspecialchars($m['group_name'], ENT_NOQUOTES, $l['a_meta_charset']);
}
} else {
F_display_db_error();
}
return $str;
}
TCExam\admin\code\tce_pdf_results.php中修改
//$pdf->writeHTMLCell(0, ($boxEndY - $infoStartY + 4), (PDF_MARGIN_LEFT + ($info_cell_width * 2)), $infoStartY - 2, $test_description, 1, 0);
$pdf->writeHTMLCell(0, ($boxEndY - $infoStartY + 4), (PDF_MARGIN_LEFT + ($info_cell_width * 2)), $infoStartY - 2, $test_description.' <p/> '.F_get_group_name($group_id), 1, 0);
这样在PDF报表里摘要的右侧就会显示用户组信息
TCExam在正常安装后会工作在基本模式下,如需一些额外的功能还需要进一步的配置
官方文件给出了配置文件清单
  • shared/config/ - Main configuration files:
    • lang/ - language files
      • language_tmx.xml - TMX language file (contains all translations)
    • tce_cas.php - Configuration file for CAS (Central Authentication Service)
    • tce_config.php - system general configuration
    • tce_db_config.php - database configuration
    • tce_email_config.php - general configuration of the email system
    • tce_general_constants.php - general constants
    • tce_latex.php - LaTeX configuration
    • tce_ldap.php - LDAP configuration
    • tce_mime.php - MIME associations to file extensions
    • tce_paths.php - file and folder paths within the system
    • tce_pdf.php - configuration of the format and the headers of the PDF documents
    • tce_radius.php - RADIUS configuration
    • tce_user_registration.php - user registration configuration
  • admin/config/ - Configuration files for the administration area:
    • tce_auth.php - access levels configuration for the administration modules
    • tce_config.php - general configuration for the administration panel
  • public/config/ - Configuration files for the public area:
    • tce_auth.php - access levels configuration for the public modules
    • tce_config.php - general configuration for the public area

基本介绍完了,个人目前发现一些细节的地方可能需要改进
后面我会花点时间写一下TCExam在教学中的帮助,
欢迎交流!

我的更多文章

下载客户端阅读体验更佳

APP专享