Development of Daily Homework and Quiz Manager (D.H.Q.M.)
for Enhancing Teaching/Learning in Large Classes
Copyright 1998 by the Small College Computing Symposium

Nem W. Schlecht
Information Technology Services
North Dakota State University

Dr. Sudhir I. Mehta
Mechanical Engineering Department
North Dakota State University

The slides in my presentation of this paper.


Research indicates that assigning daily homework problems, providing quick feedback, and obtaining quick assessment of student learning are important in enhancing the teaching-learning process. However, performing these activities in a large class of over a hundred students is extremely time consuming. This paper describes a tool, The Daily Homework and Quiz Manager (DHQM), that has been developed to implement the above activities fairly easily, benefiting both students and instructors.

Object-oriented Perl and certain features of Netscape, make the user screens of the DHQM package attractive, easy to understand, computationally efficient, and quickly delivered to the user. Making sure that the user receives the information quickly is an important aspect that is too often overlooked in many of the fancy web based applications today.

The use of Perl allows the DHQM package to be easily portable between different UNIX platforms with few, if any, changes necessary. The Perl code provided in the DHQM package follows Internet standards on distributing Perl code packages and object-oriented authoring and testing methods. Since methods for class data retrieval and manipulation are provided, instructors can easily extend DHQM to suit their specific needs. Perl has long been admired by system administrators and, for some time, has also formed the backbone of many CGI applications on the Web. By using Perl, which is familiar to many programmers and Web developers, we hope that the DHQM package may be extended even farther by other parties at other institutions.

A portable system, small code size, fast data delivery, extendible code, and an easy user interface are all part of the DHQM package. This paper covers a brief history and future potential of the DHQM package.


In 1994, only a year after I was hired by Information Technology Services at N.D.S.U., I was asked to work with Dr. Sudhir Mehta to develop a program to help him with his classes. Through much hard work and many meetings we managed to come up with the original D.H.Q.M. system, which was in use for 3 years. The original system, although declared a success, was missing some features and was cumbersome to use. Also, after 3 years, it was getting a little behind the times. This paper describes some of the process of developing the new system, descriptions of the CGI programs used in the system, and some of the features of the new system.

The Original D.H.Q.M. System

The original D.H.Q.M. System, designed and written in the fall of 1994 was a strictly text-based system. Some readline functionality was implemented to help the students and instructors, but this was only in the form of tab-completion of certain list items (such as a list of dates for which scores were available). A very small menu system was developed for the instructor, but it was difficult to use. The system was not user-friendly by today's standards. Also, it was required that all students and instructors have accounts on the same UNIX server, which posed many problems over the last 3 years. In the end, a mainly unused server was set up for the purpose of handling the D.H.Q.M. system and to give it a centralized location.

Features of the Latest D.H.Q.M. System

The new D.H.Q.M. System retains all of the functionality and instructor tools of the old systems but is now more user friendly and diverse. Students and instructors can now access the system from any machine running any operating systems. Also, the graphical web form interface is a common and well understood interface, so no new form navigation knowledge is required. There is more persistence of data of the instructors, as well. The statistical breakdown given to the instructor when they process a new day's scores are saved and available at any point in the future to the instructor. Finally, students can now request to see any combination or all of their grades for a full semester. In the old system, they needed to request them one at a time.

The Development of the Latest D.H.Q.M. System

This past summer, with the aide of the North Dakota State University Technology Fee and a proposal by Dr. Mehta, the new D.H.Q.M. system was developed. The main goal was to create an easy to use interface for both the students and instructors. This goal, by itself, would have been easily accomplished in a short amount of time. However, I took advantage of this by reworking the system itself into a more object oriented system. In the original system, I had grouped some subroutines into perl libraries and also had a menu system developed. I used these as a framework for my object classes and the layout of the main instructor's tool page, respectively. Unfortunately, not as many object oriented functionalities were put into place I would have liked. There are cases where inheritance should be used to help simplify some of the CGI programs. Also, some sections of code in the CGI programs should be generalized and placed into classes as methods. The main system, as a whole, has progressed greatly. The complexity in making all of the scripts 'web' aware has been significantly hidden by the use of object oriented perl.

The D.H.Q.M. Perl module package

The DHQM Perl package is available for download from the main D.H.Q.M. page here at N.D.S.U. (see Appendix). It follows the same standards as other module packages that can be downloaded from any CPAN sites. It is compressed with GNU's compression program gzip and archived using the UNIX tar command. Once extracted, you must run "perl Makefile.PL" in the extracted directory and then run "make". You may also want to run "make test" after building is complete to make sure that everything is working. Finally, run "make install" to install the software. Perl standards have been employed as much as possible, but are lacking in several areas. There is no embedded documentation suitable for use by the podtoxxx converters. There are comments, but you have to look at the class description code to read them.

