The Development of the Question Editor for OnQ, a Survey Authoring Tool by Catherine A. Hochrine submitted to the graduate faculty of the Department of Computer Science in partial fulfillment of the requirements for the degree of Master of Science in Computer Science. November 1, 2002 Clemson University Clemson, SC 29634 – 0974 1 ABSTRACT Internet growth and activity has been increasing almost exponentially over the last decade. Today, millions of people from all over the world use the Internet for a variety of reasons, such as email and Instant Messenger, shopping, trading stocks, and research, to name just a few. Another activity on the Internet that is also growing in use is on-line surveys. With the globalization effect that the Internet has had, the Internet is the perfect medium for conducting surveys that are intended to reach people from all over the world. Surveys have always been a very popular tool in determining people’s opinions or preferences on a given subject. Web-based surveys are very effective in reaching large numbers of people from all over the world compared to paper, in-person, or telephone surveys. A survey authoring tool called OnQ, developed by a team of developers at Clemson University, makes the creation, deployment, and analysis of surveys intuitive and efficient. OnQ provides tools and features that other commercially available survey authoring tools do not. This paper describes these, and in particular, discusses the Question Editing module of OnQ, which is the module where questions, answer options, and their associated attributes are created and entered into a database. 2 Acknowledgements I would like to thank the following people, without whom, this project would not have been possible: first and foremost, my advisor, Dr. Roy Pargas for suggesting this project to me, and for all of his help and support; and Dr. James Witte of the Sociology Department for all of his help with the general design of the database and the authoring tool. I would like to thank Dr. Art Pellerin, who is also on my committee for his initial help in understanding relationship diagrams with Microsoft Access, as well as Dr. Sandra Hedetniemi for also serving on my committee. I would like to express my gratitude to my fellow graduate students who played a big role in developing OnQ. Kowshik Jaganathan was very helpful in understanding the tables in the database for Survey 2001, which was the starting point for OnQ, and also helped with the design of OnQ. Laura Knipfer-Brand was also a part of our design team, as well as a developer of one of the other modules of OnQ. Meg Staton also developed a module for OnQ, and was instrumental in helping to put all the pieces together. Many thanks to Eastwood Homes of Greenville, SC for allowing me to use their survey for demonstrating my portion of OnQ. Also, thanks to Julie Coin, a student from France, who helped me with the translation of the Eastwood Homes survey into French. Funding for Survey 2001, a predecessor to OnQ, was provided by the following grant: National Science Foundation IIS-0082750, “ITR: Survey2001: Information Technology’s Impact on Community, Culture, and Conservation”. In addition, OnQ’s development was partially funded by the Clemson University Office of Access and Equity. I would like to express my appreciation to the faculty and staff of the Department of Computer Science for all of their support and understanding in my pursuit of the MS degree. Lastly, I would like to thank my husband Darren, and family for their patience and support. 3 CONTENTS List of Figures 1. Introduction 2. Background 2.1 Statement of Need 3. Architectural Overview 3.1 Overview of OnQ 3.2 Underlying Technology 3.3 The Question Editing Module and Database Storage 3.3.1 Question Composition 3.3.2 Answer Composition 4. Results 5. Conclusions and Future Work 6. References Appendix A A.1 Eastwood Homes paper survey 4 List of Figures Figure 1.1 Summary table of authoring tools Figure 3.1 Diagram of the tables used in OnQ Figure 3.2 Sequence Developer module Figure 3.3 Format Individual Questions Figure 3.4 Format Question Blocks Figure 3.5 Architecture of OnQ Figure 3.6 Opening screen for Question Editing module Figure 3.7 Flow chart for QC part of Question Editing module Figure 3.8 “Languages” Figure 3.9 “Category” Figure 3.10 Flow of control for “Language”, “Category”, “Prefix”, or “Suffix” drop-down lists Figure 3.11 survey_language Figure 3.12 question_topic Figure 3.13 prefixes table Figure 3.14 suffixes table table table Figure 3.15 “Questions By Key” and “Key” lists Figure 3.16 question_keys table Figure 3.17 QC screen with selected question Figure 3.18 “Display Questions By Key” Figure 3.19 “Display Keys” Figure 3.20 “Question”, “Prefix”, “Root”, and “Suffix” Figure 3.21 Figure 3.22 Figure 3.23 roots table question_prompts questions table table Figure 3.24 Answer Composition screen Figure 3.25 Flow chart fo QC part of the Question Editing module Figure 3.26 Chosen question displayed Figure 3.27 Answer options Figure 3.28 Type and number of answer options 5 Figure 3.29 Answer options and sequences Figure 3.30 answers table Figure 3.31 answer_sequence table Figure 3.32 “Text area” Figure 3.33 “Text box” Figure 3.34 Tabs along the top and menu options Figure 3.35 File menu Figure 3.36 Edit menu Figure 3.37 List of items Figure 3.38 Item to edit Figure 3.39 Lookup box from View menu option 6 1 INTRODUCTION Since the launch of the World Wide Web in 1991, the number of hosts has grown more than anyone could have expected. In 1991, the number of hosts was 617,000; that number has almost doubled every year since then [1]. A current figure for the number of hosts advertised in the Domain Name System (DNS)1 as of July 2002 is 162,128,493 [2] as reported by the Internet Software Consortium.2 Prior to the Web’s release in 1991, the Internet was used predominantly for research purposes by government and educational organizations. It has only been the last decade with the release of the Web and the creation of graphical web browsers, starting with Mosaic in 1993, that the general public has made the Internet and the Web a part of every day life. The Web is now used for a variety of activities including research and communications, shopping, trading stocks, and file sharing, to name just a few. The Web is capable of reaching huge numbers of people from all over the world. NUA.com3 estimates the number of Internet users from all over the world for the month of May 2002 at 580,780,000 which is 9.57% of the world’s population [3]; the Nielson/Net Ratings4 estimate the number of Internet users for the month of June 2002 at 391,042,644 [4]. In a paper entitled “A Brief History of the Internet”, the authors describe the Internet as “a medium for collaboration and interaction between individuals and their computers without regard for geographic location”[5]. This 1 The DNS is a world-wide distributed database that translates host names into IP addresses. The Internet Software Consortium (http://www.isc.org) is an organization that produces high-quality reference implementations. They have a fairly long and impressive list of sponsors, including AT&T CERFNet, Hewlitt Packard, IBM, Sun Microsystems, UUNET and others. For more information on how their Domain Survey works, see http://www.isc.org/ds/new-survey.html. 3 NUA.com is an “on-line source for information on Internet demographics and trends” who bases their estimates on “extensive examination of surveys and reports from around the world” and has been referenced by the United Nations, States Department of Commerce, and the United States Internet council (http://www.nua.ie/surveys/about/index.html). 4 The Nielson/Net Ratings is a partnership of NetRatings, Nielsen Media Research, and ACNielsen. NetRatings is “the leading global source of information on consumer and business usage of the Internet”. Nielsen Media Research is the “leading television-audience measurement company in North America”. ACNielsen Corporation is the “global leader in providing market research analysis to the consumer produces and services industries”. (http://www.nielsennetratings.com/who_we_are.jsp) 2 7 globalization effect of such huge numbers of people from all over the world make the Web the perfect medium for conducting research in the form of surveys. There are several survey authoring tools that are available on the Web today. They vary widely in terms of price, platform compatibility, and features. One feature common to all of the survey authoring tools mentioned here is the capability of inserting audio and image components. Web Surveyor [6] is one package that is available for any Windows from Win95 or later, or it can be used from their server. Some of the features of this package include multi-language surveys, versatile branching, different background colors, and different text options. Another survey authoring tool available is called WWW Survey Assistant. This authoring tool is Web-accessible, and works on machines with Win95 or later. It has a java-based editor and thus, can be run on any machine, including Solaris, OS/2, and Macs. All project files, however, are saved on their server. This tool also has different text options. In response to an email asking about skip patterns, they replied that WWW Survey Assistant [7] can do complex skip patterns, and also can randomize questions. Further details on the extent of complexity of skip patterns were not included in the email. Hosted Survey [8] is another survey tool available. This tool is entirely web-based. It handles conditional branching where the answer to a single question can branch to a series of questions; and, it can randomize questions. Another feature of this tool is the ability to break up the questions into groups or sections. Survey Said for the Web [9] is one other survey authoring tool that is Web-accessible, and works on machines with Win95 or later. This tool allows for single, linear skips only. One feature of this authoring tool is the use of keyword association for easily identifying questions, and also a search feature for the questions where it can search by word or phrase. 8 Finally, Sawtooth [10] is also Web-accessible, and works on machines with Win95 or later. This authoring tool handles branches of any complexity, and can also randomize the answers, questions, or blocks of questions. A table that summarizes these authoring tools is displayed below (Figure 1.1). Different text Different backgrounds Keyword association Multi-language Randomization Branching Categories of questions Images & audio Win 95 + Other machines Figure 1.1 Summary Table of Authoring Tools Web Surveyor √ WWW Survey Assistant √ √ √ √ √ √ √ √ √ √ questions Hosted Survey Entirely Webbased Survey Said For the Web √ √ √ √ √ √ √ √ single, linear Sawtooth √ √ questions, answers, & question blocks OnQ √ √ √ + video √ √ 9 √ √ √ √ 2 BACKGROUND OF OnQ OnQ, short for Online Questionnaire, has its roots with first Survey 2000, and then Survey 2001 [11],[12]. Survey 2000 was a project developed by a group of scholars from Northwestern University and researchers at National Geographic which was begun in the Fall of 1998. National Geographic wanted to find out how a person is shaped by his/her environment. They wanted a survey conducted on the Web, which was funded by the NSF (National Science Foundation) and launched in October 2000. Questions, answers, and the ability to skip to other questions based on answers to previous questions, were all hardcoded in CGI scripts. National Geographic was so pleased with the survey’s results, (the survey had over 80,000 respondents), that they wanted another survey to study Internet activity and use. NSF again funded this project, which was developed at Clemson University by researchers from the Sociology and Computer Science departments. This project was called Survey 2001, and was launched in the Fall of 2001. Survey 2001 was available in four different languages (English, Spanish, Italian, and German), and had over 2000 questions and around 1500 answer options in each language [11],[12] which were divided into several groups of questions. The first three groups: demography, the Internet, and environmental issues, were asked of all respondents. After those three groups of questions were completed, the respondent could continue with as many of the following four groups of questions: science, community, lifestyles, or reading and politics. To this date, there have been over 32,000 respondents. 2.1 Statement of Need Most all of the database entries for Survey 2001 had to be entered manually. As mentioned above, Survey 2001 had over 2000 unique questions and around 1500 answer options in each language [11],[12]. The developers used an Excel spreadsheet along with some Visual Basic scripts 10 to facilitate the entry of the questions and answer options into the database. In addition to the data, the survey featured question blocks with transitions, which were also all organized and entered manually. Question blocks and transitions allow for a dynamic sequence of questions based on the respondent’s answers to some of the previous questions. For example, a question might ask if the respondent belongs to a religious denomination. If the respondent answers yes, the next question might then be which denomination. denomination would be skipped. If the respondent answers no, that question about which Skip patterns such as this can vary from simple to quite complicated. All of this tedious manual entry was error-prone, extremely difficult to proofread and edit, and took the software engineers and survey developers at Clemson University about six months to complete. 3 ARCHITECTURAL OVERVIEW 3.1 Overview of OnQ OnQ is the latest effort by developers at Clemson University. After quickly realizing how useful an authoring tool would have been with Survey 2001, work began on OnQ. First the tables used in Survey 2001 were re-evalutated [11],[12],[13]. A diagram of the tables used in OnQ is displayed in the figure below (Figure 3.1). The tables used by the Question Editor module are on the left half of the diagram, and are described in more detail in section 3.3 of this paper. 11 Figure 3.1 Diagram of the tables used in OnQ OnQ is broken up into four logical modules: Question Editor, Sequence Developer, Question Formatter, and the Presentation modules. Each module was programmed by a different developer. The Question Editor module, the topic of this paper, is the module where the questions and answer options are created. This module will be described in detail in section 3.3 of this paper. We feel that one of the strongest features of OnQ is the ability to create question blocks with skip patterns represented by arbitrarily complex Boolean expressions. The Sequence Developer module allows the survey author to create, view, and edit question blocks, as well as create, view, and edit transitions to/from the question blocks. Also, the questions within a question block can be 12 randomized in any one of three ways. The reader is referred to Knipfer-Brand’s paper [14] for more details on this module. Figure 3.2 displays the Sequence Developer module. Figure 3.2 Sequence Developer module The Question Formatting module has two parts: Format Individual Questions (Figure 3.3), and Format Question Blocks (Figure 3.4). The Format Individual Questions part of this module allows the survey author to design the way in which the questions will be presented. For example, the answer choices may appear above or below the question. Also, the survey author can add sound or video to a question, as well as an image along with its placement; for example, above or below the question. The Format Question Blocks part of this module allows the author to design the way in which the pages will be presented. For example, rather than having one long scrolling page of survey questions, the survey author can group questions together on a page. Each question block by default is presented on a separate page, but the author can define page ends within a question block by 13 formatting a question with an “end page” attribute. The reader is referred to Staton’s paper [15] for more details on this module. Figure 3.3 Format Individual Questions Figure 3.4 Format Question Blocks 14 The Presentation Module allows the survey author to view the survey that he/she has created exactly as it will appear when deployed. The same web pages served to clients by the Presentation Manager are also served to the survey author so that the survey author can see during the development of the survey exactly what the respondent will see when completing the survey, and easily be able to modify the formatting of the survey. This is achieved via the Tomcat servlet engine. The browser issues requests to Tomcat to serve a page, and Tomcat forwards the page to the browser. As the survey author, or the respondent, clicks through the survey, requests are sent to the Presentation Manager through Tomcat and Tomcat responds by serving the pages. 3.2 Underlying Technology OnQ is written in Java (Java 2 Platform, Standard Edition, version 1.4.0). Java was chosen for its platform independence: OnQ has been implemented on both the Windows PC and Apple MacIntosh systems, as well as Sun Solaris workstations. The Swing components of the Java API are used extensively. The Swing components, also called Java Foundation Classes (JFC), are an extension of the original Abstract Window Toolkit (AWT) that adds a comprehensive set of graphical user interface class libraries. The Swing components are included in the Java 2 Platform, Standard Edition. They do not rely on any specific windowing system, which allows greatest platform independence with respect to the GUI components [16],[17]. For the database, MySQL version 3.23.40 is used, which is an open source SQL database server developed and marketed by a Swedish company called MySQL AB [18]. Java Database Connectivity (JDBC) is used for the communication between the Java application and the database. JDBC provides a simple and powerful way of extracting and inserting data to or from any database [19]. The MySQL driver we used is the MM.MySQL JDBC driver (now called MySQL Connector J) 15 developed by Mark Matthews, which is the official JDBC driver for MySQL [20]. MM.MySQL is a native Java driver that allows JDBC to communicate with the MySQL database [19]. The web server used is the Apache HTTP Server, which is a project of the Apache Software Foundation. It is an open source HTTP server, and is the most popular web server on the Internet [21]. We use a servlet engine to process requests and communicate with the database. The servlet engine used is Tomcat version 3.2.3, which is an open source product of Apache Jakarta Project based on Java technology for Java Servlets and Java Server Pages [22]. Figure 3.5 below shows the architecture of OnQ. Figure 3.5 Architecture of OnQ Tomcat Servlet Engine/Apache Web Server OnQ Question Editor Sequence Developer Question Formatter Presentation Manager Local Browser Internet Database Developer Client Client Client The box on the left side of OnQ in the above figure contains the following three modules: Question Editor, Sequence Developer, and Question Formatter. The “Presentation Manager” portion of OnQ in the above figure is the Presentation module that communicates the survey as it will look when deployed to the client’s web browser via the Tomcat servlet engine. 16 3.3 The Question Editing Module and Database Storage This section will describe the QE module in more detail, including the database storage. The database table figures have data from a real survey that Eastwood Homes (a home builder in Greenville, SC) gives to its customers upon the completion of their home. The original paper survey appears with permission in Appendix A. The use of OnQ to convert this paper survey was a straightforward and intuitive process, and the resulting tables are used to demonstrate the information in the following sections. 3.3.1 Question Composition The Question Editing module of OnQ, a Survey Authoring Tool, allows the survey author to enter into a database, questions and answer options, as well as other attributes pertaining to the questions and answer options. When OnQ starts, the survey author enters a user name and password, chooses which module and which database to use. If desired, a new database may be created by simply typing in a name for the new database. The DriverFrame file is the file that is run to start up OnQ. It is this file that displays the introduction screen with the user name and password, and the choice of which module to start with, as well as the choice of using an already existing database or the creation of a new database. If a new database is chosen, this file initializes the database with all the necessary tables via a script file that contains the necessary MySQL statements. With a new database, the first module the author will want to work with is the Question Editing (QE) module. The other modules are the Sequence Developer (SD) and Question Formatter (QF) modules. Within the QE module, there are two parts: Question Composition (QC) and Answer Composition (AC). 17 Also in DriverFrame, two of the tables in the database are initialized with entries with the creation of a new database: survey_language the survey_language table, and the answer_type table. The table is initialized with the language “English”. The answer_type table is initialized with the seven possible types of answer options: “radio buttons”, “check boxes”, “drop-down lists”, “text area”, “text box”, “splash and continue”, and “splash don’t continue”. These answer option choices are displayed on the Answer Composition (AC) screen, which is discussed later in section 3.3.2 of this paper. The opening screen for the QE module is the Question Composition (QC) screen (Figure 3.6), where questions and their attributes are created. Figure 3.6 Opening screen for Question Editing module The flow of control within the Question Composition (QC) part of the Question Editing (QE) module is displayed below in Figure 3.7. 18 Figure 3.7 Flow chart for QC part of the Question Editing module choose “Language”, “Category”, “Prefix”, or choose existing one Y chosen item in JComboBox is selected Y ? “Suffix” ? Continue button create a new one N clicked list is updated & item is added to table Y ? N N N choose “Display Q-by-Key”, or “Display Keys” displayed lists are updated Y ? Y choose enter text ? “Root” N “Question Composition” module continue N question # prefix root suffix choose question from “Q By Key” list Y ? are displayed key is highlighted language category are selected N choose key from “Key” list choose existing Y one chosen Key is highlighted Y ? ? N create a new one click QC button Y ? all lists & tables are updated Continue button clicked ? N N N click AC button ? Y all lists & tables are updated 19 “Answer Composition” module, page 2 Y list is updated & item is added to table The first item on the QC screen the survey may want to take a look at is the “Language” drop-down list. Since the default language with a new survey is English (Figure 3.8), it is already selected in the drop-down list. If the survey author wishes to use a different language, a new language may be chosen, or created if not already there. Beneath the “Language” drop-down list is the “Category” drop-down list. This is for surveys that will have more than one logical group of related questions. For example, a survey may begin with a group of questions relating to demographic information before moving onto another topic. The survey author in this example may create the category “Demography” for that group of questions by choosing “Other (Enter a new one)” from the Category list (Figure 3.9). That category, then, remains the selected category for the subsequent questions created until the survey author selects or creates another one. Figure 3.8 “Languages” Figure 3.9 “Category” In the center of the screen are the drop-down lists for “Prefixes” and “Suffixes”. These are similar to the above “Languages” and “Category” lists in that they allow the user to select already existing prefixes or suffixes, or the survey author may decide to enter a new one. The flow of control for these four drop-down lists can be seen on the following portion of the flow chart (Figure 3.10). 20 Figure 3.10 Flow of control for “Language”, “Category”, “Prefix”, or “Suffix” drop-down lists choose “Language”, “Category”, “Prefix”, or choose existing one Y chosen item in JComboBox is selected Y ? “Suffix” ? Continue button create a new one N clicked list is updated & item is added to table Y ? N N N choose “Display Q-by-Key”, or “Display Keys” displayed lists are updated Y ? These drop-down lists are Java JComboBox objects. When an item is chosen from a JComboBox, an ItemEvent is fired up, which automatically calls the itemStatedChanged( ) method. If the user Y choose enter text chooses to enter a new item,“Root” a new window (JFrame object) for the item opens up, where the user ? enters the new item. The following code is an excerpt from itemStateChanged( ) method for the N “Question Composition” continue “Languages” drop-down list, which module N shows where the new window (JFrame object) is instantiated. question # prefix root suffix are displayed else if (source == languageJComboBox) { choose question from if (languageJComboBox.getSelectedItem().equals("Other (Enter a new one)")) { Y key is highlighted “Q By Key” list lgfrm = new LanguageFrame(this); ? language } // end if category are selected } N chosen Key is highlighted When the continue button inchoose thatkey window is clicked, the itemY is inserted into the appropriate table choose existing Y ? (survey_language, question_topic, prefixes, from “Key” list one or ? suffixes N table) (Figures 3.11 – 3.14). All of the list is Continue button Y updated & item is added to table create a JComboBoxes (drop-down lists) in the Question Editing (QE) module work this way. new one clicked ? Y click QC button Figure 3.11 survey_language ? all lists & tables are updated N N (s_lang_id is the primary key) table N mysql> select * fromclick survey_language; AC Y all lists & tables +-----------+-------------+ button ? are updated | s_lang_id | s_lang_name | +-----------+-------------+ | 1 | English | +-----------+-------------+ 1 row in set (0.00 sec) 21 “Answer Composition” module, page 2 Figure 3.12 question_topic table (q_topic_id is the primary key) mysql> select * from question_topic; +------------+------------------+--------------+ | q_topic_id | q_topic_name | q_topic_code | +------------+------------------+--------------+ | 1 | general | NULL | | 2 | sales rep | NULL | | 3 | superintendent | NULL | | 4 | your new home | NULL | | 5 | mortgage company | NULL | | 6 | referrals | NULL | | 7 | coments | NULL | +------------+------------------+--------------+ 7 rows in set (0.00 sec) Figure 3.13 prefixes table (prefix_id is the primary key) mysql> select * from prefixes; +-----------+-----------+-------------------------------+ | s_lang_id | prefix_id | prefix_text | +-----------+-----------+-------------------------------+ | 1 | 1 | What is your | | 1 | 2 | How would you rate | | 1 | 3 | Based on your experience | | 1 | 4 | Did your Sales Representative | | 1 | 5 | Were | | 1 | 6 | What mortgage company | | 1 | 7 | What loan officer | | 1 | 8 | Would you please refer | | 1 | 9 | Please use the following | +-----------+-----------+-------------------------------+ 9 rows in set (0.01 sec) Figure 3.14 suffixes table (suffix_id is the primary key) mysql> select * from suffixes; +-----------+-----------+------------------------------+ | s_lang_id | suffix_id | suffix_text | +-----------+-----------+------------------------------+ | 1 | 1 | with your new Eastwood home? | | 1 | 2 | to others? | | 1 | 3 | your new Eastwood home? | +-----------+-----------+------------------------------+ 3 rows in set (0.01 sec) On the right side of the screen is the list of “Keys” (Figure 3.15). A question key is a word or short phrase that can be used to quickly identify a question, making it easier to select a question for future modification or in the other modules for creating question blocks (SD) or formatting (QF). When an existing item from the “Key” list is chosen, it is just highlighted, and will be the key for the current question. 22 Figure 3.15 “Questions By Key” and “Key” lists If the user chooses to enter a new one, a ListSelectionEvent is fired up, which automatically calls the valueChanged( ) method. Similarly to the JComboBoxes, when a new key is to be created, a new window (JFrame object) opens up, where the user enters the new key. When the continue button in that window is clicked, the key is inserted into the question_key table, which is shown in the Figure 3.16. When a question is created, it is added to the list of questions in order of its question number, and is displayed by its key. This list is called “Questions By Key” (Figure 3.15). This list and the “Key” list both are implemented as a JList wrapped in a JScrollPane. When an item from the “Questions By Key List” is chosen, it is highlighted, and all the question details are displayed: the question number is displayed in the “Question Number” text box, the prefix and suffix for that question are selected, the text for the root is displayed in the “Root” text area, the key for that 23 question is highlighted, and the language and category for that question are selected. Figure 3.17 shows a portion of the QC screen when a question is selected. Figure 3.16 a portion of the question_keys table (q_key_id is the primary key) mysql> select * from question_keys; +-----------+----------+------------------------------------+ | s_lang_id | q_key_id | q_key_text | +-----------+----------+------------------------------------+ | 1 | 1 | name | | 1 | 2 | lot | | 1 | 3 | community | | 1 | 4 | work phone | | 1 | 5 | sales rep name | | 1 | 6 | sales rep professionalism | | 1 | 7 | sales rep courtesy | | 1 | 8 | sales rep knowledge | | 1 | 9 | sales rep responsiveness | | 1 | 10 | recommend sales rep | | 1 | 11 | kept informed | | 1 | 12 | supers name | | 1 | 13 | supers professionalism | Figure 3.17 Question Composition screen with selected question from Eastwood Homes survey Above the “Questions By Key” list is the drop-down list “Display Questions By Key” (Figure 3.18), which allows the survey author choose how the list of questions should be displayed. By 24 default, “All, numerical order” is selected. The other choices include “All, alphabetical order”, and each time a category is created, each category is added to the display list with both numerical order and alphabetical order options. Above the “Key” list is a similar “Display Keys” drop-down list (Figure 3.19), which lets the survey author choose how the keys should be displayed. Besides the default “All, alphabetical order”, they may also be displayed by category, in alphabetical order. Figure 3.18 “Display Questions By Key” Figure 3.19 “Display Keys” Figure 3.20 Question number, prefix, root, and suffix In the middle of the screen is the question number, the prefix, the root, and below the root, the suffix. The question number field at the top of the screen always shows the number of the next question, except in the case that an already existing question is chosen for possible modification. With a new survey, the selected item in the prefix and suffix lists is “None”. The survey author can create a new prefix for a question, as explained earlier in this section, which will be added to the list so that it may be used for other questions. The suffix list works the same way 25 (Figure 3.20). To enter text for the root of the question, the survey author needs only to click in the “Root” text area before typing the text for the root. When either of the buttons at the bottom of the screen, “Question Composition” or “Answer Composition”, is clicked on, the current information as displayed is written to the database. In the case of a new question, the key is inserted into the is inserted into the roots question_keys table (Figure 3.16 above); the root table (Figure 3.21); the language id number, question number, key id number, prefix id number, root id number, and suffix id number are all inserted into the question_prompts table (Figure 3.22); and the question number, category id number, and key id number are inserted into the questions table (Figure 3.23). Figure 3.21 a portion of the roots table (root_id is the primary key) mysql> select * from roots; +-----------+---------+-----------------------------------------------------+ | s_lang_id | root_id | root_text +-----------+---------+-----------------------------------------------------+ | 1 | 1 | name? | 1 | 2 | lot number? | 1 | 3 | community name? | 1 | 4 | work phone number? | 1 | 5 | Sales Representatives name? | 1 | 6 | your Sales Representatives professionalism? | 1 | 7 | your Sales Representatives courtesy? | 1 | 8 | your Sales Representatives knowledge? | 1 | 9 | your Sales Representatives responsiveness? Figure 3.22 a portion of the question_prompts table (both q_id and s_lang_id are primary keys) mysql> select * from question_prompts; +-----------+------+----------+-------------+-----------+-------------+ | s_lang_id | q_id | q_key_id | q_prefix_id | q_root_id | q_suffix_id | +-----------+------+----------+-------------+-----------+-------------+ | 1 | 1 | 1 | 1 | 1 | 0 | | 1 | 2 | 2 | 1 | 2 | 0 | | 1 | 3 | 3 | 1 | 3 | 0 | | 1 | 4 | 4 | 1 | 4 | 0 | | 1 | 5 | 5 | 1 | 5 | 0 | | 1 | 6 | 6 | 2 | 6 | 0 | | 1 | 7 | 7 | 2 | 7 | 0 | | 1 | 8 | 8 | 2 | 8 | 0 | | 1 | 9 | 9 | 2 | 9 | 0 | | 1 | 10 | 10 | 3 | 10 | 2 | | 1 | 11 | 11 | 4 | 11 | 0 | 26 Figure 3.23 a portion of the questions table (q_id is the primary key) mysql> select * from questions; +-----+----------+-----------+---------+------------+-----------+-----------+ |q_id |a_type_id |q_topic_id |q_key_id |q_block_ids |a_num_rows |a_num_cols | +-----+----------+-----------+---------+------------+-----------+-----------+ | 1 | 5 | 1 | 1 | | NULL | 25 | | 2 | 5 | 1 | 2 | | NULL | 10 | | 3 | 5 | 1 | 3 | | NULL | 25 | | 4 | 5 | 1 | 4 | | NULL | 15 | | 5 | 5 | 2 | 5 | | NULL | 25 | | 6 | 2 | 2 | 6 | | NULL | NULL | | 7 | 2 | 2 | 7 | | NULL | NULL | | 8 | 2 | 2 | 8 | | NULL | NULL | | 9 | 2 | 2 | 9 | | NULL | NULL | | 10 | 1 | 2 | 10 | | NULL | NULL | | . . . | | 28 | 4 | 6 | 27 | | 5 | 25 | | 29 | 4 | 7 | 28 | | 10 | 30 | +-----+----------+-----------+---------+------------+-----------+-----------+ 29 rows in set (0.00 sec) If an existing question had been modified, when either button at the bottom of the screen is clicked on, the survey author will be prompted as to whether the changes should be accepted or not; if “yes” is chosen, then the following tables are updated: if a new root had been entered, then the new root is inserted into the roots paragraph are updated in the table (Figure 3.21 above); the items mentioned above in the previous question_prompts table (Figure 3.22 above) and the questions table (Figure 3.23 above). If the survey author wishes to continue creating questions, then the “Question Composition” button is clicked; if the survey author wishes to toggle to “Answer Composition”, then that button is clicked. 3.3.2 Answer Composition The Answer Composition (AC) screen is where the survey author creates new answer options for the questions (Figure 3.24), and also indicates the type and number of answer options. 27 Figure 3.24 Answer Composition screen The flow of control within the Answer Composition (AC) part of the Question Editing (QE) module is displayed below in Figure 3.25. 28 Figure 3.25 Flow chart for AC part of the Question Editing module choose “Display Q-byKey”, or “Answer Options Display By” Y displayed lists are updated ? N N choose question from “Q By Key” list Y question number question text answer details (if any) choose “Type of Answer Options” are displayed N ? ? Y button all lists & tables are updated Y click AC Enter answer options & sequences by typing new ones or double-clicking on existing answer options in the “Answer Options” list ? Y select number of answer options N “Answer Composition” module ? choose “radio buttons”, “check boxes”, or “dropdown lists” N ? N N click QC button Y ? text area or text box is displayed Y select number of rows and/or number of columns Y Y choose “text area”, or “text box” ? ? N “Question Composition” module, page 1 N choose “splash and continue”, or “splash don’t continue” ? continue click QC button ? Y tables are updated The first item on the AC screen that the survey author may notice is the “Questions By Key” list. Each question is listed in the same “Questions By Key” list as on the QC screen. When the “Answer click AC button ? Y Composition” module tables are updated page 2 survey author is ready to create answer options for a question, he/she just needs to select the question from this list. When a question is chosen, that question is displayed at the top of the AC screen, as is its question number (Figure 3.26). There is also a list of answer options along with its corresponding drop-down list to choose how to display the answer options. Any existing answer options are 29 displayed in the list. As new answer options are created, they are added to the list. By default, all the answer options are displayed alphabetically. If the survey contains categories, then the answer options may also be displayed in alphabetical order by category (Figure 3.27). Figure 3.26 Chosen question displayed Figure 3.27 Answer Options When a question is chosen, the survey author can create or modify its answer options. If no answer options already exist for the question, the first thing the survey author will choose is the type of answer options (Figure 3.28). If “radio buttons”, “check boxes”, or “drop-down list” is chosen, then a list for the number of answer options appears. When a number is chosen, that many text fields appears to the right (Figure 3.29). The user may type in the text for new answer options in the blank fields, or choose from existing answer options by clicking on the desired answer option from that list. Each answer option also has a sequence field. By default, the sequence of the answer options is in the order that they are entered; the survey author can change the sequence at any time if their order needs to be changed. If the question chosen already has answer options, they will appear to the right 30 with their associated sequence numbers. If the survey author decides to change the number of answers, then new answer options and their sequences can be entered. Figure 3.28 Type and number of answer options Figure 3.29 Answer options and sequences As soon as the “Answer Composition” button at the bottom of the screen is clicked on, an ActionEvent fires up, and the ActionPerformed( ) method is automatically called. Then, the answer options for the question as they appear to the right will be inserted in the there (Figure 3.30), and the sequences will be inserted into the answers answer_sequence table if not already tables (Figure 3.31) in the database for that question number. The questions table (Figure 3.23 from above) may also be updated with dimensions if the text area or text box types of answer options are chosen. 31 Figure 3.30 answers table (both a_id and s_lang_id are primary key) mysql> select * from answers; +-----------+------+---------------+ | s_lang_id | a_id | a_text | +-----------+------+---------------+ | 1 | 1 | 5 (Excellent) | | 1 | 2 | 4 (Good) | | 1 | 3 | 3 (Average) | | 1 | 4 | 2 (Fair) | | 1 | 5 | 1 (Poor) | | 1 | 6 | Yes | | 1 | 7 | No | +-----------|------|---------------+ Figure 3.31 a portion of the table answer_sequence (both q_id and a_id are primary keys) mysql> select * from answer_sequence +------+------+------------+ | q_id | a_id | a_position | +------+------+------------+ | 6 | 1 | 1 | | 6 | 2 | 2 | | 6 | 3 | 3 | | 6 | 4 | 4 | | 6 | 5 | 5 | | 7 | 1 | 1 | | 7 | 2 | 2 | | 7 | 3 | 3 | | 7 | 4 | 4 | | 7 | 5 | 5 | | 8 | 1 | 1 | | 8 | 2 | 2 | | 8 | 3 | 3 | | 8 | 4 | 4 | | 8 | 5 | 5 | | 9 | 1 | 1 | | 9 | 2 | 2 | | 9 | 3 | 3 | For the type of answer options, if “text area” or “text box” is chosen, lists for the dimensions appear. Once the dimensions are chosen, the size of the text area or text box is displayed to the right, allowing the survey author to adjust the dimensions until the desired size is reached (Figures 3.32 and 3.33). 32 Figure 3.32 Text area Figure 3.33 Text box 33 The other choices for type of answer options are “Splash and continue” and “Splash don’t continue”. “Splash and continue” will pop up a window to the person taking the survey with some message before he/she continues with the survey. “Splash don’t continue” pops up a message to the person taking the survey to go back and answer the last question, forcing the user to not skip the question. All the screens of the Survey Authoring Tool have tabs along the top (Figure 3.34), allowing for the survey author to easily switch to a different module; for example, the Create Question Blocks tab switches to the Sequence Developer module. This is achieved through the use of a tabbed pane where only the currently chosen module is visible. This allows the flexibility of easily toggling back and forth between the modules as the survey author creates the survey. Above the tabs, there are menu options (also Figure 3.34). The “File” menu option (Figure 3.35), gives the survey author the same module choices to switch to, as well as printing, and quitting. Figure 3.34 Tabs along the top and menu options Figure 3.35 File menu The “Edit” menu option gives the author the choices to edit a “prefix”, “suffix”, “language” or “category” (Figure 3.36). If one of these is chosen, an ActionEvent within the BaseFrame file is 34 fired up, which automatically calls the actionPerformed( ) method. Once it is determined which menu item was chosen, another method is called that opens up a little window (JFrame) with the appropriate list of items from which to choose (Figure 3.37); once the item from the list is chosen, another method is called that opens up another little window (JFrame) which is where the editing takes place (Figure 3.38). Here, once “Continue” is clicked on, the appropriate table in the database (prefixes, suffixes, survey_language, or question_topic) is updated. If “Cancel” is clicked on, no updating takes place. Figure 3.36 “Edit” menu Figure 3.37 List of items Figure 3.38 Item to edit The third menu option is “View” (Figure 3.39), which opens up a little window that allows the survey author to lookup items. The lookup box currently is not implemented yet, but may be in the future. These three menu options may be chosen from any module. 35 Figure 3.39 Lookup box from “View” menu option 4. Results OnQ makes it easy for a survey author to create, edit, and format questions and answer options for a survey in a user-friendly Graphical User Interface (GUI). In an attempt to achieve our goals, we were able to include most of the features that some of the commercially available packages have. Our package is Java-based, and can therefore run on any browser or platform with the JVM (Java Virtual Machine). It has been implemented on both Windows PCs and on the Apple MacIntosh systems, as well as on the Sun Solaris workstation. It allows the author to define question blocks which will implement skip patterns based on the respondent’s answers to some of the questions. For the transitions between question blocks, the skip patterns are represented by arbitrarily complex Boolean expressions. OnQ allows for the insertion of audio, image, and video components for any given question. OnQ also has the ability to be created in any language and/or multiple languages; it can categorize questions into logical groups; and it has keyword association for easily identifying the questions. Currently, OnQ does not give the author the ability to delete questions or answer options, though the author can modify questions or answer options. We did not think it would be wise to allow the survey author to be able to delete a question that may already be part of a question block; and we decided that it is ok to have questions and/or answer options that are not ever used. 36 OnQ does check to see if there are any questions not included in any question blocks; and if there are any dangling question blocks, i.e. if there are any question blocks to which there are no transitions. OnQ makes it easy for the survey author to toggle between the four modules while developing a survey. It gives the survey author the ability to see a graphical view of the survey including the question blocks and transitions. It also allows the survey author to view the presentation of the survey exactly as it will appear to the respondents taking the survey, allowing the author to fine-tune the survey’s format along the way. 5. Conclusions and Future Work As to be expected, OnQ needs some fine-tuning. Overall, however, we met almost every one of our goals for OnQ. The only goal not met is that OnQ does not provide the survey author the capability of accessing existing databases available in the public domain. This could be the object of future improvements to OnQ. Another objective for future work is to make OnQ Web-based. If it is decided at some point that the survey author should have the capability of deleting questions or answer options, this could be the subject for future modifications to OnQ as well. Also, further sophisticated checks available to the survey author could be implemented in the future, including a spell-check. Another small feature that could be implemented is the search box mentioned earlier so that the author may be able to use the pop-up window to search for items, such as questions or answer options, in any module. OnQ was used early this Fall semester to create Diversity 2002. Dr. Byron Wiley, who heads Clemson’s Office of Access and Equity, is conducting this survey in an effort to promote diversity on campus. This survey is the second in a series of four that was given to the current sophomores. This same group took the Diversity 2001 [23] survey last year as freshmen. Each year, they will take a 37 new Diversity survey, and their answers to all four will be compared to see if their opinions and attitudes about diversity and race issues have changed since starting Clemson as freshmen. Other current interest in OnQ includes the following. OnQ is being used for a survey for the United Way of Greenville, which was deployed November 1, 2002 [24]. This survey is collecting the opinions and ideas of the citizens of Greenville County, SC regarding local community strengths and issues in an effort to improve the community. United Way is expecting to have a report ready in January, 2003; and an agenda for improvements is expected by May, 2003. The Marketing Department at Clemson University is working on a project where corporations will contract with them to conduct their surveys. Once the Marketing Department starts recruiting companies, they will be using OnQ for the creation and deployment of the surveys. Also, the Department of Engineering at Clemson University wishes to use OnQ for the creation of surveys that they will give to other engineering schools throughout the country in order to gather information for the comparison of other engineering programs. This project is to be funded by the National Science Foundation (NSF). There is currently a proposal for Survey 2003: The Impact of Online Environmental Information, which will be a unique collaboration between Clemson University, the National Geographic Society (NGS), the U.S. Environmental Protection Agency (EPA), and the Sierra Club to determine if short-term encounters with information on the Internet will result in changes in perceptions of specific and general environmental hazards [12]. Survey 2003 is due to be launched in October, 2003. Another proposal is to develop OnX, short for Online eXercises/eXamination. OnX is the next step beyond OnQ, and uses OnQ’s architecture and database design [25]. OnX will be an authoring tool that allows a teacher to develop Web-based learning and assessment instruments. The overall goal of OnX is to develop and test software that enables pre-K through 12th grade teachers to develop 38 tools and a strategy for coordinating and delivering a standards-based curriculum. The proposal includes using OnX to create Math8, one such learning and assessment instrument for 8th grade math to be used by participating teachers and students in Pickens County schools. Additional features that will need to be implemented include the following: giving each question a point value, as well as a correct answer; randomizing answer choices; including a table with math symbols; and statistical analysis options, such as the student’s average, and other grade/score reports. The proposed time frame for completing the entire OnX project is three years. OnQ has already proven to be a useful survey authoring tool. With the extensive research and studies conducted on the Web today, OnQ will prove to be as good or better than the currently available tools. Its Graphical User Interface (GUI) and powerful question block branching capabilities, as well as its formatting options, and other features, make it an easy to use and attractive tool for creating surveys. Also, OnQ has been a very successful step in the progression to other software tools, such as OnX, which is currently under development. 39 6. References [1] D. Kristula. The History of the Internet. (1997, 2001); http://www.davesite.com/webstation/nethistory4.shtml. [2] Internet Software Consortium. Internet Domain Survey. (July. 2002); http://www.isc.org/ds/WWW-200207/index.html. [3] NUA Internet Surveys. How Many Online?. (2002); http://www.nua.ie/surveys/how_many_online/world.html. [4] Nielsen/Net Ratings. Global Internet Index Average Usage. (June 2002); http://www.nielsennetratings.com/hot_off_the_net.jsp. [5] Leiner, B. et al. A Brief History of the Internet. (August 4, 2000); http://www.isoc.org/internet/history/brief.shtml#Introduction. [6] WebSurveyor Corporation. Web Surveyor. (2002); http://www.websurveyor.com/prof_intro.sap. [7] S-Ware. WWW Survey Assistant. (1996-1998); http://or.psychology.dal.ca/~wcs/hidden/home.html. [8] Hostedware Corporation. Hosted Survey. (2002); http://www.hostedsurvey.com/Spotlight.htm. [9] Marketing Masters. Survey Said For the Web. (2002); http://www.surveysaidfortheweb.com. [10] Sawtooth Technologies. Sawtooth. (2002); http://www.sawtooth.com. [11] Jaganathan, K. Dynamic Web based Survey: Architecture and Implementation. M.S. research paper. (Oct. 2002) Department of Computer Science, Clemson University, Clemson, SC. [12] Pargas, R., Witte, J., Jaganathan, K. Dynamic Online Surveys: Design and Implementation. (In preparation). Clemson University, Clemson, SC. [13] Pargas, R., Witte, J., Brand, L., Hochrine, C., Staton, M.. OnQ: A Dynamic Online Survey Authoring Tool. ( In preparation). Clemson University, Clemson, SC. [14] Knipfer, L. OnQ, A Tool for Creating Dynamic Surveys. M.S. research paper. (Nov. 2002) Department of Computer Science, Clemson University, Clemson, SC. [15] Staton, M. The Development of the Formatting Module for OnQ, a Survey Authoring Tool. Undergraduate honors thesis. (In preparation). Department of Computer Science, Clemson University, Clemson, SC. [16] Sun Microsystems. Java Tutorial. (1995-2002); http://java.sun.com/docs/books/tutorial/uiswing/start/swingIntro.html. 40 [17] Sun Microsystems. Java Foundation Classes (JFC). (June 26, 2002); http://java.sun.com/products/jfc/index.html. [18] MySQL AB. The MySQL AB Company. (2002); http://www.mysql.com/company/index.html. [19] JGuru. JDBC FAQ Home Page; http://www.jguru.com/faq/JDBC/. [20] M. Matthews. MM.MySQL JDBC Drivers; http://mmmysql.sourceforge.net/. [21] Apache Software Foundation. Apache HTTP Server Project. (1999-2002); http://httpd.apache.org/. [22] Apache Software Foundation. The Jakarta Project. (1999-2002); http://jakarta.apache.org/tomcat/index.html. [23] Clemson University. Diversity 2001. http://johnryan.clemson.edu/diversity2002/servlet/Page1. [24] United Way. Greenville County 2002: A Community Survey. http://johnryan.clemson.edu/UnitedWay/servlet/Page1. [25] Staton, M. Designing an Online Examination Development Tool. Undergraduate honors thesis. (In preparation). Department of Computer Science, Clemson University, Clemson, SC. 41 A. APPENDIX A.1 Eastwood Homes paper survey 42