This documents describes how to set up the ClassQue Master Server.
Terminology
You should have already set up a ClassQue Server for each course.
The ClassQue Server runs during the class period and handles communication
between students and teachers.
The Classque Master Server is meant to run all of the time and gives users
access to the log files created for all of the ClassQue courses.
It must be run on the same host as the ClassQue Server.
You will need a copy of the
classquemasterserver.jar file.
This documentation assumes that you have already set up the ClassQue
server as described in
ClassQue Server Configuration.
The Classque Master Server is optional. It is requried for creating
and sending reports and for resuming a class using the ClassQue
simulator.
General Configuration Information
The Classque Master Server is a network server that listens on a
particular port. You should choose a port number that is unused
on the host machine. This port number should be different from
any of the port numbers used to set up the ClassQue Server.
The Classque Master Server contains information about each course that
has been set up on a given host. Access to the Classque Master Server
requires a password. To access a course throught the Classque Master
Server, a use must provide eithe the teacher password for that course
or the
master server password which grants access to all courses.
The configuration information is supplied to the
classquemasterserver
program in a configuration file.
The program takes one command-line paramter, the name of the configuration
file. If the command line paraemter is
‑version, the program
will just display version information and exit.
The configuration file contains one option per line, each
with a token indicating the option and a possible parameter.
The following table lists the the available options.
The first three configuration entries should specify the port number,
the master server password, and the
name of the mail host so thatthe master server can send mail.
This will be followed by any number
of course configurations, each of which starts with a
course
key word. Additional entries for a course will specify the
course name (used when reports are generated), the base directory
of that course cofiguration (as used by the Classque Server),
the name of the course configuration file used by the
Classque Server, and the directories containg the logs created
by the Classque Server.
Option | File Token | Parameter | Description |
Port | port | integer |
An integer giving the port number that programs will use to communicate with the
ClassQue Master Server.
|
Password | password | string |
The password that will grant full access to all courses.
|
Mail Host | mailhost | string |
The name of the mail host for forwarding email.
|
Standard Configuration | standard | none |
If this is set, any course without a directory set uses the standard
configuration. In the standard configuration, the base directory is
../courses/coursename, the configuration file is
cqmasterserverconfig.txt and the log directories are logs and
logs/processed.
|
|
|
Course | course | string |
This starts the description of a particular course.
The parameter is the name of the course as displayed in reports.
Configuration entries after this one refer to this course until
another Course configuration entry is processed.
|
Base Directory | directory | string |
The base directory for this course used by the Classque Server.
|
Configuration File | config | string |
The name of the configuration file for this course used by
the ClassQue Server.
|
Log Directory | logdir |
string |
The name of a directory containing log files for this course.
There may be several of these entries for each course.
|
Starting the Classque Master Server
The server is meant to run all of the time.
It reads information about each course when it starts up.
Since this information changes daily, it is recommended that
the server be restarted each night.
Below is a script that can be used to start the master server
on a Linux system. If first kills the running server if it exists.
The script assumes that the script is in a file in the
/home/classque/master-server directory which contains
the
classquemasterserver.jar file and the configuration
file
cqmsconfig.txt.
#!/bin/sh
cd /home/classque/master-server
DATE=`/bin/date +"%Y_%m_%d_%H_%M_%S"`
FN=logs/mylog_$DATE
info=`ps -ef | grep java | grep classquemasterserver.jar`
id=`echo $info | awk '{print $2 }'`
if test "$id"
then
echo "Killing process $id" >> $FN 2>&1
kill $id
sleep 5
fi
umask 077
java -jar classquemasterserver.jar cqmsconfig.txt >> $FN 2>&1 &
You can run this script from a cron each night, say at 2 AM.
Below is a sample
cqmsconfig.txt file corresponding to the
examples given in
ClassQue Server Configuration.
port 12991
password abc123xyz
mailhost mailhost.cs.utsa.edu
course CS 3733 Operating Systems
directory ../cs3733-spring2011
config run/cqserverconfig.txt
logdir logs
logdir logs/processed
course CS 1713
directory ../cs1713-spring2011
config run/cqserverconfig.txt
logdir logs
logdir logs/processed
Sending email
The settings above assume that you have access to a mail host
that can send mail without requiring authenticaion. Ask your
system administrator for the name of your mail host and whether
it requires authentication (an account and password) to send email.
If your system does not have its own mail host or if it requires
authentication, the master server can send email through the gmail
mail host. To do this, you need to configure the master server
with a gmail account name and password. It is recommended that
you create a gmail account specifically for this purpose, as the
password for this account will be stored in the master server
configuration file.
To send email through a gmail account include two extra lines
in the master server configuration file after the port and
password lines. For example if the account name is
mygmail@gmail.com with password
abc123,
add the following two lines:
gmailusername mygmail@gmail.com
gmailpassword abc123
When you send mail using the Report Generator or the Report Creator
you choose the sender of the email. This is what the recipient sees
in the
From field of the email. When you send mail through
gmail, it replaces that
From address with the address of
the sending account unless that sending account has been set up to
allow this as an alternate
From address. You can do this as follows:
- Sign into the gmail account that you set up for sending ClassQue reports.
- Click on the gear in the upper left corner and select Mail settings.
- Choose the Accounts and Import tab.
- Go to the Send mail as section and click
Send mail from another address.
- Follow the instructions given.
- The new email address does not need to be the default.
Return to the ClassQue setup page