--- trunk/webwork-modperl/conf/global.conf.dist 2003/01/08 16:23:52 695 +++ trunk/webwork-modperl/conf/global.conf.dist 2003/06/21 00:53:09 1242 @@ -1,7 +1,7 @@ #!perl ################################################################################ # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester -# $Id: global.conf.dist,v 1.6 2003-01-08 16:23:51 sh002i Exp $ +# $Id: global.conf.dist,v 1.35 2003-06-21 00:53:09 sh002i Exp $ ################################################################################ # This file is used to set up the default WeBWorK course environment for all @@ -12,6 +12,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 ################################################################################ @@ -25,32 +26,32 @@ courses => "$webworkRoot/courses", lib => "$webworkRoot/lib", logs => "$webworkRoot/logs", - macros => "$webworkRoot/macros", tmp => "$webworkRoot/tmp", ); %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/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/screenSetHeader.pg", }, logs => { - timing => "$webworkDirs{logs}/timing.log", - transaction => "$courseDirs{logs}/transaction.log", + timing => "$webworkDirs{logs}/timing.log", }, ); %webworkURLs = ( root => "$webworkURLRoot", - htdocs => "/webwork_files", + home => "/webwork2_files/index.html", + htdocs => "/webwork2_files", docs => "http://webhost.math.rochester.edu/webworkdocs/docs", oldProf => "/webwork-old/profLogin.pl", ); @@ -75,11 +76,16 @@ %courseFiles = ( environment => "$courseDirs{root}/course.conf", + motd => "$courseDirs{root}/motd.txt", ); +# quick hack to fix transaction logging. blah. +$webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; +$webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; + my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; %courseURLs = ( - base => "$courseURLRoot", # *** # this should be "root"? + root => "$courseURLRoot", html => "$courseURLRoot", html_temp => "$courseURLRoot/tmp", ); @@ -91,14 +97,36 @@ %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 => [ + # "yourname\@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, ); %externalPrograms = ( - mv => "/bin/mv", # *** is this used? probably not... + 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 -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent", + dvipng => "/usr/local/bin/dvipng", gif2eps => "$webworkDirs{bin}/gif2eps", png2eps => "$webworkDirs{bin}/png2eps", gif2png => "$webworkDirs{bin}/gif2png", @@ -109,12 +137,61 @@ ################################################################################ %templates = ( - system => "$webworkDirs{conf}/barebones.template", + system => "$webworkDirs{conf}/templates/ur.template", +); + +################################################################################ +# Database options +################################################################################ + +# Several database layouts are defined in separate environment files. Select the +# one which should be used by all courses by default, and include it. This can +# be overridden by including a difference environment file in the course.conf of +# a particular course. + +# Include sql.conf to specify a database layout for use with an SQL server. +#include "conf/sql.conf"; + +# Include gdbm.conf to specify a database layout for WeBWorK 1.x compatible GDBM +# databases. Use this layout if you wish to share courses between WeBWorK 1.x +# and WeBWorK 2. +include "conf/gdbm.conf"; + +# Please read the documentation in the file that you chose to include, as there +# are layout-specific options that must be configured. + +################################################################################ +# 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, ); +################################################################################ +# 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"; @@ -126,34 +203,23 @@ #$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 = ( + # options for various renderers + renderers => { + "WeBWorK::PG::Remote" => { + uri => "http://localhost:8089/RPC2" + } + }, + # currently selected renderer + renderer => "WeBWorK::PG::Local", + # directories used by PG + directories => { + lib => "$pgRoot/lib", + macros => "$pgRoot/macros", + }, options => { # default translation options displayMode => "images", @@ -161,10 +227,18 @@ showCorrectAnswers => 0, showHints => 0, showSolutions => 0, - catchWarnings => 1, + catchWarnings => 0, # there's a global warning catcher now # default grader grader => "avg_problem_grader", }, + # this will be customized in the course.conf file + specialPGEnvironmentVars => { + PRINT_FILE_NAMES_FOR => qw(gage apizer voloshin lr003k professor), + CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", + CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", + CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", + CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", + }, # modules lists module names and the packages each contains modules => [ [qw(DynaLoader)],