--- trunk/webwork2/conf/global.conf.dist 2004/07/10 16:05:51 2477
+++ trunk/webwork2/conf/global.conf.dist 2004/08/27 21:13:22 2690
@@ -2,7 +2,7 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
-# $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.86 2004/07/08 15:23:28 gage Exp $
+# $CVSHeader: webwork2/conf/global.conf.dist,v 1.97 2004/08/23 19:14:42 jj Exp $
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
@@ -19,58 +19,94 @@
# requests. Values may be overwritten by the course.conf for a specific course.
# All package variables set in this file are added to the course environment.
# If you wish to set a variable here but omit it from the course environment,
-# use the "my" keyword. The following variables are available to this file:
-#
-# $webworkRoot directory that contains the WeBWorK distribution
-# corresponds to the directory !WEBWORK_ROOT! in the stanza below
-# $webworkURLRoot base URL handled by Apache::WeBWorK
-# corresponds to url /webwork2 in the stanza below
-# $pgRoot directory that contains the PG distribution
-# corresponds to the directory !PG_ROOT! below
-# $courseName name of the course being used (e.g. mth101)
-#
-# Stanza placed in the httpd.conf directory
-#
-# SetHandler perl-script
-# PerlHandler Apache::WeBWorK
-#
-# PerlSetVar webwork_root !WEBWORK_ROOT!
-# PerlSetVar pg_root !PG_ROOT!
-#
-# use lib '!WEBWORK_ROOT!/lib';
-# use lib '!PG_ROOT!/lib';
-#
-#
+# use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache
+# configuration file (webwork.apache-config) and is available for use here. In
+# addition, the $courseName variable holds the name of the current course.
################################################################################
-# The following two variables must match the first and second entries of the
-# AliasMatch statement placed in the httpd.conf file
+# Seed variables
################################################################################
+# Set these variables to correspond to your configuration and preferences. You
+# will need to restart the webserver to reset the variables in this section
+
+# URL of WeBWorK handler.
+$webwork_url = "/webwork2";
-# The AliasMatch directive directs to files stored in the html directory of each course.
-# AliasMatch ^/webwork2_course_files/([^/]*)/(.*) !COURSES_ROOT!/$1/html/$2
-# URL ---------> html directory of the course
-#
-# $1 matches the courseName $2 matches any subdirectories of the course html directory
-# !COURSES_ROOT! matches $courseDirsRoot
+# Root directory of PG.
+$pg_dir = "/opt/pg";
-my $courseURLRoot = "/webwork2_course_files/$courseName";
+# URL and path to htdocs directory.
+$webwork_htdocs_url = "/webwork2_files";
+$webwork_htdocs_dir = "$webwork_dir/htdocs";
-my $courseDirsRoot = "$webworkRoot/courses/";
+# URL and path to courses directory.
+$webwork_courses_url = "/webwork2_course_files";
+$webwork_courses_dir = "$webwork_dir/courses";
+################################################################################
+# Paths to external programs
+################################################################################
+
+$externalPrograms{mkdir} = "/bin/mkdir";
+$externalPrograms{mysql} = "/usr/local/bin/mysql";
+
+$externalPrograms{latex} = "/usr/local/bin/latex";
+$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex";
+$externalPrograms{dvipng} = "/usr/local/bin/dvipng";
+$externalPrograms{tth} = "/usr/local/bin/tth";
-# This alias directive redirects /webwork2_files to the toplevel material in the global webwork2/htdocs directory
-# Alias /webwork2_files/ !WEBWORK_ROOT!/htdocs/
+################################################################################
+# Mail settings
+################################################################################
+
+# Mail sent by the PG system and the mail merge and feedback modules will be
+# sent via this SMTP server.
+$mail{smtpServer} = 'mail.yourschool.edu';
+
+# When connecting to the above server, WeBWorK will send this address in the
+# MAIL FROM command. This has nothing to do with the "From" address on the mail
+# message. It can really be anything, but some mail servers require it contain
+# a valid mail domain, or at least be well-formed.
+$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
+
+# AllowedRecipients defines addresses that the PG system is allowed to send mail
+# to. this prevents subtle PG exploits. This should be set in course.conf to the
+# addresses of professors of each course. Sending mail from the PG system (i.e.
+# questionaires, essay questions) will fail if this is not set somewhere (either
+# here or in course.conf).
+$mail{allowedRecipients} = [
+ #'prof1@yourserver.yourdomain.edu',
+ #'prof2@yourserver.yourdomain.edu',
+];
+
+# If defined, feedbackRecipients overrides the list of recipients for feedback
+# email. It's appropriate to set this in the course.conf for specific courses,
+# but probably not in global.conf. if not defined, mail is sent to all
+# professors and TAs for a given course
+#$mail{feedbackRecipients} = [
+# 'prof1@yourserver.yourdomain.edu',
+# 'prof2@yourserver.yourdomain.edu',
+#];
+
+# feedbackVerbosity:
+# 0: send only the feedback comment and context link
+# 1: as in 0, plus user, set, problem, and PG data
+# 2: as in 1, plus the problem environment (debugging data)
+$mail{feedbackVerbosity} = 1;
+
+# Defines the size of the Mail Merge editor window
+# FIXME: should this be here? it's UI, not mail
+# FIXME: replace this with the auto-size method that TWiki uses
+$mail{editor_window_rows} = 15;
+$mail{editor_window_columns} = 100;
-my $webworkLocalDocsURL = "/webwork2_files";
-my $webworkLocalDocsDir = "$webworkRoot/htdocs";
################################################################################
# System-wide locations (directories and URLs)
################################################################################
# The root directory, set by webwork_root variable in Apache configuration.
-$webworkDirs{root} = "$webworkRoot";
+$webworkDirs{root} = "$webwork_dir";
# Location of system-wide data files.
$webworkDirs{DATA} = "$webworkDirs{root}/DATA";
@@ -85,32 +121,23 @@
$webworkDirs{conf} = "$webworkDirs{root}/conf";
# Location of course directories.
-$webworkDirs{courses} = "$courseDirsRoot";
-
-# Contains the WeBWorK libraries. (FIXME: not used)
-#$webworkDirs{lib} = "$webworkDirs{root}/lib";
+$webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
# Contains log files.
$webworkDirs{logs} = "$webworkDirs{root}/logs";
-# Location of PG macros. (FIXME: not used)
-#$webworkDirs{macros} = "$pgRoot/macros";
-
# Contains non-web-accessible temporary files, such as TeX working directories.
$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
##### The following locations are web-accessible.
# The root URL (usually /webwork2), set by in Apache configuration.
-$webworkURLs{root} = "$webworkURLRoot";
+$webworkURLs{root} = "$webwork_url";
# Location of system-wide web-accessible files, such as equation images, and
# help files.
-$webworkDirs{htdocs} = "$webworkLocalDocsDir";
-$webworkURLs{htdocs} = "$webworkLocalDocsURL";
-
-# The URL of the static WeBWorK home page (FIXME: not used)
-#$webworkURLs{home} = "$webworkURLs{htdocs}/index.html";
+$webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
+$webworkURLs{htdocs} = "$webwork_htdocs_url";
# Location of web-accessible temporary files, such as equation images.
$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
@@ -157,8 +184,7 @@
# Location of course HTML files, passed to PG.
$courseDirs{html} = "$courseDirs{root}/html";
-$courseURLs{html} = "/webwork2_course_files/$courseName";
-#$courseURLs{root} = $courseURLs{html}; # FIXME: not used
+$courseURLs{html} = "$webwork_courses_url/$courseName";
# Location of course image files, passed to PG.
$courseDirs{html_images} = "$courseDirs{html}/images";
@@ -233,9 +259,6 @@
# The course configuration file.
$courseFiles{environment} = "$courseDirs{root}/course.conf";
-# The message of the day, displayed after login. (FIXME: not used)
-#$courseFiles{motd} = "$courseDirs{templates}/motd.txt";
-
# File contents are displayed after login, on the problem sets page. Path given
# here is relative to the templates directory.
$courseFiles{course_info} = "course_info.txt";
@@ -260,6 +283,41 @@
$courseFiles{problibs} = {};
################################################################################
+# Database options
+################################################################################
+
+# Several database are defined in the file conf/database.conf and stored in the
+# hash %dbLayouts.
+include "conf/database.conf";
+
+# Select the default database layout. This can be overridden in the course.conf
+# file of a particular course. If you choose "gdbm", WeBWorK will be able to
+# use courses from WeBWorK 1 without first adding course.conf files to them.
+# However, the recommended database layout for new courses is "sql_single". This
+# can be set when creating a course.
+$dbLayoutName = "sql_single"; # or "gdbm" or "sql"
+
+# This sets the symbol "dbLayout" as an alias for the selected database layout.
+*dbLayout = $dbLayouts{$dbLayoutName};
+
+################################################################################
+# Problem library options
+################################################################################
+
+# The directory containing the problem library files. Set to "" if no problem
+# library is installed.
+$problemLibrary{root} = "";
+
+# The name of the SQL database containing problem metadata
+$problemLibrary{sourceSQL} = "ProblemLibrary";
+
+# The user name to use when connecting to the problem library database
+$problemLibrary{userSQL} = "webworkRead";
+
+# The password to use when connecting to the problem library database
+$problemLibrary{passwordSQL} = "";
+
+################################################################################
# Logs
################################################################################
@@ -276,69 +334,13 @@
# is useful if the database becomes corrupted.
$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
-# The past answer list stores a history of all users' submitted answers. (FIXME: not used)
-$webworkFiles{logs}{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
-
# The answer log stores a history of all users' submitted answers.
$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
################################################################################
-# Mail settings
+# More paths to external programs
################################################################################
-# Mail sent by the PG system and the mail merge and feedback modules will be
-# sent via this SMTP server.
-$mail{smtpServer} = 'mail.yourschool.edu';
-
-# When connecting to the above server, WeBWorK will send this address in the
-# MAIL FROM command. This has nothing to do with the "From" address on the mail
-# message. It can really be anything, but some mail servers require it contain
-# a valid mail domain, or at least be well-formed.
-$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
-
-# AllowedRecipients defines addresses that the PG system is allowed to send mail
-# to. this prevents subtle PG exploits. This should be set in course.conf to the
-# addresses of professors of each course. Sending mail from the PG system (i.e.
-# questionaires, essay questions) will fail if this is not set somewhere (either
-# here or in course.conf).
-$mail{allowedRecipients} = [
- #'prof1@yourserver.yourdomain.edu',
- #'prof2@yourserver.yourdomain.edu',
-];
-
-# If defined, feedbackRecipients overrides the list of recipients for feedback
-# email. It's appropriate to set this in the course.conf for specific courses,
-# but probably not in global.conf. if not defined, mail is sent to all
-# professors and TAs for a given course
-$mail{feedbackRecipients} = [
- #'prof1@yourserver.yourdomain.edu',
- #'prof2@yourserver.yourdomain.edu',
-];
-
-# feedbackVerbosity:
-# 0: send only the feedback comment and context link
-# 1: as in 0, plus user, set, problem, and PG data
-# 2: as in 1, plus the problem environment (debugging data)
-$mail{feedbackVerbosity} = 1;
-
-# Defines the size of the Mail Merge editor window
-# FIXME: should this be here? it's UI, not mail
-# FIXME: replace this with the auto-size method that TWiki uses
-$mail{editor_window_rows} = 15;
-$mail{editor_window_columns} = 100;
-
-################################################################################
-# Paths to external programs
-################################################################################
-
-$externalPrograms{mkdir} = "/bin/mkdir";
-$externalPrograms{mysql} = "/usr/local/bin/mysql";
-
-$externalPrograms{latex} = "/usr/local/bin/latex";
-$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex";
-$externalPrograms{dvipng} = "/usr/local/bin/dvipng";
-$externalPrograms{tth} = "/usr/local/bin/tth";
-
# These image conversion utilities are included in the WeBWorK distribution.
$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps";
$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps";
@@ -370,41 +372,6 @@
);
################################################################################
-# Database options
-################################################################################
-
-# Several database are defined in the file conf/database.conf and stored in the
-# hash %dbLayouts.
-include "conf/database.conf";
-
-# Select the default database layout. This can be overridden in the course.conf
-# file of a particular course. If you choose "gdbm", WeBWorK will be able to
-# use courses from WeBWorK 1 without first adding course.conf files to them.
-# However, the recommended database layout for new courses is "sql". This can
-# be set when creating a course.
-$dbLayoutName = "sql"; # or: "gdbm"
-
-# This sets the symbol "dbLayout" as an alias for the selected database layout.
-*dbLayout = $dbLayouts{$dbLayoutName};
-
-################################################################################
-# Problem library options
-################################################################################
-
-# The directory containing the problem library files. Set to "" if no problem
-# library is installed.
-$problemLibrary{root} = "";
-
-# The name of the SQL database containing problem metadata
-$problemLibrary{sourceSQL} = "ProblemLibrary";
-
-# The user name to use when connecting to the problem library database
-$problemLibrary{userSQL} = "webworkRead";
-
-# The password to use when connecting to the problem library database
-$problemLibrary{passwordSQL} = "";
-
-################################################################################
# Authorization system
################################################################################
@@ -416,27 +383,55 @@
my $student = 0;
my $ta = 5;
my $professor = 10;
+my $nobody = undef;
%permissionLevels = (
report_bugs => $student,
+
view_multiple_sets => $ta,
view_unopened_sets => $ta,
view_unpublished_sets => $ta,
view_answers => $ta,
+
become_student => $professor,
access_instructor_tools => $ta,
+ score_sets => $professor,
+ send_mail => $professor,
+
create_and_delete_problem_sets => $professor,
- modify_problem_sets => $professor,
assign_problem_sets => $professor,
+ modify_problem_sets => $professor,
modify_student_data => $professor,
- score_sets => $professor,
- send_mail => $professor,
+
modify_classlist_files => $professor,
modify_set_def_files => $professor,
modify_scoring_files => $professor,
modify_problem_template_files => $professor,
+
create_and_delete_courses => $professor,
fix_course_databases => $professor,
+
+ ##### Behavior of the interactive problem processor #####
+
+ show_correct_answers_before_answer_date => $ta,
+ show_solutions_before_answer_date => $ta,
+ avoid_recording_answers => $ta,
+
+ check_answers_before_open_date => $ta,
+ check_answers_after_open_date_with_attempts => $ta,
+ check_answers_after_open_date_without_attempts => $student,
+ check_answers_after_due_date => $student,
+ check_answers_after_answer_date => $student,
+
+ record_answers_when_acting_as_student => $nobody,
+
+ # "record_answers_when_acting_as_student" takes precedence
+ # over the following for professors acting as students:
+ record_answers_before_open_date => $nobody,
+ record_answers_after_open_date_with_attempts => $student,
+ record_answers_after_open_date_without_attempts => $nobody,
+ record_answers_after_due_date => $nobody,
+ record_answers_after_answer_date => $nobody,
);
################################################################################
@@ -545,7 +540,7 @@
##### Directories used by PG
# The root of the PG directory tree (from pg_root in Apache config).
-$pg{directories}{root} = "$pgRoot";
+$pg{directories}{root} = "$pg_dir";
$pg{directories}{lib} = "$pg{directories}{root}/lib";
$pg{directories}{macros} = "$pg{directories}{root}/macros";
@@ -595,6 +590,7 @@
[qw(Select)],
[qw(Units)],
[qw(VectorField)],
+ [qw(Parser Value)],
];
##### Answer evaluatior defaults
@@ -617,3 +613,12 @@
useBaseTenLog => 0,
defaultDisplayMatrixStyle => "[s]",
};
+
+################################################################################
+# Compatibility
+################################################################################
+
+# Define the old names for the various "root" variables.
+$webworkRoot = $webworkDirs{root};
+$webworkURLRoot = $webworkURLs{root};
+$pgRoot = $pg{directories}{root};