Docstoc

TML

Document Sample
TML Powered By Docstoc
					                                                     TML
Acknowledgement
We are deeply indebted to Neil Holtz, from the University of Carleton in Canada, for the original work on which
this software is based.

Introduction
In the higher education community there is increasing interest in teaching via electronic media. Reduced
funding, more students, and a requirement for additional flexibility have all contributed to this. There are several
areas of development which this interest has resulted in, commonly called „courseware‟. These include archives
of on-line material, group interactivity tools (such as Usenet News), WWW static tutorials, stand alone PC
interactive tutorials, electronic marking etc.
 For our purposes, we are considering the area of electronic marking, electronic platform independent tutorials
and self motivated assessment. Much current material in the areas mentioned above is dependent on the
hardware and software on which is was written, and will not run on any other platform. In addition, much
material is held in proprietary formats within commercially restricted systems, and uses complex graphics or
audio. These factors mean that developing such courseware has a low cost-benefit ratio, since the lifespan of the
packages tend to be limited, and the development of sophisticated graphics is a time-consuming, and hence
costly, business.
To attempt to address some of these problems, we have implemented a tutorial system called „TML‟. It is a
public-domain system using a simple text based format based on the HTML markup language employed on the
WWW.

Overview
TML comprises of several components. The most important is the specification of the TML language, which is
used to describe the content of the pages and questions within the TML system. As it is completely open and
based on the popular HTML markup language, it is expected to be relatively futureproof. In the last resort, it is a
text based format and so question and page content may be extracted using simple tools (e.g. a PERL script).
The system is intended to allow different packages to be able to import and export questions in TML format,
hence it will act as an interchange format and as a storage format for question banks.
To assist with the process of converting material into TML format, a TML syntax checker, and a TML compiler
(which converts the platform independent text format to a platform independent binary format in order to
enhance delivery speed) have been developed.
WWW delivery is supported by a CGI delivery script, which is again platform independent, and which can run
either anonymously or by password/username protection. To support PC (MS-Windows) platforms, an
input/output facility for the CALScribe tutorial application is being developed. Additional support tools such as
a WWW driven question authoring tool are also planned. Figure 1 illustrates the layout of the system. Note that
the TML authoring and delivery system operates identically on all supported software and hardware platforms

         WWW Client                      WWW Server                 TML Delivery Script                 TMLO File



                                             Student                    Student Database              TML Compiler
                  Data File                 Reporting

                  Program
                                                                           CALScribe                      SGMLS
                  Compile time
                                                             Figure 1
                                                                                                         TML File




Joel Crisp                                          1                                          24/02/2010
WWW Delivery
Delivery of TML is provided over the WWW via a CGI compatible server side application. This application,
„tml_v4.2‟in its current incarnation, is a PERL script which can thus be run on any platform supported by
PERL. UNIX and Windows NT systems have been demonstrated.
A demonstration installation is currently running on the computer „www.ilrt.bris.ac.uk‟. To introduce the TML
system, this installation is examined below:

Prerequisites
Before beginning to work with the TML system, you should be familiar with the following areas :
         WWW Client-Server architecture.
         WWW URL/URI Specification and use.
         HTML authoring.
         CGI - The Common Gateway Interface used by WWW servers to communicate with auxiliary
            programs.
         UNIX/NT system administration as appropriate for your software platform.
         Environmental variables, and shell commands ( for both UNIX and NT)

WWW Access
To access the TML system, a URL of the form
<URL:HTTP://www.ilrt.bris.ac.uk/mru/netquest/tml/cgi-bin/tml_v4_2.pl/mru/netquest/tml/example/chemtute.t
mlo>
needs to be used. This URL consists of four parts.
         1) The initial part, „HTTP:‟ specifies the transfer method as normal.
         2) The second part „//www.ilrt.bris.ac.uk‟ specifies the name of the computer which is running the
             service.
         3) The third part „/mru/netquest/tml/cgi-bin/tml_v4.2‟ specifies the location of the program „tml_v4.2‟
             which acts as the interface between the tutorial and the user.
         4) The last part „/mru/netquest/tml/questions/demo.tmlo‟ specifies the location of the compiled
             question file to display questions from.
