Tags:
create new tag
view all tags
WebTest is a quiz generator written in perl. The first version is working but has no graphics interface. I'm also changing a lot of its syntax, so I'll describe the new version here.

A quiz is composed by a database of questions and a specification file.

The database is an XML structure, somewhat like


<DB>
 <GROUP name="kinematics">
  <PROBLEM>
   A red ball, whose mass is 2.5 kg, is falling down from ....
   <QUESTION>
    Which is its speed v when it touches the gound?
    <RIGHT> v= 3 m/s</RIGHT>
    <WRONG> v = 4 m/s </WRONG>
    <WRONG> v = 5 m/s </WRONG>
   </QUESTION>
  </PROBLEM>
  <PROBLEM>
   .....
  </PROBLEM>
 </GROUP>
 <GROUP name="dynamics">
 ...
 </GROUP>
</DB>

It is generated in a way described below.

A specification file is a simple text file (a wiki page) that looks like

 ID: TEST-20020502-1
 DESCRIPTION: First test 
 DATE: 2 May 2002
 COURSE: Environmental Engineering
 BODYTEMPLATE: physics.tex.tmpl
 MARKTEMPLATE: marks.tex.tmpl
 QUANTITY: 4
 GROUPS: 
   * kinetics, 2, 3
   * dynamics, 4, 3

The idea is that of writing a page in a web, and attach the database to it. Then a cgi will read the specifications, and build a structure reassembling (and scrambling) the questions. For instance, the above specifications say to pick 2 questions from the group "kinematics", with 3 wrong answers (and one right), 4 questions from the group "dynamics", etc.

The structure (you may think to an XML structure) is appended to the database file and interpolated into BODYTEMPLATE. The resulting tex file is attached to the page.

Another cgi is responsible for collecting the answers, compute the marks, add them to the database, and produce the results using MARKTEMPLATE

Indeed, the database is an XML file that contains all the story of the test (and from which every aspects of the test can be regenerated). In this way it is easy to fix-up problems (for instance due to a mistake in the questions): simply download the database, correct it and regenerate the marks.

We are interested in working with latex, questions and templates are specified using this syntax. The database is actually written in latex, so that syntax-checking is straigtforward. A custom style is responsible for producing the xml from the latex source.

I use the tt2 toolkit. I wrote a simple application (attached) that loads an xml file (or a perl dump) and interpolates the variables inside a tt2 template. For more info see http://template-toolkit.org/

I'm planning to extend this application to allow specifying xml-like structures using a wiki syntax, like the specification file above.

More info is available if desired. I think the first version will be available before summer...

-- FrancoBagnoli - 18 Mar 2002

I can generate the xsd if you like. Send it to me and I'll do convert it immediately. Is there CVS available?

Creating proto forms for the xml in a stand alone application can be very straightforward. The xml form structure would be ELEMENT dependant. I would use xybrix from http://www.jbrix.org

The scrambling of the questions is very important for minimizing the 'monkey work' of tests, that is, creating all the potential answers. I would propose as a test case a simple question domain like this

 <GROUP name="kinematics">
  <PROBLEM>
   A red ball, whose mass is 2.5 kg, is falling down from ....
   <QUESTION>
    Which is its speed v when it touches the gound?
    <RIGHT> v= 3 m/s</RIGHT>
   <QUESTION>
  <PROBLEM>
 <GROUP name="kinematics">
And place more emphasis on the topic of the question for sorting and randomizing. This would simplify the Q ² A form, if the user could set the randomizer to certain topics much like Twiki does now using WikiWords. The form would provide a rolldown of the available topics so that the xml is validated before uploading.

Below you'll see how I believe the topic and the answer data can be populated from the database. TWikiWords COULD be used to populate the topic. The answers for other questions could be used to populate the list of possible answers for a multiple choice question.

WikiWords Drawing is not editable here (insufficient permission or read-only site)
list of words
words


    <RIGHT> v= 3 m/s</RIGHT>
    <WRONG> v = 4 m/s </WRONG>
 

this is where the database would pull from a list of other wrong questions connected to the GROUP name thereby reducing the need for the user/quiz writer to create lots of wrong answers. Ideally the questions and the answers would have an evaluation field for each question and answer -- DennisDaniels - 2 June 2002

For the moment there is no working code nor cvs. after April, the 15th I'll have more time (stop teaching) and I'll restart it.

Actually, I used the xml "term" because it is fashionable. I prefer working in perl, so what I do is to "load" the xml into a perl structure (using XML::Simple) and work with it. As I said, my users work with latex, i do not think there is anybody wishing to write real, well formed xml. I plan to develop a latex style for producing "xml" from latex input, or tt2 syntax, and to write and some parser for converting wiki text to "xml", and even microsoft word rtf to "xml" (I mean: extracting the relevant part). When I mention "xml", here, I really think to perl structure (hashes, etc.) eventually dumped in xml (using XML::Simple) or using Storable or Data::Dumper. I let users choose the system they want. This allows for instance to include a perl expression for evaluating marks.

I have not understood your comments about scrambling/randomization, could you please explain them? What do you mean "user could set the randomizer to certain topics much like Twiki does now using WikiWords"?

-- FrancoBagnoli - 19 Mar 2002

see also QuizPluginDev

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdraw inteface.draw r5 r4 r3 r2 r1 manage 5.6 K 2002-06-02 - 14:09 UnknownUser  
GIFgif inteface.gif r5 r4 r3 r2 r1 manage 10.2 K 2002-06-02 - 14:09 UnknownUser  
Unknown file formatext itpage r1 manage 10.5 K 2002-03-18 - 17:38 UnknownUser interpolators of xml structures in tt2 templates
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2002-06-02 - DennisDaniels
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.