CPSCI 105: Explorations in Computer Science

Lab 18

May 1, 2007

Today you're going to work together in your audit groups. So before you get comfortable in your usual seat, make sure that you've followed the seating instructions on the board.

Note: There was entirely too much merriment during Thursday's lab. So no joking around in your groups today. Your instructor finds it extremely annoying and will penalize you accordingly.


Preliminary

Log in on warp and stay in your home directory. Open emacs and add the following at the end of your .bashrc file:

# 
# Added 5-1-2007
#
# find out whether we want to change the umask for this shell
echo -n "Are you planning to work as part of a web audit group? ";
read -n 1 ANSWER;
echo ;
case $ANSWER in
    Y | y)  umask 002;
	echo "Files will be created u=rw(x),g=rw(x),o=r";
	echo "Use newgrp to change your primary group.";;
    ?) echo "No change to umask or primary group.";;
esac;
#
# End of 5-1-2007 additions
#

After you've made the above change and saved your .bashrc file, you need to get bash to take note of the change. Do this by issuing the command
    source .bashrc
from the command line. Answer y when you're asked if you plan to work as part of a web audit group.


Collaborating using Unix Groups

This is a list of the topics we'll discuss today.

Groups

Groups and Files

Groups and Directories


Lab Exercises

Individual Work

  1. Go to your home directory (cd with no argument) and set your primary group to the default (newgrp with no argument).
  2. Copy the file /home/public/web-authoring/name.html to your home directory, naming the copy lastname.html (using your real last name, of course):     cp  /home/public/web-authoring/name.html  lastname.html
  3. Open the file in emacs and change all occurrences of the string Your Name to your actual name.
  4. Copy this file to your group's audit website directory. If your group is olive, this directory is
        /projects/audit-groups/2007/olive/public_html
    so you would issue the command
        cp  filename  /projects/audit-groups/2007/olive/public_html/.
    (replacing olive with your group's name; also note that that's not a period, above—it's a dot).
  5. Make your public_html/img directory the working directory. Then check the list of accessibility audit groups to see whether your name is first, second, or third in your group. (The groups were generated uniformly randomly using a computer program, so there's no meaning attached to the order.) You will now copy some files to the directory
        /projects/audit-groups/2007/olive/public_html/img
    (again, replacing olive with your group's name).
  6. Make your group's audit website directory the working directory. Change the group association of the file whose name is your last name so that it's associated with your audit group. Check the permissions on the file and make sure that your group can read and write the file, and that the file is readable by others.
  7. Change to the img subdirectory and check to make sure that the files you copied are readable by others. Then change back to your audit group's public_html directory.
  8. At this point, there should be three lastname.html files, one for each person in your group. Use emacs to edit the other two files to each include a new paragraph stating Your Name was here! (replacing Your Name with your actual name, of course).

Group Work

Divide up the following three tasks among yourselves. You can split them up and work individually, or you can do them together—it's up to you.

  1. Edit the current index.html file as follows:
  2. In the style subdirectory, create a file named temporary.css. It should have a CSS timestamp in it (use the command C-c t to insert an automatically updating timestamp), and should define styles for the following HTML elements:
  3. Connect to your group's audit website using the appropriate link on the list of Accessibility Audit Websites. (Your username is audit; I'll tell you your password in class.) Test all links; make sure the effect of the stylesheet is visible on each page. Look at each page in Firefox using the View > Page Style > No Style option, and the three images at the bottom of each page should appear. Make sure that your XHTML and CSS are valid.

Don't leave the classroom until either Nadine or I have looked at your audit website to make sure you've done everything correctly.


[ Return to the CPSCI 105-01 homepage ]

Brian J. Rosmaita <contact me>
This page was last modified Tuesday, 1 May 2007 at 04:41 UTC.
Valid XHTML 1.0 ! Valid Cascading Style Sheets! This page is in AAA Conformance with the Web Content Accessibility Guidelines