Merge pull request #14 from goehle/master

Pull request with some bug fixes for essay answers
Link codemirror2 to htdocs/codemirror2

This avoids including codemirror2 in each theme.  This change
was made previously but was overwritten in a subsequent update.
Fix bugs and improve error messages in SendMail.pm

It's a wonder that anything worked here.  It's clear that
errors in mailing would not have been reported.

The actual bug seems to be that the value $r needs to be passed
explicitly into cleanup_register().  This was not being done. It
is not clear why this used to work.

The error checking routine has been beefed up and to some extent
unit tested.  The unit tests can be repeated by uncommenting
the warn messages.
Comment out codemirror in themes math2 and math3

These two themes are not yet ready to play with codemirror.
The theme ubc does seem to play well with codemirror.
Replace publish by visible in database fields

This will cause some incompatibility for old courses.  It may require you
to reset whether a homework set is visible or not (once).  It will
also cause error messages in upgrade courses about extra fields in the database
which are not in the schema (e.g. published) -- these can be ignored.
Add a VERSION file for PG.

In order to reach it cleanly there needs to be a link PG_VERSION in webwork2/ to the file pg/VERSION.
Replace include() by require().

Include() is not defined in this context.
updates from Bill Wheeler
Allow admin course data tables and directories to be updated

This gets rid of strange errors which occur for example when  you
try to delete a user in the admin classlist directory.  The delete command
tries to delete tables and fields that don't exist
Automatically create achievements directories.

If defaults.config file does not
have listings for the achievement directores then nothing happens.
All of these upgrade checks are skipped.

Check that modelCourses has the templates/achievements
and html/achievements directories.  If not then modelCourses
needs to be updated first -- issue a message to that effect.

If the course is missing either the templates/directory or the
html/achievements directory then create it from the corresponding
directory in modelCourse.