Homework 4
CS101A1
(due Wednesday, April 30, 2003)

In this final assignment, you are all going to create web pages to help you all study for the Final Exam (which is cumulative). I have divided the class up as follows: 

Material Logins
Chapter 1 abrookes-atragos
Chapter 2 ayjeon-chubacs
Chapter 3 comroe11-dhorton
Chapter 4 doogz-fpsk
Chapter 5 franyee-jaimep
Chapter 6 jamesgs-katie524
Chapter 7 kgilbert-mhzigas
Chapter 8
michelek-mwynn
Chapter 9
nbfico-petef
Chapter 12
pvega-scg
PHP1, PHP2, PHP3, PHP4, PHP5 schea-spduffy
PHP6, PHP7,PHP8, PHP9, Forms 1 & 2 srichter-yuyu

For this assignment, you will create (1) a study outline, (2) an on-line quiz, and (3) a feedback page.  To organize the files, create a file called hw4.html with links to all of the other .html files.  Create a study outline for your assigned subject matter.  Use lists and tables as appropriate for clarity.  Make sure that hw4.html has a link to your study outline and that your study outline has a link back to hw4.html

The rest of the files you need are included in the following archive:

    http://cs-people.bu.edu/stevec/cs101/03s/hw4-files.tar.gz

You can type the url: in your browser to download, but an easier way to proceed would be to log in to csa and then issue the following command:

    wget http://cs-people.bu.edu/stevec/cs101/03s/hw4-files.tar.gz

Once you have downloaded the archive file, you need to extract the files included in it.  To do this, type the following at the UNIX command prompt;

    /usr/local/bin/tar -xzf hw4-files.tar.gz

(The tar command archives and extracts entire directories (and subdirectories) of files.  To create an archive, you would type --

    /usr/local/bin/tar -czf archive_filename.tar.gz directory_name

See man tar for more information.)

After running the tar command, you will have a new directory called hw4-files and including the following files:
  1. quiz.html -- you need to edit this file to create your own questions.
  2. grade.php -- when you press the button in quiz.html, this file processes the user's answers and reports the grade.  You need to edit this file to grade the quiz correctly.  Specifically, you need to change the lines that say, e.g.,

        if ( $answer1 == "1" )

    to correspond to the correct answers.  For example, if the correct answer to the first question were the 3rd option, then you would change it to

        if ( $answer1 == "3" )

  3. feedback.html -- you can use this without modification as your feedback page.
  4. addguest.php -- you can use this without modification; it works with feedback.html to implement your guestbook.
  5. 1st.gif, 2st.gif, 3st.gif, 4st.gif, 5st.gif -- image files for your feedback page.
  6. guestbook.html -- this is where guestbook entries are put; you should not change this file.
  7. old_guestbook.html -- this is a copy of guestbook.html; if you want to reset the guestbook, you can overwrite it with the following command:

        cp old_guestbook.html guestbook.html
Copy all of the files into your public_html directory (note that you are copying upward from the hw4-files).  Set permissions appropriately.  All of the files must be world-readable.  In addition, you must make guestbook.html world-writeable.  To do that, use chmod a+w guestbook.html  If you "reset" your guestbook by copying over it with old_guestbook.html, you may also need to reset the permissions.

You may work with other people in the class (only persons in this class section!) to compile questions. If you work with others, you should not end up using the same questions on all of your quizzes.

You are to do all web-page authoring, including editing the PHP files, by yourself, with no outside assistance (excepting your lecturer or T.F.).

Make sure you test all of the web pages: the frames should work, any included images or other items should appear properly, and the quiz and feedback form should work properly. Be sure to test it from someone else's account, so that you can be sure that it will work for the graders.