[system] / trunk / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

View of /trunk/webwork2/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1101 - (download) (annotate)
Tue Jun 10 00:52:00 2003 UTC (9 years, 11 months ago) by gage
File size: 12317 byte(s)
*** empty log message ***

    1 #!perl
    2 ################################################################################
    3 # WeBWorK mod_perl (c) 1995-2002 WeBWorK Team, Univeristy of Rochester
    4 # $Id: global.conf.dist,v 1.27 2003-06-10 00:52:00 gage Exp $
    5 ################################################################################
    6 
    7 # This file is used to set up the default WeBWorK course environment for all
    8 # requests. Values may be overwritten by the course.conf for a specific course.
    9 # All package variables set in this file are added to the course environment.
   10 # If you wish to set a variable here but omit it from the course environment,
   11 # use the "my" keyword. The following variables are available to this file:
   12 #
   13 #         $webworkRoot    directory that contains the WeBWorK distribution
   14 #         $webworkURL     base URL handled by Apache::WeBWorK
   15 #         $pgRoot         directory that contains the PG distribution
   16 #         $courseName     name of the course being used
   17 
   18 ################################################################################
   19 # WeBWorK settings
   20 ################################################################################
   21 
   22 %webworkDirs = (
   23   root    => "$webworkRoot",
   24   bin     => "$webworkRoot/bin",
   25   conf    => "$webworkRoot/conf",
   26   courses => "$webworkRoot/courses",
   27   lib     => "$webworkRoot/lib",
   28   logs    => "$webworkRoot/logs",
   29   macros  => "$pgRoot/macros",
   30   tmp     => "$webworkRoot/tmp",
   31 );
   32 
   33 %webworkFiles = (
   34   environment        => "$webworkDirs{conf}/global.conf",
   35   hardcopySnippets   => {
   36     preamble       => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex",
   37     setHeader      => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg",
   38     problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex",
   39     setFooter      => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg",
   40     setDivider     => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex",
   41     postamble      => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex",
   42   },
   43   screenSnippets => {
   44     setHeader => "$webworkDirs{conf}/snippets/screenSetHeader.pg",
   45   },
   46   logs => {
   47     timing         => "$webworkDirs{logs}/timing.log",
   48   },
   49 );
   50 
   51 %webworkURLs = (
   52   root    => "$webworkURLRoot",
   53   home    => "/webwork2_files/index.html",
   54   htdocs  => "/webwork2_files",
   55   docs    => "http://webhost.math.rochester.edu/webworkdocs/docs",
   56   oldProf => "/webwork-old/profLogin.pl",
   57 );
   58 
   59 ################################################################################
   60 # Default course-specific settings
   61 ################################################################################
   62 
   63 my $courseRoot = "$webworkDirs{courses}/$courseName";
   64 %courseDirs = (
   65   root        => "$courseRoot",
   66   DATA        => "$courseRoot/DATA",
   67   auth_DATA   => "$courseRoot/DATA/.auth",
   68   html        => "$courseRoot/html",
   69   html_images => "$courseRoot/html/images",
   70   html_temp   => "$courseRoot/html/tmp",
   71   logs        => "$courseRoot/logs",
   72   scoring     => "$courseRoot/scoring",
   73   templates   => "$courseRoot/templates",
   74   macros      => "$courseRoot/templates/macros",
   75 );
   76 
   77 %courseFiles = (
   78   environment => "$courseDirs{root}/course.conf",
   79   motd        => "$courseDirs{root}/motd.txt",
   80 );
   81 
   82 # quick hack to fix transaction logging. blah.
   83 $webworkFiles{logs}->{transaction}    = "$courseDirs{logs}/transaction.log";
   84 $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
   85 
   86 my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName";
   87 %courseURLs = (
   88   root      => "$courseURLRoot",
   89   html      => "$courseURLRoot",
   90   html_temp => "$courseURLRoot/tmp",
   91 );
   92 
   93 ################################################################################
   94 # Other site-specific options
   95 ################################################################################
   96 
   97 %mail = (
   98   smtpServer => "mail.math.rochester.edu",
   99   smtpSender => "webwork\@math.rochester.edu",
  100   # allowedRecipients defines addresses that the PG system is allowed to
  101   # send mail to. this prevents subtle PG exploits. This should be set
  102   # in course.conf to the addresses of professors of each course. Sending
  103   # mail from the PG system (i.e. questionaires, essay questions) will
  104   # fail if this is not set somewhere (either here or in course.conf).
  105   #allowedRecipients => [
  106   # "yourname\@host.yourdomain.edu",
  107   #],
  108   # if defined, feedbackRecipients overrides the list of recipients for
  109   # feedback email. It's appropriate to set this in the course.conf for
  110   # specific courses, but probably not in global.conf. if not defined,
  111   # mail is sent to all professors and TAs for a given course
  112   #feedbackRecipients => [
  113   # "prof1\@host.yourdomain.edu",
  114   # "prof2\@host.yourdomain.edu",
  115   #],
  116   # feedbackVerbosity:
  117   #  0: send only the feedback comment and context link
  118   #  1: as in 0, plus user, set, problem, and PG data
  119   #  2: as in 1, plus the problem environment (debugging data)
  120   feedbackVerbosity => 1,
  121 );
  122 
  123 
  124 
  125 %externalPrograms = (
  126   mkdir    => "/bin/mkdir",
  127   tth      => "/usr/local/bin/tth",
  128   pdflatex => "/usr/local/bin/pdflatex",
  129   latex    => "/usr/local/bin/latex",
  130   dvipng   => "/usr/local/bin/dvipng -mode ljfivemp -D600 -Q6 -x1000.5 -bgTransparent",
  131   gif2eps  => "$webworkDirs{bin}/gif2eps",
  132   png2eps  => "$webworkDirs{bin}/png2eps",
  133   gif2png  => "$webworkDirs{bin}/gif2png",
  134 );
  135 
  136 ################################################################################
  137 # Frontend options
  138 ################################################################################
  139 
  140 %templates = (
  141   system => "$webworkDirs{conf}/templates/ur.template",
  142 );
  143 
  144 ################################################################################
  145 # Database and session
  146 ################################################################################
  147 
  148 # dbInfo records some data for the "old" WW/Classlist/Auth.pm database system
  149 # {auth,wwdb,cldb}_type = database type: GDBM currently implemented
  150 # {auth_passwd,auth_perm,auth_keys,wwdb,cldb}_file = path to database file
  151 %dbInfo = (
  152   auth_type        => "GDBM",
  153   auth_passwd_file => "$courseDirs{auth_DATA}/$courseName\_password_DB",
  154   auth_perm_file   => "$courseDirs{auth_DATA}/$courseName\_permissions_DB",
  155   auth_keys_file   => "$courseDirs{auth_DATA}/keys",
  156   wwdb_type        => "GDBM",
  157   wwdb_file        => "$courseDirs{DATA}/$courseName\_webwork_DB",
  158   cldb_type        => "GDBM",
  159   cldb_file        => "$courseDirs{DATA}/$courseName\_classlist_DB",
  160   psvn_digits      => 5,
  161 );
  162 
  163 # dbLayout records the schema and source for each table in the "new" DB.pm
  164 # database system. consult DB.pm for the authoritative list of tables.
  165 # schema = perl module to use for access to the table
  166 # driver = perl module to use for access to the data source
  167 # source = location of data source (i.e. path, url, DBI spec)
  168 # params = extra information needed by the schema (optional)
  169 # note: schema and driver must have the same interface.
  170 %dbLayout = (
  171   password => {
  172     record => "WeBWorK::DB::Record::Password",
  173     schema => "WeBWorK::DB::Schema::Auth1Hash",
  174     driver => "WeBWorK::DB::Driver::GDBM",
  175     source => "$courseDirs{auth_DATA}/$courseName\_password_DB",
  176   },
  177   permission => {
  178     record => "WeBWorK::DB::Record::PermissionLevel",
  179     schema => "WeBWorK::DB::Schema::Auth1Hash",
  180     driver => "WeBWorK::DB::Driver::GDBM",
  181     source => "$courseDirs{auth_DATA}/$courseName\_permissions_DB",
  182   },
  183   key => {
  184     record => "WeBWorK::DB::Record::Key",
  185     schema => "WeBWorK::DB::Schema::Auth1Hash",
  186     driver => "WeBWorK::DB::Driver::GDBM",
  187     source => "$courseDirs{auth_DATA}/keys",
  188   },
  189   user => {
  190     record => "WeBWorK::DB::Record::User",
  191     schema => "WeBWorK::DB::Schema::Classlist1Hash",
  192     driver => "WeBWorK::DB::Driver::GDBM",
  193     source => "$courseDirs{DATA}/$courseName\_classlist_DB",
  194   },
  195   set => {
  196     record => "WeBWorK::DB::Record::Set",
  197     schema => "WeBWorK::DB::Schema::GlobalTableEmulator",
  198     driver => "WeBWorK::DB::Driver::Null",
  199     source => undef,
  200   },
  201   set_user => {
  202     record => "WeBWorK::DB::Record::UserSet",
  203     schema => "WeBWorK::DB::Schema::WW1Hash",
  204     driver => "WeBWorK::DB::Driver::GDBM",
  205     source => "$courseDirs{DATA}/$courseName\_webwork_DB",
  206     params => { psvnLength => 5 },
  207   },
  208   problem => {
  209     record => "WeBWorK::DB::Record::Problem",
  210     schema => "WeBWorK::DB::Schema::GlobalTableEmulator",
  211     driver => "WeBWorK::DB::Driver::Null",
  212     source => undef,
  213   },
  214   problem_user => {
  215     record => "WeBWorK::DB::Record::UserProblem",
  216     schema => "WeBWorK::DB::Schema::WW1Hash",
  217     driver => "WeBWorK::DB::Driver::GDBM",
  218     source => "$courseDirs{DATA}/$courseName\_webwork_DB",
  219     params => { psvnLength => 5 },
  220   },
  221 );
  222 
  223 # If you are using the GlobalTableEmulator, you need these to be set to
  224 # a user that will exist.  Professors will probably want to override this
  225 # in their course's course.conf, using their own user name instead of "professor".
  226 
  227 $dbLayout{set}->{params}->{globalUserID} = "professor";
  228 $dbLayout{problem}->{params}->{globalUserID} = "professor";
  229 
  230 
  231 # This lets you specify a minimum permission level needed to perform
  232 # certain actions.  In the current system, >=10 will allow a professor
  233 # to perform the action, >=5 will allow a TA to, and >=0 will allow a
  234 # student to perform an action (almost never what you want).
  235 my $ta = 5;
  236 my $professor = 10;
  237 %permissionLevels = (
  238   "become_student" => 10,
  239   "access_instructor_tools" => $ta,
  240   "create_and_delete_problem_sets" => $professor,
  241   "modify_problem_sets" => $professor,
  242   "assign_problem_sets" => $professor,
  243 );
  244 
  245 # $sessionKeyTimeout defines seconds of inactivity before a key expires
  246 $sessionKeyTimeout = 60*30;
  247 
  248 # $sessionKeyLength defines the length (in characters) of the session key
  249 $sessionKeyLength = 40;
  250 
  251 # @sessionKeyChars lists the legal session key characters
  252 @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
  253 
  254 # Practice users are users who's names start with $practiceUser
  255 # (you can comment this out to remove practice user support)
  256 $practiceUserPrefix = "practice";
  257 
  258 # There is a practice user who can be logged in multiple times.  He's
  259 # commented out by default, though, so you don't hurt yourself.  It is
  260 # kindof a backdoor to the practice user system, since he doesn't have a
  261 # password.  Come to think of it, why do we even have this?!
  262 #$debugPracticeUser = "practice666";
  263 
  264 ################################################################################
  265 # PG translation options
  266 ################################################################################
  267 
  268 %pg = (
  269   options => {
  270     # default translation options
  271     displayMode        => "images",
  272     showOldAnswers     => 1,
  273     showCorrectAnswers => 0,
  274     showHints          => 0,
  275     showSolutions      => 0,
  276     catchWarnings      => 1,
  277     # default grader
  278     grader => "avg_problem_grader",
  279   },
  280   # this will be customized in the course.conf file
  281   specialPGEnvironmentVars => {
  282     PRINT_FILE_NAMES_FOR      =>    ['gage','apizer','voloshin','lr003k','professor'],
  283     CAPA_Tools                =>    "$courseDirs{macros}/CAPA_Tools/",
  284     CAPA_MCTools              =>    "$courseDirs{macros}/CAPA_MCTools/",
  285     CAPA_Graphics_URL         =>    "$courseDirs{html}/CAPA_Graphics/",
  286     CAPA_GraphicsDirectory    =>    "$courseDirs{html}CAPA_Graphics/",
  287     },
  288   # modules lists module names and the packages each contains
  289   modules => [
  290     [qw(DynaLoader)],
  291     [qw(Exporter)],
  292     [qw(GD)],
  293 
  294     [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
  295     [qw(AnswerHash AnswerEvaluator)],
  296     [qw(WWPlot)], # required by Circle (and others)
  297     [qw(Circle)],
  298     [qw(Complex)],
  299     [qw(Complex1)],
  300     [qw(Distributions)],
  301     [qw(Fraction)],
  302     [qw(Fun)],
  303     [qw(Hermite)],
  304     [qw(Label)],
  305     [qw(List)],
  306     [qw(Match)],
  307     [qw(MatrixReal1)], # required by Matrix
  308     [qw(Matrix)],
  309     [qw(Multiple)],
  310     [qw(PGrandom)],
  311     [qw(Regression)],
  312     [qw(Select)],
  313     [qw(Units)],
  314     [qw(VectorField)],
  315   ],
  316   # defaults used by answer evaluators
  317   ansEvalDefaults => {
  318     functAbsTolDefault            => .001,
  319     functLLimitDefault            => .0000001,
  320     functMaxConstantOfIntegration => 1E8,
  321     functNumOfPoints              => 3,
  322     functRelPercentTolDefault     => .1,
  323     functULimitDefault            => .9999999,
  324     functVarDefault               => "x",
  325     functZeroLevelDefault         => 1E-14,
  326     functZeroLevelTolDefault      => 1E-12,
  327     numAbsTolDefault              => .001,
  328     numFormatDefault              => "",
  329     numRelPercentTolDefault       => .1,
  330     numZeroLevelDefault           => 1E-14,
  331     numZeroLevelTolDefault        => 1E-12,
  332   },
  333 );

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9