In addition to the above elements, the URL may be followed by a question mark („?‟) and one or more of the
following elements :
         1) Qnum=n Begin the tutorial by jumping directly to question number n, or the summary if n equals
             SUMMARY or the list of questions if n equals LIST
         2) Intro=URL Display an “Introduction” link back to URL. Note that URL must be in URL Encoded
             format (see xxxx), but may be a server local partial URL (i.e. the HTTP://servername part may be
             omitted).
Note that if both elements are given they must be separated by an ampersand („&‟) character.

Installation (UNIX)
This section describes the process of installing the TML delivery system on a UNIX server. It does not
document the TML compiler installation, see xxxx for that procedure.

1) Fetch and install a CGI compatible WWW server such as Apache, according to its documentation.
2) Fetch and install the correct distribution of PERL 5.002 (or later) for your system, according to its
   documentation.
3) Create a directory to contain the programs, e.g /usr/local/TML. It is not recommended that this directory is
   readable as part of the WWW server document tree, however it must have UNIX read access for the WWW
   server.
4) Create a cgi-bin directory under this TML directory and instruct the WWW server that it contains CGI
   programs ( see server documentation, e.g. under Apache add the line ScriptAlias /TML/cgi-bin
   /usr/local/TML/cgi-bin )
5) Create a directory under the WWW document root (e.g. ./usr/local/WWW) to contain the question files. This
   directory can be named anything, we will use „/usr/local/WWW/TML/questions‟ as an example. Then
   REMOVE read access from this directory for the WWW server in the WWW server permission file. (Note
   that the directory must have UNIX read access for the WWW server).
6) Create a directory outside the WWW server document tree to contain student data. We will call this
   /usr/local/TML/students. Ensure that the WWW server does not have read access on this directory, but that it
   does have UNIX read AND write privileges.


Joel Crisp                                         2                                        24/02/2010
7) Install the tml_v4.2 script in the /usr/local/TML/cgi-bin directory with UNIX read and execute permissions
   for the WWW server.
8) Create a sub-directory under the /usr/local/TML/cgi-bin directory called „qtypes_v4.2‟ and put all the
   question type modules there (i.e. multchoi, polychoi, wordmtch, hotimage).
9) Edit the script tml_v4.2 as follows ( add the information between the quotes “”):
          Alter the first line to read #!/usr/local/bin/perl or wherever your perl executable is.
          Enter the full canonical name of your server in the line $Server=””;
          Enter the absolute path to your WWW document root in the line $base=””;
          Enter the URL server relative fragment for the cgi-bin directory in the $prog=””.$bprog; line. DO
             NOT DELETE THE .$bprog; section !
          Enter the absolute path to the question modules from part 8) in the line push(@INC,””);
          Enter the absolute path to the student directory in the line $student_dir=””;
Your installation is now ready to run.

Installation (Windows NT)
This section is broken down into a number of further sections as follows :
1. Hardware/software specifications for running WWW service
2. Installation of NT Server 4.0 on Intel system
3. Configuration of IIS 2.0
4. Installation of PERL 5.0
5. Configuration of additional registry settings for IIS & PERL
6. Install TML for NT
7. Modify tml_v4_2.pl path variables for component locations
8. Create suitable HTML page to call compiled PERL scripts (*.tmlo)

 Hardware/software spec for running WWW service
