CSC 325 Grinnell College Fall, 2008
 
Databases and Web Application Design
 

A Departmental Survey of Graduating Majors, Part 2

For practice, this lab refines and extends the initial lab for A Departmental Survey of Graduating Majors.

As noted on the course's Web page, the following references may be useful for information on cascading style sheets:

Adding Headers to Questions

The previous lab initially described the exit interview survey for 2007-2008 graduates as follows:

  1. Experiences with the CS Major:

    1. Looking back on your experiences in the major, what did you like best?
    2. What did you like least?
  2. Learnings:

    1. What did you gain from the major?
    2. What did you wish you had gained from the major?
  3. Courses:

    1. What courses in the major do you regard as essential to your education in computer science? Why?
    2. Were there any courses in the major that you took but wish you had not taken? If so, which ones and why?
    3. Were there any courses in computer science or in mathematics that you wish that you had taken but didn't? Which ones and why?
    4. Were there courses outside the major that you regard as essential to your education in computer science? If so, which ones and why?
  4. What suggestions do you have for improving or changing our program for majors?

  5. The intent of the new CS Learning Center is to support students taking CS courses. What could we do to better support them?

In the previous lab, questions were given in table surveyQuestions, and table surveyForm identified which questions were to go on which form. For this lab, the first work is to add headers for some questions. The approach is to revise the surveyForm table to get a new table surveyFormFormatted, defined as follows:


create table surveyFormFormatted
( surveyID varchar(25),
  questionID bigint(20),
  sectionNum bigint(20),
  sequenceNum bigint(20),
  primary key (surveyID, questionID)
);

The idea is that the sectionNum field indicates what header a question might be under, and the sequenceNum field indicates the ordering of questions under a header. Also, we use category "header" in the surveyQuestions table to indicate a title (with no question or text box). For now, any other category indicates that the question should be presented with a text or textarea box.

To implement this approach for the above survey, we first add header records to the surveyQuestions table:


insert into surveyQuestions
   set questionID=12, 
       questionText="Experiences with the CS Major",
       category="header";
insert into surveyQuestions
   set questionID=13, 
       questionText="Learnings",
       category="header";
insert into surveyQuestions
   set questionID=14, 
       questionText="Courses",
       category="header";

Next, we organize the questions for the 2006-2007 and the 2007-2008 surveys:


INSERT into surveyFormFormatted VALUES
   ("2007-2008", 12, 10,  0), 
   ("2007-2008",  1, 10, 10), 
   ("2007-2008",  2, 10, 20), 
   ("2007-2008", 13, 30,  0), 
   ("2007-2008",  3, 30, 10), 
   ("2007-2008",  4, 30, 20), 
   ("2007-2008", 14, 50,  0), 
   ("2007-2008",  5, 50, 10), 
   ("2007-2008",  6, 50, 20), 
   ("2007-2008",  7, 50, 30), 
   ("2007-2008",  8, 50, 40), 
   ("2007-2008",  9, 70, 10), 
   ("2007-2008", 10, 90, 10),
("2006-2007", 12, 10, 0), ("2006-2007", 1, 10, 5), ("2006-2007", 2, 10, 10), ("2006-2007", 13, 20, 0), ("2006-2007", 3, 20, 5), ("2006-2007", 4, 20, 10), ("2006-2007", 14, 30, 0), ("2006-2007", 5, 30, 5), ("2006-2007", 6, 30, 10), ("2006-2007", 7, 30, 15), ("2006-2007", 8, 30, 30), ("2006-2007", 11, 40, 5), ("2006-2007", 9, 50, 5);

As this coding indicates, section numbers and sequence numbers can be any non-negative integer — the only constraint is that the ordering of the values place the sections in an appropriate order and that the questions within a section are in the correct sequence.

Steps for this Lab

  1. Revise the survey-display script from the initial departmental-survey lab to meet these specifications:

Background Color

Sometimes a background color can be used to help contrast one section from another. The following example illustrates this idea, although it takes the point to an extreme:

  1. Experiences with the CS Major:

    1. Looking back on your experiences in the major, what did you like best?
    2. What did you like least?
  2. Learnings:

    1. What did you gain from the major?
    2. What did you wish you had gained from the major?
  3. Courses:

    1. What courses in the major do you regard as essential to your education in computer science? Why?
    2. Were there any courses in the major that you took but wish you had not taken? If so, which ones and why?
    3. Were there any courses in computer science or in mathematics that you wish that you had taken but didn't? Which ones and why?
    4. Were there courses outside the major that you regard as essential to your education in computer science? If so, which ones and why?
  4. What suggestions do you have for improving or changing our program for majors?

  5. The intent of the new CS Learning Center is to support students taking CS courses. What could we do to better support them?

The above approach incorporates style information directly in each tag. A cleaner approach defines a two classes for li tags and then specifies which class to use.

More Steps for this Lab

  1. Adjust the background color for the main questions of a survey, so two colors alternate (one color for odd-numbered questions; a second color for even-numbered questions).

  2. Many Web-based resources discuss the design and implementation of overall Web sites and individual Web pages. Two starting places are:

    For some general background on principles of Web design, read Grunwald's brief summary and read the subsection on User-centered Design in Chapter 2 of the text by Lunch and Horton.

  3. Time for Creativity: Review the overall appearance of the survey form display-survey-2.php for clarity, usability, and layout.

    Then develop a revised HTML/PHP script display-survey-3.php to make a more refined and polished on-line survey form. The new script should have the same functionality as display-survey-2.php, but you are free to change font styles, colors, backgrounds, layouts, etc. to improve the appearance and usability of the resulting page.

Work to Turn In

Added Notes:


This document is available on the World Wide Web as

     http://www.walker.cs.grinnell.edu/courses/325.fa08/lab-grad-survey-2.shtml

created 8 August 2008
last revised 23 October 2008
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.