--- trunk/webwork-modperl/conf/global.conf.dist 2003/01/09 19:03:54 699 +++ trunk/webwork-modperl/conf/global.conf.dist 2004/05/24 02:01:25 2200 @@ -1,7 +1,18 @@ #!perl ################################################################################ -# WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester -# $Id: global.conf.dist,v 1.7 2003-01-09 19:03:53 sh002i Exp $ +# WeBWorK Online Homework Delivery System +# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ +# $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.68 2004/05/24 01:03:04 sh002i 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 +# Free Software Foundation; either version 2, or (at your option) any later +# version, or (b) the "Artistic License" which comes with this package. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the +# Artistic License for more details. ################################################################################ # This file is used to set up the default WeBWorK course environment for all @@ -12,6 +23,7 @@ # # $webworkRoot directory that contains the WeBWorK distribution # $webworkURL base URL handled by Apache::WeBWorK +# $pgRoot directory that contains the PG distribution # $courseName name of the course being used ################################################################################ @@ -19,40 +31,53 @@ ################################################################################ %webworkDirs = ( - root => "$webworkRoot", - bin => "$webworkRoot/bin", - conf => "$webworkRoot/conf", - courses => "$webworkRoot/courses", - lib => "$webworkRoot/lib", - logs => "$webworkRoot/logs", - macros => "$webworkRoot/macros", - tmp => "$webworkRoot/tmp", + root => "$webworkRoot", + DATA => "$webworkRoot/DATA", + uploadCache => "$webworkRoot/DATA/uploads", + bin => "$webworkRoot/bin", + conf => "$webworkRoot/conf", + courses => "$webworkRoot/courses", + htdocs => "$webworkRoot/htdocs", + htdocs_temp => "$webworkRoot/htdocs/tmp", + equationCache => "$webworkRoot/htdocs/tmp/equations", + lib => "$webworkRoot/lib", + logs => "$webworkRoot/logs", + macros => "$pgRoot/macros", + tmp => "$webworkRoot/tmp", + libraryRoot => "", # set to the top of the problem library, if its installed ); %webworkFiles = ( - environment => "$webworkDirs{conf}/global.conf", - hardcopySnippets => { - preamble => "$webworkDirs{conf}/hardcopyPreamble.tex", - setHeader => "$webworkDirs{conf}/hardcopySetHeader.pg", - problemDivider => "$webworkDirs{conf}/hardcopyProblemDivider.tex", - setFooter => "$webworkDirs{conf}/hardcopySetFooter.pg", - setDivider => "$webworkDirs{conf}/hardcopySetDivider.tex", - postamble => "$webworkDirs{conf}/hardcopyPostamble.tex", + environment => "$webworkDirs{conf}/global.conf", + hardcopySnippets => { + preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", + setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # hardcopySetHeader.pg", + problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", + setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", + setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", + userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex", + postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", }, screenSnippets => { - setHeader => "$webworkDirs{conf}/screenSetHeader.pg", + setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # screenSetHeader.pg", }, logs => { - timing => "$webworkDirs{logs}/timing.log", - transaction => "$courseDirs{logs}/transaction.log", + timing => "$webworkDirs{logs}/timing.log", }, + equationCacheDB => "$webworkDirs{DATA}/equationcache", ); %webworkURLs = ( - root => "$webworkURLRoot", - htdocs => "/webwork_files", - docs => "http://webhost.math.rochester.edu/webworkdocs/docs", - oldProf => "/webwork-old/profLogin.pl", + root => "$webworkURLRoot", + home => "/webwork2_files/index.html", + htdocs => "/webwork2_files", + htdocs_temp => "/webwork2_files/tmp", + equationCache => "/webwork2_files/tmp/equations", + docs => "http://webhost.math.rochester.edu/webworkdocs/docs", + local_help => "/webwork2_files/helpFiles", + oldProf => "/webwork1/profLogin.pl", + jsMath => "/webwork2_files/jsMath/jsMath.js", + asciimath => "/webwork2_files/ASCIIMathML/ASCIIMathML.js", ); ################################################################################ @@ -71,13 +96,24 @@ scoring => "$courseRoot/scoring", templates => "$courseRoot/templates", macros => "$courseRoot/templates/macros", + email => "$courseRoot/templates/email", ); %courseFiles = ( environment => "$courseDirs{root}/course.conf", + motd => "$courseDirs{templates}/motd.txt", + logs => { + answer_log => "$courseDirs{logs}/answer_log", + }, + course_info => "course_info.txt", # path relative to templates directory + login_info => "login_info.txt", # path relative to templates directory ); -my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; +# quick hack to fix transaction logging. blah. +$webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; +$webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; + +my $courseURLRoot = "/webwork2_course_files/$courseName"; %courseURLs = ( root => "$courseURLRoot", html => "$courseURLRoot", @@ -91,16 +127,62 @@ %mail = ( smtpServer => "mail.math.rochester.edu", smtpSender => "webwork\@math.rochester.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). + #allowedRecipients => [ + # 'prof1@host.yourdomain.edu', + # 'prof2@host.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 + #feedbackRecipients => [ + # 'prof1@host.yourdomain.edu', + # 'prof2@host.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) + 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 + editor_window_rows => 15, + editor_window_columns => 100, ); %externalPrograms = ( + mkdir => "/bin/mkdir", tth => "/usr/local/bin/tth", pdflatex => "/usr/local/bin/pdflatex", latex => "/usr/local/bin/latex", - dvipng => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", + dvipng => "/usr/local/bin/dvipng", gif2eps => "$webworkDirs{bin}/gif2eps", png2eps => "$webworkDirs{bin}/png2eps", gif2png => "$webworkDirs{bin}/gif2png", + mysql => "/usr/local/bin/mysql", +); + +%siteDefaults = ( + status => { + audit => "Audit", + A => "Audit", + drop => "Drop", + D => "Drop", + withdraw => "Drop", + current => "Enrolled", + C => "Enrolled", + enrolled => "Enrolled", + }, ); ################################################################################ @@ -108,12 +190,73 @@ ################################################################################ %templates = ( - system => "$webworkDirs{conf}/barebones.template", + system => "$webworkDirs{conf}/templates/ur.template", +); + +################################################################################ +# 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. +#$dbLayoutName = "sql"; +$dbLayoutName = "gdbm"; + +*dbLayout = $dbLayouts{$dbLayoutName}; + +################################################################################ +# Problem library options +################################################################################ + +%problemLibrary = ( + root => "", # set to the top of the problem library, if its installed + sourceSQL => "ProblemLibrary", + userSQL => "webworkRead", + passwordSQL => "", +); + +################################################################################ +# Authorization system +################################################################################ + +# This lets you specify a minimum permission level needed to perform certain +# actions. In the current system, >=10 will allow a professor to perform the +# action, >=5 will allow a TA to, and >=0 will allow a student to perform an +# action (almost never what you want). +my $ta = 5; +my $professor = 10; +%permissionLevels = ( + become_student => $professor, + access_instructor_tools => $ta, + create_and_delete_problem_sets => $professor, + modify_problem_sets => $professor, + assign_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, + create_and_delete_courses => $professor, ); +################################################################################ +# Session options +################################################################################ + # $sessionKeyTimeout defines seconds of inactivity before a key expires $sessionKeyTimeout = 60*30; +# $sessionKeyLength defines the length (in characters) of the session key +$sessionKeyLength = 40; + +# @sessionKeyChars lists the legal session key characters +@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); + # Practice users are users who's names start with $practiceUser # (you can comment this out to remove practice user support) $practiceUserPrefix = "practice"; @@ -125,34 +268,13 @@ #$debugPracticeUser = "practice666"; ################################################################################ -# Database and session -################################################################################ - -%dbInfo = ( - auth_type => "GDBM", - auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB", - auth_perm_file => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", - auth_keys_file => "$courseDirs{auth_DATA}/keys", - wwdb_type => "GDBM", - wwdb_file => "$courseDirs{DATA}/$courseName\_webwork_DB", - cldb_type => "GDBM", - cldb_file => "$courseDirs{DATA}/$courseName\_classlist_DB", - psvn_digits => 5, -); - -# This lets you specify a minimum permission level needed to perform -# certain actions. In the current system, >=10 will allow a professor -# to perform the action, >=5 will allow a TA to, and >=0 will allow a -# student to perform an action (almost never what you want). -%permissionLevels = ( - "become_student" => 10, -); - -################################################################################ # PG translation options ################################################################################ %pg = ( + # available display modes + displayModes => [ qw(plainText formattedText images jsMath asciimath) ], + # pg options options => { # default translation options displayMode => "images", @@ -160,10 +282,34 @@ showCorrectAnswers => 0, showHints => 0, showSolutions => 0, - catchWarnings => 1, + catchWarnings => 0, # there's a global warning catcher now # default grader grader => "avg_problem_grader", }, + # options for various renderers + renderers => { + "WeBWorK::PG::Remote" => { + proxy => "http://localhost:21000/RenderD" + } + }, + # currently selected renderer + renderer => "WeBWorK::PG::Local", + #renderer => "WeBWorK::PG::Remote", + # directories used by PG + directories => { + # directories used only by PG + root => "$pgRoot", + lib => "$pgRoot/lib", + macros => "$pgRoot/macros", + }, + # this will be customized in the course.conf file + specialPGEnvironmentVars => { + PRINT_FILE_NAMES_FOR => [ qw(professor) ], + CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", + CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", + CAPA_Graphics_URL => "$courseURLs{html}/CAPA_Graphics/", + CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/", + }, # modules lists module names and the packages each contains modules => [ [qw(DynaLoader)], @@ -208,5 +354,7 @@ numRelPercentTolDefault => .1, numZeroLevelDefault => 1E-14, numZeroLevelTolDefault => 1E-12, + useBaseTenLog => 0, + defaultDisplayMatrixStyle => "[s]", }, );