The minimum specification suitable for operating a WWW service on NT is :
 Hardware
     Intel Pentium 133MHz CPU
     32Mb EDO Memory
     IDE/SCSI hard disk minimum 2Gb
             partitions formatted for NTFS file system
             1st partition has NT Server 4 installation (drive C: )
             2nd partition has WWW software and pages (drive D: )
     CDROM Drive
     Tape facilities for backup (TRAVEN/DAT)
     PCI DMA-mode ethernet card
 Software
     Microsoft Windows NT Server 4.0 on CDROM
     Microsoft Windows NT Server Client Access Licences, one for each connected workstation. See the
        Microsoft licensing agreement.
     Microsoft Internet Service Manager 2.0
     PERL 5.01 for Windows32 (Availability: see below)
     TML_v4.2.pl for Windows32 (Availability: see below)


Install NT Server 4.0 on Intel system

Availability (NT Version 4)
Your institution may belong to the Microsoft Select Scheme, which offers affordable pricing for all Microsoft
products. Otherwise, NT Server is readily available from most suppliers. Ensure that you purchase the Server
edition, rather than the Workstation edition. Also remember that you will have to buy some client access
licences if you want client systems to access the Server.
A useful web page for an institution with the MS Select Scheme prices is:
          <URL:http://www.cse.bris.ac.uk/software/select/mss-pric.htm>




Joel Crisp                                         3                                       24/02/2010
Installation (Windows NT)
Install Windows NT as per the normal instructions. You will need to configure your TCP/IP networking. For
example, the Oryx server at the University of Bristol has the following setup :
Oryx NT Server IP details:
          Adapter:        3Com Fast Etherlink
          IP Address: 137.222.34.38
          Subnet Mask: 255.255.255.0
          Gateway:        137.222.34.250

Oryx NT Server DNS details:
 Host name: oryx
         Domain          ilrt.bris.ac.uk
         DNS Servers: 137.222.10.36
                         137.222.12.10
Oryx NT Server WINS, DHCP, Routing details:
         Not Used
See your local network manager for the above information at your site.
Tip :Wherever you are in NT just press the F1 key to get the right context-sensitive help.

Configuration of IIS 2.0

Installation
When you install NT Server you will be asked if you want to install IIS, the Microsoft Internet Information
Server. You will need to install this software.

Master IIS user setup
By default IIS creates a local user account called:
                                 IUSR_<machine_name>           eg:- IUSR_ORYX
If you want to change this to something more meaningful then you can delete this account and create one called,
for instance, “www”. If you do this you also have to grant this new user account the access rights for “Access
this computer from the network”, and “Log on locally”
To grant these rights :
1. Click on the Start button & navigate to: Programs/Administrative Tools (Common)/User Manager for
    Domains
2. Open User Manager & select Policies/User Rights
3. The first right is: Access this computer from network. Add the user „www‟ to this list by clicking on
    Add/Show Users, then scroll down so you see the user icons & double-click on "www". Finally click OK
    twice.
4. Repeat the above steps for adding the user „www‟ to the privilege group "Log on locally".

Configure IIS Manager Settings
Click on the Start button & select: Programs/Microsoft Internet Server (Common)/Internet Service Manager. In
the mail window which will pop up there will be a list of 3 Internet services that IIS handles: WWW, Gopher &
FTP. Double-click on the WWW Service & you see the Service Properties for WWW appear. This window has
4 tabs to click.
1.        Tab 1 „Service‟ has a number of settings. At any time simply press the F1 key for context-sensitive help
          on each setting.
                  TCP Port: By default this is assigned the number 80. This is a port address which the WWW
                   service listens on for incoming connection requests from remote clients.
                  The Anonymous Logon box has 2 values which can be set. Note that the Username by default
                   is IUSR_ORYX (for my NT Server called "ORYX"). This account must be given a password
                   here. Note: if you change this name & password then you must create the same account name
                   & the same password for this account with "User Manager for Domains".
                  Configure password authentication. The Password Authentication box has 3 values to set:
                   i)        Allow Anonymous allows anyone to log onto your web pages using the Anonymous
                             Logon account. (See IIS help).




