Tailoring The Student's Working Environment: prepfile


Overview


Students who have OCE accounts will use them to do their assignments for a variety of classes. The instructor for each class may wish to broadcast messages or tailor the student's shell environment in a special way for the class. The "prep" alias in conjunction with instructor controlled prepfiles answers this need.

Steps to Take


Prep Alias

The way this works is that students in an OCE-model class login and enter a "prep" command for the class before starting to work. For example:

prep bw132f

The prep mechanism looks for a prepfile for the class. It expects to find the prepfile in a directory called "public" beneath the class umbrella directory. For example:

/home/solaris/ieng9/bw132f/public/prepfile

The commands in the prepfile are "sourced" by the student's shell. The commands in the prototype prepfile which is automatically provided to OCE courses does the following:

  1. Displays the class broadcast file if the instructor has created one.
  2. Adds the course name to the student's shell prompt.
  3. Checks to see if the student is already located in the class directory tree. If not, it offers to change to the student's directory in that tree.
  4. Performs any other steps that the instructor adds to the prepfile. This may be used to set environment variables; add directories to path; define aliases, etc.

Broadcasting messages from a broadcast file

Messages may be presented to students as part of the prepfile. This can be accomplished simply by creating a file called broadcast in the public directory under the umbrella directory for the class. This file only needs to contain the exact text that the students should see when they "prep".

In the following example we will assume that the umbrella directory for the class is /home/solaris/ieng9/cs132f. You would create the file /home/solaris/ieng9/cs132f/public/broadcast. Then, put the text of the message in the broadcast file. Make sure the broadcast file is "world" readable:

chmod a+r broadcast

If you still have questions or need additional assistance, please contact the ITS Service Desk. You can call us at (858) 246-4357, email us at support@ucsd.edu, or submit a ticket at support.ucsd.edu.