Sending Welcome Messages to Students

Steven Zeil

ODU Dept. of Computer Science

August 3, 2010


Table of Contents

1. Making Initial Contact
2. Setup
3. The Script
4. Scheduling the Script to Run Daily

1. Making Initial Contact

A perpetual problem in web courses is that of making initial contact with students to let them know that, first, they are regstered for a webcourse, and second, where they can find the course website.

My own solution to this is to use a script that run daily, checking the enrollment files for students who have registered since the last time the script was run, and sending those students an email message welcoming them to the course and probiding the critical startup information.

This solution isn't perfect. I get a fair number of the email messages bounced back to me because the students in question have not yet activated their ODU email accounts. But it works for the majority.

2. Setup

First create a text file with your email message. It should start with lines for the various email header fields (omitting the "To:" field, which will vary from student to student). Here is an example:

From: Steven J Zeil <cs252@cs.odu.edu>
bcc: cs252@cs.odu.edu
Subject: Welcome to CS 252

This message is being sent to you because you are have enrolled
in CS 252, Introduction to Unix for Programmers. First, let me welcome
you to the course.

CS 252 is likely to be very different from any course you have taken
before.  I hope it comes as no surprise to you to learn that CS 252 is
a web-based course. (It really _did_ say that in the online catalog
description, but it's easy to miss.)

You'll find the CS 252 course itself, including the syllabus that
provides details on the course policies, at http://www.cs.odu.edu/~cs252 .

Again, welcome to the course. I hope you find it a valuable and
interesting experience.


Steven J Zeil

You can put this file just about anywhere in your Unix file space. You may also want to create an empty file that will accumulate a log of messages sent, say, messagesSent.log in the same directory.

3. The Script

The script is run as follows:

/home/zeil/bin/welcomeMail.pl messageFile logFile crn1 crn2 ... < enrollmentFile

where

  • messageFile is the path to the file containing your prepared email message

  • logFile is the path to the log file of messages sent

  • crn1, crn2, etc., are the call numbers of your course sections to which the email should be directed, and

  • enrollmentFile is one of the daily updated enrollment files gneerated by our systems staff

For example, for CS252 in Summer 2010, I used

/home/zeil/bin/welcomeMail.pl /home/cs252/Build/welcomeMessage_summer.txt /home/cs252/Build/welcomeMessagesSent.log 32979 32
980 32981 < /home/enroll/enroll200930.new 

The first time that this script is run, it sends an email to every student registered for one of the indicated sections. It records the student email address (and date) for each message sent into the log. Each subsequent time that the script is run, it sends email to those students appearing in the enrollment file who are not already in the log.

4. Scheduling the Script to Run Daily

This is one of several course-related tasks that I like to run on a daily basis. I tend to collect the commands for all such tasks into a single shell script, ~/bin/dailyTasks.

#!/bin/sh
export PATH
PATH=/home/zeil/bin:/research/languages/perl/perl-5.8.8/bin:/bin:/usr/ccs/bin:/usr/ucb:/usr/dt/bin:/usr/X11/bin:/usr/X/bin:/usr/openwi
n/bin
export LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/lib:/research/languages/perl/perl-5.8.8/lib:/usr/sfw/lib:/usr/lib:/lib:/usr/ccs/lib:/usr/ucblib:/usr/dt/lib:/us
r/X11/lib:/usr/X/lib:/usr/openwin/lib
#
/home/zeil/bin/welcomeMail.pl /home/cs252/Build/welcomeMessage_summer.txt /home/cs252/Build/welcomeMessagesSent.log 32979 32
980 32981 < cat /home/enroll/enroll200930.new
/home/zeil/bin/welcomeMail.pl /home/zeil/courses/cs361/webcourse/welcomeMessage.txt /home/zeil/courses/cs361/webcourse/welcomeMessagesSent.log 32986 32989 32990 < cat /home/enroll/enroll200930.new 
#
/home/zeil/secure_html/401ErrorHandling/generateCRNgoups.pl /home/zeil/secure_html/cs361

Create something like this of your own. Use chmod to be sure that it can be executed.

To schedule this to be run every day at time hh:mm, use the cron command. Create a file crontab.txt containing a single line:

mm hh * * * /home/yourname/bin/dailyTasks

Then give the command

crontab crontab.txt

For more information, see the usual Unix help on crontab.