Joel Crisp                                         4                                         24/02/2010
                  ii)        Basic (Clear Text) has 2 modes of working. The 1st with a browser that uses Secure
                             Sockets Layer (SSL) encrypts a user's name & password before transmission across
                             the Internet between client & web server.
                             The 2nd is less secure & can result when a browser has not been set up to use SSL so
                             the username & password are sent in clear text across the Internet. It is possible with
                             a network monitor, which can analyse & strip down the various Internet protocols
                             (TCP,IP,UDP), to glean these details.
                   iii)      Windows NT Challenge/Response is Microsoft's own encryption scheme which is
                             recognised only with MS Internet Explorer 2.0 & later. This is not recommended.
2.       The 2nd „Directories‟ is used to add actual directories you want to alias so you can reference them in
         your web pages.
                  If you click Add you go to the Directory Properties box. Initially the „Home Directory‟ is set
                   to the default installation; e.g. "c:\InetPub\www_root". This is fine if you plan on having ALL
                   your web pages organised in sub-directories under this default. However, it is more flexible to
                   delete this default & assign your home directory to the root of a 2nd partition or hard drive;
                   e.g. "d:"
                  You can now explicitly add the various directories that hold your web pages & alias them.
                   As an example: you have a directory on your D: drive called D:\web\diamonds\welcome.htm.
                   From the Directories tab click Add & then Browse to navigate to this directory. Alias it with
                   the name /diamonds. Lastly set the Access to just Read. Click OK. Your directory will now
                   appear in the Directories window with its alias.
                   Use the alias in your web page to access the (in this case) html page.
3.       A very powerful tool here lies with the check-box : ‟Directory Browsing Enabled‟.
         This allows the client to log onto your server, view and copy all the files that lie from the home
         directory downwards. An example of this is with the Imperial College website:
         http://sunsite.doc.ic.ac.uk/. It is recommended that this functionality, if required, be provided via the
         FTP Service provided with IIS instead. Ensure that the directories holding your web pages and ftp files
         are separate for ease of management.

IIS is quite flexible as you can add individual users or groups of users to separate directories. This gives you
'granular control' over who can access what in your web-site.The preferred method of administering users is to
lump them into distinct groups and set the appropriate group-level access on shared resources. NT can also serve
files, directories, drives & printers and do application serving.

Install PERL 5.0
You can obtain the Windows 32 subsystem (95 or NT) version of PERL 5 from quite a few sites including:
          http://www0.cise.ufl.edu/perl/
          http://www.metronet.com/perlinfo/perl5.html
          http://www.khoros.unm.edu/staff/neilb/perl/metaFAQ/metaFAQ.html
          http://www.metronet.com/0/perlinfo/perl5/manual/perl.html
          http://www.eecs.nwu.edu/perl/perl.html
          http://www.cis.ufl.edu:80/perl/
          http://www.perl.com/perl/
You will need a zip compatible archive manager such as „winzip‟. Note that the archive must be extracted using
long filenames. To do this:
1. Download the file perl5106.zip to the D: drive using your Internet browser; eg: NetScape.
2. Then extract the files to the D: drive using WinZip. Note: that the files are extracted to a sub-directory of D:
   called perl5.
3. Start a command-line box by clicking the Start button and selecting „Start/Programs/Command Prompt‟.
4. In the command prompt window type the following to start the Perl 5 installation (Note that case is
   unimportant with Windows systems)
          D:
          CD \PERL5
          INSTALL
5. The first question you are asked is if you want to go ahead and install in this directory. The program installs
   the software and you are told to restart the system so that Perl can work.
6. Type: EXITand then restart the Server.
7. Check registry settings for IIS & PERL. PERL under some circumstances does not completely configure its
   registry settings. This has to be done manually.