The 'DHQM::Class' Perl Module

This object class is used for most of the high level things that the instructors deal with. It has methods to list the classes that an instructor is allowed to modify, return references to associative arrays to students' names and grades, and make updates to both the data file and the control file. It also handles the rotation of the files (in case of possible instructor error or a major malfunction). Lastly, it also provides methods for interacting with the daily statistics file.

The 'DHQM::Code' Perl Module

This class deals with the alpha codes that students receive. The most important method is a recursive one that creates the list of alpha codes for a class. Any size class can be used with the D.H.Q.M. project. Code creation is done in intervals of powers of five. For example, if you have a class of 20, you only need an alpha code of length 2 because you can have 5=25 codes with 2 alpha digits. For classes of 125 or less, you need 3 alpha digits (5=125), etc. In our test classes, we have always just picked 4 alpha digits so that there are no worries about overrunning the 125 code limit with 3 alpha digits. There is no reason you can't use 4 alpha digits, even if you only have 10 students. I should note at this time that we haven't tried to use more or less than 4 alpha digits for our alpha codes, so it is a bit untested. I know that they work with the Code class, but they may not with some of the CGI programs listed below. Other methods that are provided by the Code class include converting from alpha digits to numeric digits (a=1, b=2, etc.) and a method to increment an alpha code's value (abcd => abce).

The 'DHQM::Config' Perl Module Methods

This class only contains a constructor method and one variable. This is the only module that programmers have to modify. It contains the path to the main library directory where the D.H.Q.M. site configuration and class data is all stored. The Class, Instructor, and Student classes all create an instantiation of the Config class since they all require or manipulate information from the main D.H.Q.M. library directory.

The 'DHQM::GProc' Perl Module Methods

This module does the actual calculations for grading the homework and quiz questions. For quiz grading, one must call the set_quiz_key() method and pass it the quiz key, a string of characters that is compared to each students' quiz answer. A method to convert the homework score is also located here. The homework score is based on a 10 point system. If a homework question is 100% correct, a student receives a mark on the 'a' circle. For each letter past 'a', the student receives one point less. The lowest score a student will receive on the homework is 5, unless that student did not do the homework.

The 'DHQM::Instructor' Perl Module Methods

This module only contains two methods. First is a method that retrieves the name and scores for a specific student (via alpha code and class). The other method updates the grade data portion of the class database for a specific student. The latter method does not do an update for a specific date. The calling program must figure it out using the methods provided in the Class class.

The 'DHQM::OMR' Perl Module Methods

This module has only one method, which processes the O.M.R. data line by line. The O.M.R. data is the file that is created by whatever optical mark reader hardware you may have. This module may need to be modified to work with your optical mark reader. It is impossible to know all the different output formats that O.M.R. hardware may produce. It is up to the local programmer to rewrite this module to handle their specific O.M.R. data format.

The 'DHQM::Stats' Perl Module Methods

This module has methods to calculate some basic statistics. These include: min, mean, max, total (calculate sum), freq (frequency distribution), and std_dev (standard deviation). There are statistics modules available from the C.P.A.N. sites, but they usually do higher level statistics. I only needed basic statistics for the D.H.Q.M. package.

The 'DHQM::Student' Perl Module Methods

This module has two methods. The first one is for the student grade page and does both authentication and returns all the grades for the student for the class. Verification of students is done with a combination of alpha code and their N.A.I.D. number, which is a unique identification number for the student that is given by the university. The other method calculates some statistics (mean and total) for the student's homework and quiz scores.

Performance Tweaks

The D.H.Q.M. package takes advantage of the WIDTH attribute of the IMG tag to improve the performance of loading pages. All of the graphs that appear on any of the D.H.Q.M. pages are actually just a 1 pixel by 1 pixel GIF image that has been stretched to 10 pixels using the HEIGHT attribute and some width using the WIDTH attribute. All graphs are done inside of TABLE cells and always represent a percentage of some type. Because the graphs represent a percentage, that percentage value is inserted directly into the WIDTH attribute. Therefore, the value that the graph represents is easily viewable by comparing the size of the graph to the overall size of the table cell that it is in. Unfortunately, to get this behavior, the student or instructor must run Netscape 4.0 or higher.

Student CGI Programs

The following is a list of the CGI Programs used in dealing with students. There aren't very many, since the problem of handling the student data is very easy and the students can only do one thing - get their grades. This is; however, a likely location to add additional features such as an online quiz or test.


This is the main page that comes up when students access the student grade area. The only reason this is a CGI program is that we need to present the students with a list of classes to which they might belong.


This CGI program does the actual lookup of the Student scores. It presents the students with a list of dates for which there are class scores and always gives the student their cumulative homework and quiz grades as well as the class averages for these. The student may then select any or all presented dates, ask for an update, and receive their homework and quiz scores, as well as the class averages, for all the days selected.

