Скачиваний:
2
Добавлен:
30.09.2018
Размер:
19.89 Кб
Скачать

This file describes the general principles of using PHP scripts for publishing tests on MySQL database and conducting tests.

Introduction

tPilot 1.2 and higher lets you conduct and manage tests over Internet/intranet. The only software required is an Internet browser. Not all tMaker features can be employed in creation of Internet/intranet test, yet. Some restrictions are imposed by the new testing environment (database, scripts and browser), but we are actively working on implementing new scripts and many of the features not yet available now will appear in the future versions.

Notice: the ability to publish tests on the Internet/intranet is available to the Enterprise license users only.

Requirements

You will need the following software:

  1. A web-server. We developed and tested this software on Apache v1.3.20. This is a free web-server that can be downloaded at http://www.apache.org. But you may also use Microsoft IIS instead the Apache WEB Server.

  2. MySQL server. We developed and tested this software on MySQL v3.23.40. The software is available for free download at http://www.mysql.com

  3. PHP processor. We developed and tested this software on PHP v4.0.6. This free software can be downloaded at http://www.php.net

The documentation describing installation and use of these products can be found at the sites mentioned above and at many other sites on the Internet.

Publishing the tests

After you have installed and set up all necessary software (see the Requirements section), you can start publishing the tests.

Follow the steps below to set up tMaker:

  1. Run tMaker.

  2. Press F2 to bring up the settings window and click the MySQL tab.

  3. Fill in all the fields at this tab. Please consult you network administrator if you have questions about any of them.

  4. Open a test (or create a new one).

  5. Go File | Export | MySQL

  6. If both MySQL and tMaker are set up correctly, the test will be placed in the database. Otherwise an error message will be displayed.

If you give your test the name of a test that is already in the database, the latter will be replaced with it. If the test name doesn’t exist, a new test will be added. Please be careful and double-check the test name before saving it.

Management

Use the scripts stored in the .../tPilot/tMaker/Scripts folder to manage tests and users. You will need to set up some files before using them.

File connect.php.

<?

$db_conn = mysql_pconnect("localhost", "login", "password");

mysql_select_db("test", $db_conn);

?>

localhost – the MySQL server address

login – login for accessing the server

password – password for accessing the server

test – database name

The meta.txt file contains HTML tags that will be included in each page.

The header.html and footer.html files will be inserted at the beginning and at the end of each page. You can edit the contents of these files according to your needs. It may be convenient to place the navigation elements there.

Other files:

login.php – this file is used for registration of the users who are already in the database. A user cannot start testing without registration.

question.php – this script displays the test questions and records the user’s answers.

register.php – this file is used for registering new users and entering their data in the database.

report.php – an authorized user can use this script to view his/her results.

selecttest.php – this script lets a user select a test to take.

The scripts stored in the …/tPilot/tMaker/Scripts/admin folder are for administrator’s use only. Only administrators must be able to access them.

The meta.txt, header.html and footer.html files have the same functions as described above, but in relation to the pages accessed by administrators only. It may be convenient to place another navigation menu there (for administrative use – as in the sample file).

The other files are:

checkpass.php – checking password.

groups.php – user groups management.

index.php – a root file for user, group and test management.

login.php – login script.

logout.php – logout script.

report.php – a report-making script.

sections.php – test sections customization.

users.php – user management.

Соседние файлы в папке Scripts