Joel Crisp                                           5                                         24/02/2010
          Start the correct Registry Editor. There are two versions, use the one
           c:\winnt\system32\regedt32.exe
           The other one should not be used as it doesn't have the full range of editing features such as adding
           new registry keys & values. The larger file is the full 32-bit version for use with NT 4.0.
          Check the registry keys & values for IIS by starting the registry editor. Select
           HKEY_LOCAL_MACHINE. You will see an alphabetically-ordered list. Each of the keys relates
           to a part of your computer setup.
          Double-click on SYSTEM. CurrentControlSet is a very important entry. It contains information
           relating to your installed hardware and software, including server services like WWW. Navigate to
           Services-W3SVC (World Wide Web SerViCe).You might see only 1 window with no split down
           the middle. If this is the case then click on View-Tree and Data. Down the right hand side you will
           see a list of values that are associated with that key. Each value has a name, data type and the data it
           contains.
          Set the value at
             HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script Map
             with key „.pl‟ to „D:\perl5\bin\perl.exe %s %s‟ with type REG_SZ. (This should be   created using the
           install.bat program in the Perl5 directory).
          Set the value at
             HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\Script Map
             with key „.pl‟ to „D:\perl5\bin\perl.exe %s %s‟ with type REG_SZ. (This should be   created using the
             install.bat program in the Perl5 directory).

Install TML for NT
The latest version of the TML suite can be downloaded from the TML site at
                                   http://www.ilrt.bris.ac.uk/mru/netquest/tml/
Download the Windows-NT „PKZIP‟ format archive. Use WinZip 32 to unpack this distribution as it will
recreate the directory & sub-directory structure of the TML files.

Using MS Internet Service Manager, open the properties for the WWW service. Assign a directory alias for the
cgi-bin sub-directory of the TML installation, and ensure that it is flagged as executable and readable in the
appropriate checkboxes.

You will also need to put SGMLS in your path if you intend to compile or check question files on NT. This is
not needed for a delivery only platform. Either compile SGMLS from the distribution files included, or pull the
executable from the nearest public domain archive.

9.) Create suitable HTML page to call compiled PERL scripts (*.tmlo)

9a.) Testing your system installation with chemtute.tmlo!
At long last we have arrived at a crunch point. Does it work (!?!)
Ensure you have:
(i) Done all the above steps
(ii) Tested your Internet connection by PINGing other computers on your local subnet, within the Bristol
network & remote systems in Britain & the States. Use their IP number 1st & then their IP name to
diagnose your 'network health'.
(iii) Installed a fairly new web browser such as NetScape 3.x or Internet Explorer 2.x. Old browsers such as
Mosaic might work while text ones like Lynx won't.
(iv) Ensure your WWW Service is running.

Fire up your favourite web browser & enter a URL for your own NT Server; eg:-

         http://oryx.ilrt.bris.ac.uk/TML/cgi-bin/tml_v4.2.pl/tml/chemtute.tmlo

There are a few points to note here.

Firstly, case is irrelevant for the alias. We have used /TML/cgi-bin here where in MS Internet Service Manager
we wrote this as /tml/cgi-bin.

Secondly, the browser knows how to handle the tml_v4.2.pl file as the extension .pl has been associated with
the Perl program under the W3SVC entry in the registry key HKEY_LOCAL_MACHINE:


Joel Crisp                                           6                                        24/02/2010
                  e:\perl5\bin\perl.exe %s %s

The 2 %s's after the perl.exe program are input variables that in this case take in:
          /TML/cgi-bin/tml_v4.2.pl                     &                     /tml/chemtute.tmlo
Perl.exe then executes the .pl script which asks for & gets the precompiled tmlo question set.
Perl.exe itself uses a Windows32 version of the library file called perl100.dll. The path for this is in the 2nd
registry section under the key previously described in section 4c).

Thirdly, the home directory that IIS uses is D: Simply alias sub-directories off this root with a meaningful name.
Your web pages only need the alias to be able to find each other through local links. This means easier
administration as, apart from the inital installation, you don't have to worry about drive letters.




