| CSC 325 | Grinnell College | Fall, 2008 |
| Databases and Web Application Design | ||
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:
The previous lab initially described the exit interview survey for 2007-2008 graduates as follows:
Experiences with the CS Major:
Learnings:
Courses:
What suggestions do you have for improving or changing our program for majors?
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.
Revise the survey-display script from the initial departmental-survey lab to meet these specifications:
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:
Experiences with the CS Major:
Learnings:
Courses:
What suggestions do you have for improving or changing our program for majors?
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.
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).
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.
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.
Added Notes:
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/325.fa08/lab-grad-survey-2.shtml
|
created 8 August 2008 last revised 23 October 2008 |
|
| For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. |