Instructor CGI Programs

The following is a list of the CGI Programs that are tools for the instructor. They include programs to both update and extract data from the class databases, as well as programs to obtain detailed information about the class or statistical information about how the class responded to the homework and quiz questions. A much larger amount of time was spent on updating and enhancing these programs. Most of these programs, as well as the student program, studgrade, set up certain state information via HIDDENinput fields and 'recursively' call themselves. Only if an instructor teaches more than one class will they be asked to select a class in any of the scripts below.


This program does the initialization and setup for a new class that an instructor will be teaching. At this time, a class list including the names of all the students as well as a unique identifier for them must be provided. The user codes for the student are also generated at this time and displayed for the instructor. The instructor may wish to print this out in order to give the students their codes. However, I would suggest that the instructor download the class database (available on the instructor's tool page) and load it into Excell or some other spreadsheet where they may format the list to their liking.


This is the heart of procomr program. It does pretty much everything magical in the whole system. Using the above objects, it grades the homework and quiz scores, updates the database with those scores, performs the statistical analysis, and displays status information on the processing. This program took the most time to develop.


This CGI program is used to add students to the class list. It is just the opposite of delstud, allowing an instructor to add students that have just added their class to the class database. The new students' grades for days that they have missed are all set to '-1', the same as if they had been signed up since the beginning at hadn't addended class. If the instructor gives makup homework and quiz questions to this student, they can change the absentee grades with the use of the chstudgrad program.


The chstudgrad program is used to change the grade for a student for a certain date. After the instructor selects the class, student, and date, a web form is presented with the student's current grade already filled in. The instructor simply makes any changes and applies them.


This is the program that actually does the work for dldb. It collects the data from the proper class and does split() calls, etc. This is the program you will want to change if you want your downloaded data to be something other than tab-delimited. It should pop up a download box by default. Of course, this depends on the server's mime-types file and the instructor's .mailcap file or Netscape mime handler. The file is sent as the 'application/octet-stream' mime type and will be saved as classdb.cgi.


This CGI program is used to remove students from the class list. As we all know, students change their curriculum often or change majors. Since unattending students will bring the class averages down, the instructor has the option of removing them from the class database.


Many times an instructor will want to load the grades into some other application. The dldb program can be used for this purpose. By default, it asks the instructor for any parameters and calls classdb (see above).


This program presents the instructor with a multi-day summary for all of the students in a class as well as the totals for all of the students. Up to 5 days can be selected. Students that have missed a class or had a problem with their opscan sheet will be marked in the table with a different background to distinguish them from the other scores.


This CGI is just a wrapper for addscore. It sets up the form to be filled in by the instructor. As other programs, it is a CGI program so that it will prompt the instructor only with the classes that that instructor teaches.


This program displays the same statistical analysis graphs as the addscore program. It allows the instructor to view data on a certain day's scores, even if that class was held months ago. It does not go out and re-do any analysis. The output from the analysis that was done when the data was loaded is saved with each class' data. This program merely loads that data, fills out the table, and displays it.

D.H.Q.M. - The Next Iteration

The development of any software package is an iterative process. I have described to you only the second iteration of a software package that I have no doubt will continue to both be used and developed further. This past summer, while doing the conversions from both a text to a web interface and old-style perl library to new-style perl objects, I became aware of many shortfalls and problems with the current system. My hope is that others will help me in this endeavor and that the D.H.Q.M. package will continue to evolve. I personally wish to implement a standardized object to handle to I/O of the current system, so that a relational database or other storage management solutions can replace the current, slow, colon delimited data and control files. I also hope that the D.H.Q.M. package can be made to interface with other instructional web tools that others are developing.


Official D.H.Q.M. Homepage:
Official Perl Site:
For a list of CPAN Sites:
Official Netscape Site:


Nem W. Schlecht is a UNIX Systems Administrator and Programmer for the North Dakota State University System. His specialties include Perl programming and database applications. His responsibilities include technical Web administration and systems administration for Silicon Graphics workstations. He also is a consultant for faculty, staff, and students on a wide range of UNIX related topics. He is currently a Senior in Computer Science at North Dakota State University.

Sudhir I Mehta is a professor of Mechanical Engineering at North Dakota State University. He has 3 years of industrial and 19 years of academic experience in the areas of engineering education research, instrumentation, controls, robotics, design optimization, and machine vision. He has developed 2 CDROMs containing hypermedia based instrumentation and communication resource modules. He has also developed innovative techniques for active learning and quick assessment. Dr. Mehta received the Carnot Award for the best teacher of the year from the students of Pi Tau Sigma Society four times. He also won the Carnigie Foundation's 1997 North Dakota Professor of the Year.