Command Line Testing
In addition to running via a WWW server as described in the section WWW Access, the TML delivery script
may be tested from the command line (either a UNIX shell, or a MS-DOS prompt under Windows-NT) by
setting the „Environmental Variable‟ PATH_TRANSLATED to the absolute path of the question file, and the
environmental variable QUERY to any parameters following the „?‟ part of the URL. Then the TML program is
run without any parameters via the perl interpreter. For example :
          UNIX:
          $ PATH_TRANSLATED=”/usr/local/WWW/TML/questions/demo.tmlo”
          $ QUERY=”qnum=2”
          $ export QUERY PATH_TRANSLATED
          $ perl tml_v4.2

         NT/DOS:
         C:>SET PATH_TRANSLATED=”C:/TML/questions/demo.tmlo”
         C:>SET QUERY=”qnum=2”
         C:>perl tml_v4.2

Both of the examples should print out the appropriate page of HTML for question 2 from the tutorial demo.tmlo

Password Protection
To password protect the tml_v4.2 script and thus enable its full student logging facility, create a symbolic link to
or copy of the program for each group of users. Password protect this under the WWW server‟s normal
password protection scheme, and all users will be prompted to enter their user ID and password for the tutorial.
Note that this facility is not secure enough to deliver formal testing, but is useful for self assisted learning or
informal monitoring.

Results Analysis
To analyse the results of logging either in anonymous or password protected mode, install the program „analyse‟
in the cg-bin directory, and edit the line $student_dir to match that from the tml_v4.2 program. Then enter the
URL to point to the same question file as your tutorial, except that instead of „tml_v4.2‟ put „analyse‟. For
example : <URL:HTTP://bloodhound.ilrt.bris.ac.uk/cgi-bin/TML/analyse/TML/questions/demo.tmlo>
Note that the script may take some time to run depending on the number of students/anonymous users. Note also
that by using PATH_TRANSLATED as above this script can also be run from the command line.

Compiler Installation
The TML compiler is currently available for UNIX and should shortly be available for Windows-NT. It consists
of a perl script, however it also uses the public domain SGML parser “sgmls”. To install the compiler you need
to :
1) Install perl 5.002 or later on your system
2) Install sgmls 1.1.91or later on you system
3) Install the sgmls to perl interface module SGMLSpm 1.03ii or later in the PERL modules directory.
4) Copy the checktml_v4.2 and tcompile_v4.2 scripts to /usr/local/bin
5) Copy the auxiliary files as follows :



Joel Crisp                                           7                                          24/02/2010
          /usr/local/lib/TML/sgmldecl.dtd
          /usr/local/lib/TML/ETS/dtd/TML_4.0
          /usr/local/lib/TML/ISO_8879-1986/entities/Added_Latin_1
6) Edit the script checktml_v4.2 as follows :
          First line to #!/usr/local/bin/perl or wherever perl is on your system.
          Set $sgmls=””; to point to the installation of the sgmls executable on your system.
          Set $sgmls_opts=” -l /usr/local/lib/TML/sgmldecl.dtd”;
          Set $ENV{„SGML_PATH‟}=”/usr/local/lib/TML/%O/%C/%T:%N.%X:%N.%D”;
7) Edit the script tcompile_v4.2 to set the same variables.
8) Make both scripts executable
You are now set up to check the syntax of TML files using checktml_v4.2 demo.tml ( replace demo with the
name of your file ), or checktml_v4.2 <directory> where directory contains a split question file ( see yyyy ).
You can compile question files by
                    tcompile_v4.2 demo.tml demo.tmlo
which will take a source file called demo.tml and output a compiled file demo.tmlo. Alternatively, you can use
tcompile_v4.2 <directory> demo.tmlo
 where <directory> is the name of a directory containing a split tutorial.




Joel Crisp                                        8                                        24/02/2010

				
DOCUMENT INFO