--- trunk/webwork-modperl/conf/global.conf.dist 2003/04/23 06:35:06 811 +++ trunk/webwork-modperl/conf/global.conf.dist 2003/06/21 02:34:10 1248 @@ -1,7 +1,7 @@ #!perl ################################################################################ # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester -# $Id: global.conf.dist,v 1.18 2003-04-23 06:35:06 sh002i Exp $ +# $Id: global.conf.dist,v 1.36 2003-06-21 02:34:10 gage 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", + timing => "$webworkDirs{logs}/timing.log", }, ); %webworkURLs = ( root => "$webworkURLRoot", - home => "http://host.yourdomaon.edu/webwork-info", - htdocs => "/webwork_files", + home => "/webwork2_files/index.html", + htdocs => "/webwork2_files", docs => "http://webhost.math.rochester.edu/webworkdocs/docs", oldProf => "/webwork-old/profLogin.pl", ); @@ -79,7 +80,8 @@ ); # quick hack to fix transaction logging. blah. -$webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; +$webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; +$webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; %courseURLs = ( @@ -123,7 +125,8 @@ 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", @@ -134,96 +137,52 @@ ################################################################################ %templates = ( - system => "$webworkDirs{conf}/barebones.template", + system => "$webworkDirs{conf}/templates/ur.template", ); ################################################################################ -# Database and session +# Database options ################################################################################ -# dbInfo records some data for the "old" WW/Classlist/Auth.pm database system -# {auth,wwdb,cldb}_type = database type: GDBM currently implemented -# {auth_passwd,auth_perm,auth_keys,wwdb,cldb}_file = path to database file -%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, -); - -# dbLayout records the schema and source for each table in the "new" DB.pm -# database system. consult DB.pm for the authoritative list of tables. -# schema = perl module to use for access to the table -# driver = perl module to use for access to the data source -# source = location of data source (i.e. path, url, DBI spec) -# params = extra information needed by the schema (optional) -# note: schema and driver must have the same interface. -%dbLayout = ( - password => { - record => "WeBWorK::DB::Record::Password", - schema => "WeBWorK::DB::Schema::Auth1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{auth_DATA}/$courseName\_password_DB", - }, - permission => { - record => "WeBWorK::DB::Record::PermissionLevel", - schema => "WeBWorK::DB::Schema::Auth1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB", - }, - key => { - record => "WeBWorK::DB::Record::Key", - schema => "WeBWorK::DB::Schema::Auth1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{auth_DATA}/keys", - }, - user => { - record => "WeBWorK::DB::Record::User", - schema => "WeBWorK::DB::Schema::Classlist1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{DATA}/$courseName\_classlist_DB", - }, - set => { - record => "WeBWorK::DB::Record::Set", - schema => "WeBWorK::DB::Schema::Null", - driver => "WeBWorK::DB::Driver::Null", - source => undef, - }, - set_user => { - record => "WeBWorK::DB::Record::UserSet", - schema => "WeBWorK::DB::Schema::WW1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{DATA}/$courseName\_webwork_DB", - params => { psvnLength => 5 }, - }, - problem => { - record => "WeBWorK::DB::Record::Problem", - schema => "WeBWorK::DB::Schema::Null", - driver => "WeBWorK::DB::Driver::Null", - source => undef, - }, - problem_user => { - record => "WeBWorK::DB::Record::UserProblem", - schema => "WeBWorK::DB::Schema::WW1Hash", - driver => "WeBWorK::DB::Driver::GDBM", - source => "$courseDirs{DATA}/$courseName\_webwork_DB", - params => { psvnLength => 5 }, - }, -); +# 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"; -# 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). +# 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" => 10, + 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; @@ -248,6 +207,19 @@ ################################################################################ %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", @@ -255,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)],