[system] / branches / rel-2-0-patches / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

View of /branches/rel-2-0-patches/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2707 - (download) (annotate)
Wed Sep 1 02:01:45 2004 UTC (8 years, 8 months ago) by gage
File size: 25916 byte(s)
Reorganized where the external program locations are defined.
The two sections have been moved to the same block of global.conf

    1 #!perl
    2 ################################################################################
    3 # WeBWorK Online Homework Delivery System
    4 # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
    5 # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.95.2.2 2004/08/28 01:29:27 sh002i Exp $
    6 #
    7 # This program is free software; you can redistribute it and/or modify it under
    8 # the terms of either: (a) the GNU General Public License as published by the
    9 # Free Software Foundation; either version 2, or (at your option) any later
   10 # version, or (b) the "Artistic License" which comes with this package.
   11 #
   12 # This program is distributed in the hope that it will be useful, but WITHOUT
   13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   14 # FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
   15 # Artistic License for more details.
   16 ################################################################################
   17 
   18 # This file is used to set up the default WeBWorK course environment for all
   19 # requests. Values may be overwritten by the course.conf for a specific course.
   20 # All package variables set in this file are added to the course environment.
   21 # If you wish to set a variable here but omit it from the course environment,
   22 # use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache
   23 # configuration file (webwork.apache-config) and is available for use here. In
   24 # addition, the $courseName variable holds the name of the current course.
   25 
   26 ################################################################################
   27 # Seed variables
   28 ################################################################################
   29 
   30 # Set these variables to correspond to your configuration and preferences. You
   31 # will need to restart the webserver to reset the variables in this section
   32 
   33 # URL of WeBWorK handler.
   34 $webwork_url         = "/webwork2";
   35 
   36 # Root directory of PG.
   37 $pg_dir              = "/opt/pg";
   38 
   39 # URL and path to htdocs directory.
   40 $webwork_htdocs_url  = "/webwork2_files";
   41 $webwork_htdocs_dir  = "$webwork_dir/htdocs";
   42 
   43 # URL and path to courses directory.
   44 $webwork_courses_url = "/webwork2_course_files";
   45 $webwork_courses_dir = "$webwork_dir/courses";
   46 
   47 ################################################################################
   48 # Paths to external programs
   49 ################################################################################
   50 
   51 $externalPrograms{mkdir}    = "/bin/mkdir";
   52 $externalPrograms{mysql}    = "/usr/local/bin/mysql";
   53 
   54 $externalPrograms{latex}    = "/usr/local/bin/latex";
   55 $externalPrograms{pdflatex} = "/usr/local/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files
   56 $externalPrograms{dvipng}   = "/usr/local/bin/dvipng";
   57 $externalPrograms{tth}      = "/usr/local/bin/tth";
   58 
   59 # These image conversion utilities are included in the WeBWorK distribution.
   60 $externalPrograms{gif2eps}  = "$webworkDirs{bin}/gif2eps";
   61 $externalPrograms{png2eps}  = "$webworkDirs{bin}/png2eps";
   62 $externalPrograms{gif2png}  = "$webworkDirs{bin}/gif2png";
   63 
   64 
   65 
   66 
   67 ################################################################################
   68 # Mail settings
   69 ################################################################################
   70 
   71 # Mail sent by the PG system and the mail merge and feedback modules will be
   72 # sent via this SMTP server.
   73 $mail{smtpServer}            = 'mail.yourschool.edu';
   74 
   75 # When connecting to the above server, WeBWorK will send this address in the
   76 # MAIL FROM command. This has nothing to do with the "From" address on the mail
   77 # message. It can really be anything, but some mail servers require it contain
   78 # a valid mail domain, or at least be well-formed.
   79 $mail{smtpSender}            = 'webwork@yourserver.yourschool.edu';
   80 
   81 # AllowedRecipients defines addresses that the PG system is allowed to send mail
   82 # to. this prevents subtle PG exploits. This should be set in course.conf to the
   83 # addresses of professors of each course. Sending mail from the PG system (i.e.
   84 # questionaires, essay questions) will fail if this is not set somewhere (either
   85 # here or in course.conf).
   86 $mail{allowedRecipients}     = [
   87   #'prof1@yourserver.yourdomain.edu',
   88   #'prof2@yourserver.yourdomain.edu',
   89 ];
   90 
   91 # If defined, feedbackRecipients overrides the list of recipients for feedback
   92 # email. It's appropriate to set this in the course.conf for specific courses,
   93 # but probably not in global.conf. if not defined, mail is sent to all
   94 # professors and TAs for a given course
   95 
   96 # $mail{feedbackRecipients}    = [
   97 #   'prof1@yourserver.yourdomain.edu',
   98 #   'prof2@yourserver.yourdomain.edu',
   99 # ];
  100 
  101 # feedbackVerbosity:
  102 #  0: send only the feedback comment and context link
  103 #  1: as in 0, plus user, set, problem, and PG data
  104 #  2: as in 1, plus the problem environment (debugging data)
  105 $mail{feedbackVerbosity}     = 1;
  106 
  107 # Defines the size of the Mail Merge editor window
  108 # FIXME: should this be here? it's UI, not mail
  109 # FIXME: replace this with the auto-size method that TWiki uses
  110 $mail{editor_window_rows}    = 15;
  111 $mail{editor_window_columns} = 100;
  112 
  113 ################################################################################
  114 # System-wide locations (directories and URLs)
  115 ################################################################################
  116 
  117 # The root directory, set by webwork_root variable in Apache configuration.
  118 $webworkDirs{root}          = "$webwork_dir";
  119 
  120 # Location of system-wide data files.
  121 $webworkDirs{DATA}          = "$webworkDirs{root}/DATA";
  122 
  123 # Used for temporary storage of uploaded files.
  124 $webworkDirs{uploadCache}   = "$webworkDirs{DATA}/uploads";
  125 
  126 # Location of utility programs.
  127 $webworkDirs{bin}           = "$webworkDirs{root}/bin";
  128 
  129 # Location of configuration files, templates, snippets, etc.
  130 $webworkDirs{conf}          = "$webworkDirs{root}/conf";
  131 
  132 # Location of course directories.
  133 $webworkDirs{courses}       = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
  134 
  135 # Contains log files.
  136 $webworkDirs{logs}          = "$webworkDirs{root}/logs";
  137 
  138 # Contains non-web-accessible temporary files, such as TeX working directories.
  139 $webworkDirs{tmp}           = "$webworkDirs{root}/tmp";
  140 
  141 ##### The following locations are web-accessible.
  142 
  143 # The root URL (usually /webwork2), set by <Location> in Apache configuration.
  144 $webworkURLs{root}          = "$webwork_url";
  145 
  146 # Location of system-wide web-accessible files, such as equation images, and
  147 # help files.
  148 $webworkDirs{htdocs}        = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
  149 $webworkURLs{htdocs}        = "$webwork_htdocs_url";
  150 
  151 # Location of web-accessible temporary files, such as equation images.
  152 $webworkDirs{htdocs_temp}   = "$webworkDirs{htdocs}/tmp";
  153 $webworkURLs{htdocs_temp}   = "$webworkURLs{htdocs}/tmp";
  154 
  155 # Location of cached equation images.
  156 $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
  157 $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
  158 
  159 # Contains context-sensitive help files.
  160 $webworkDirs{local_help}    = "$webworkDirs{htdocs}/helpFiles";
  161 $webworkURLs{local_help}    = "$webworkURLs{htdocs}/helpFiles";
  162 
  163 # URL of general WeBWorK documentation.
  164 $webworkURLs{docs}          = "http://webhost.math.rochester.edu/webworkdocs/docs";
  165 
  166 # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages.
  167 # Note that both systems must share a single "courses" directory for this to be
  168 # useful. Leave this blank to disable
  169 $webworkURLs{oldProf}       = "/webwork1/profLogin.pl";
  170 
  171 # URL of WeBWorK Bugzilla database.
  172 $webworkURLs{bugReporter}   = "http://bugs.webwork.rochester.edu/";
  173 
  174 # Location of jsMath script, used for the jsMath display mode.
  175 $webworkURLs{jsMath}        = "$webworkURLs{htdocs}/jsMath/jsMath.js";
  176 
  177 # Location of ASCIIMathML script, used for the asciimath display mode.
  178 $webworkURLs{asciimath}     = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
  179 
  180 ################################################################################
  181 # Defaults for course-specific locations (directories and URLs)
  182 ################################################################################
  183 
  184 # The root directory of the current course. (The ID of the current course is
  185 # available in $courseName.)
  186 $courseDirs{root}        = "$webworkDirs{courses}/$courseName";
  187 
  188 # Location of course-specific data files, such as WW1 (GDBM) database files.
  189 $courseDirs{DATA}        = "$courseDirs{root}/DATA";
  190 
  191 # Location of authentication data files when using a WW1 (GDBM) database.
  192 $courseDirs{auth_DATA}   = "$courseDirs{DATA}/.auth";
  193 
  194 # Location of course HTML files, passed to PG.
  195 $courseDirs{html}        = "$courseDirs{root}/html";
  196 $courseURLs{html}        = "$webwork_courses_url/$courseName";
  197 
  198 # Location of course image files, passed to PG.
  199 $courseDirs{html_images} = "$courseDirs{html}/images";
  200 
  201 # Location of web-accessible, course-specific temporary files, like static and
  202 # dynamically-generated PG graphics.
  203 $courseDirs{html_temp}   = "$courseDirs{html}/tmp";
  204 $courseURLs{html_temp}   = "$courseURLs{html}/tmp";
  205 
  206 # Location of course-specific logs, like the transaction log.
  207 $courseDirs{logs}        = "$courseDirs{root}/logs";
  208 
  209 # Location of scoring files.
  210 $courseDirs{scoring}     = "$courseDirs{root}/scoring";
  211 
  212 # Location of PG templates and set definition files.
  213 $courseDirs{templates}   = "$courseDirs{root}/templates";
  214 
  215 # Location of course-specific macro files.
  216 $courseDirs{macros}      = "$courseDirs{templates}/macros";
  217 
  218 # Location of mail-merge templates.
  219 $courseDirs{email}       = "$courseDirs{templates}/email";
  220 
  221 ################################################################################
  222 # System-wide files
  223 ################################################################################
  224 
  225 # Location of this file.
  226 $webworkFiles{environment}                      = "$webworkDirs{conf}/global.conf";
  227 
  228 # Flat-file database used to protect against MD5 hash collisions. TeX equations
  229 # are hashed to determine the name of the image file. There is a tiny chance of
  230 # a collision between two TeX strings. This file allows for that. However, this
  231 # is slow, so most people chose not to worry about it. Set this to "" if you
  232 # don't want to use the equation cache file.
  233 $webworkFiles{equationCacheDB}                  = ""; # "$webworkDirs{DATA}/equationcache";
  234 
  235 ##### Hardcopy snippets are used in constructing a TeX file for hardcopy output.
  236 ##### They should contain TeX code unless otherwise noted.
  237 
  238 # The preamble is the first thing in the TeX file.
  239 $webworkFiles{hardcopySnippets}{preamble}       = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
  240 
  241 # The setHeader preceeds each set. It is a PG file.
  242 $webworkFiles{hardcopySnippets}{setHeader}      = "$webworkDirs{conf}/snippets/setHeader.pg";  # hardcopySetHeader.pg",
  243 
  244 # The problem divider goes between problems.
  245 $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
  246 
  247 # The set footer goes after each set. Is is a PG file.
  248 $webworkFiles{hardcopySnippets}{setFooter}      = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";
  249 
  250 # The set divider goes between sets (in multiset output).
  251 $webworkFiles{hardcopySnippets}{setDivider}     = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";
  252 
  253 # The user divider does between users (in multiuser output).
  254 $webworkFiles{hardcopySnippets}{userDivider}    = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";
  255 
  256 # The postabmle is the last thing in the TeX file.
  257 $webworkFiles{hardcopySnippets}{postamble}      = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
  258 
  259 ##### Screen snippets are used when displaying problem sets on the screen.
  260 
  261 # The set header is displayed on the problem set page. It is a PG file.
  262 $webworkFiles{screenSnippets}{setHeader}        = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
  263 
  264 ################################################################################
  265 # Course-specific files
  266 ################################################################################
  267 
  268 # The course configuration file.
  269 $courseFiles{environment} = "$courseDirs{root}/course.conf";
  270 
  271 # File contents are displayed after login, on the problem sets page. Path given
  272 # here is relative to the templates directory.
  273 $courseFiles{course_info} = "course_info.txt";
  274 
  275 # File contents are displayed on the login page. Path given here is relative to
  276 # the templates directory.
  277 $courseFiles{login_info}  = "login_info.txt";
  278 
  279 # Additional library buttons can be added to the Library Browser (SetMaker.pm)
  280 # by adding the libraries you want to the following line.  For each key=>value
  281 # in the list, if a directory (or link to a directory) with name 'key' appears
  282 # in the templates directory, then a button with name 'value' will be placed at
  283 # the top of the problem browser.  (No button will appear if there is no
  284 # directory or link with the given name in the templates directory.)  For
  285 # example,
  286 #
  287 #     $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
  288 #
  289 # would add two buttons, one for the Rochester library and one for the ASU
  290 # library, provided templates/rochester and templates/asu exists either as
  291 # subdirectories or links to other directories.
  292 #
  293 $courseFiles{problibs}    = {
  294 #   rochesterLibrary => "Rochester",
  295 #   asuLibrary       => "Arizona State",
  296 #   dcdsLibrary      => "Detroit CDS",
  297 #   dartmouthLibrary => "Dartmouth",
  298 #   indianaLibrary   => "Indiana",
  299 #   osuLibrary       => "Ohio State",
  300 #   capaLibrary      => "CAPA",
  301 };
  302 
  303 ################################################################################
  304 # Database options
  305 ################################################################################
  306 
  307 # Several database are defined in the file conf/database.conf and stored in the
  308 # hash %dbLayouts.
  309 include "conf/database.conf";
  310 
  311 # Select the default database layout. This can be overridden in the course.conf
  312 # file of a particular course. If you choose "gdbm", WeBWorK will be able to
  313 # use courses from WeBWorK 1 without first adding course.conf files to them.
  314 # However, the recommended database layout for new courses is "sql". This can
  315 # be set when creating a course.
  316 $dbLayoutName = "sql"; # or "gdbm";
  317 
  318 # This sets the symbol "dbLayout" as an alias for the selected database layout.
  319 *dbLayout     = $dbLayouts{$dbLayoutName};
  320 
  321 ################################################################################
  322 # Problem library options
  323 ################################################################################
  324 
  325 # The directory containing the problem library files. Set to "" if no problem
  326 # library is installed.
  327 $problemLibrary{root}        = "";
  328 
  329 # The name of the SQL database containing problem metadata
  330 $problemLibrary{sourceSQL}   = "ProblemLibrary";
  331 
  332 # The user name to use when connecting to the problem library database
  333 $problemLibrary{userSQL}     = "webworkRead";
  334 
  335 # The password to use when connecting to the problem library database
  336 $problemLibrary{passwordSQL} = "";
  337 
  338 ################################################################################
  339 # Logs
  340 ################################################################################
  341 
  342 # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own
  343 # top-level hash.
  344 
  345 # Logs data about how long it takes to process problems. (Do not confuse this
  346 # with the /other/ timing log which can be set by WeBWorK::Timing and is used
  347 # for benchmarking system performance in general. At some point, this timing
  348 # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
  349 $webworkFiles{logs}{timing}         = "$webworkDirs{logs}/timing.log";
  350 
  351 # The transaction log contains data from each recorded answer submission. This
  352 # is useful if the database becomes corrupted.
  353 $webworkFiles{logs}{transaction}    = "$courseDirs{logs}/transaction.log";
  354 
  355 # The answer log stores a history of all users' submitted answers.
  356 $courseFiles{logs}{answer_log}      = "$courseDirs{logs}/answer_log";
  357 
  358 ################################################################################
  359 # Site defaults (FIXME: what other things could be "site defaults"?) (move to Constants.pm??)
  360 ################################################################################
  361 
  362 # Status strings -- lists valid status values and their names. If your site uses
  363 # additional values, add them here.
  364 $siteDefaults{status} = {
  365   A        => "Audit",
  366   audit    => "Audit",
  367   D        => "Drop",
  368   drop     => "Drop",
  369   withdraw => "Drop",
  370   C        => "Enrolled",
  371   current  => "Enrolled",
  372   enrolled => "Enrolled",
  373 };
  374 
  375 ################################################################################
  376 # Frontend options
  377 ################################################################################
  378 
  379 %templates = (
  380   system => "$webworkDirs{conf}/templates/ur.template",
  381 );
  382 
  383 ################################################################################
  384 # Authorization system
  385 ################################################################################
  386 
  387 # This lets you specify a minimum permission level needed to perform certain
  388 # actions.  In the current system, >=10 will allow a professor to perform the
  389 # action, >=5 will allow a TA to, and >=0 will allow a student to perform an
  390 # action (almost never what you want).
  391 
  392 my $student   = 0;
  393 my $ta        = 5;
  394 my $professor = 10;
  395 my $nobody    = undef;
  396 
  397 %permissionLevels = (
  398   report_bugs                    => $student,
  399 
  400   view_multiple_sets             => $ta,
  401   view_unopened_sets             => $ta,
  402   view_unpublished_sets          => $ta,
  403   view_answers                   => $ta,
  404 
  405   become_student                 => $professor,
  406   access_instructor_tools        => $ta,
  407   score_sets                     => $professor,
  408   send_mail                      => $professor,
  409 
  410   create_and_delete_problem_sets => $professor,
  411   assign_problem_sets            => $professor,
  412   modify_problem_sets            => $professor,
  413   modify_student_data            => $professor,
  414 
  415   modify_classlist_files         => $professor,
  416   modify_set_def_files           => $professor,
  417   modify_scoring_files           => $professor,
  418   modify_problem_template_files  => $professor,
  419 
  420   create_and_delete_courses      => $professor,
  421   fix_course_databases           => $professor,
  422 
  423   ##### Behavior of the interactive problem processor #####
  424 
  425   show_correct_answers_before_answer_date         => $ta,
  426   show_solutions_before_answer_date               => $ta,
  427   avoid_recording_answers                         => $ta,
  428 
  429   check_answers_before_open_date                  => $ta,
  430   check_answers_after_open_date_with_attempts     => $ta,
  431   check_answers_after_open_date_without_attempts  => $student,
  432   check_answers_after_due_date                    => $student,
  433   check_answers_after_answer_date                 => $student,
  434 
  435   record_answers_when_acting_as_student           => $nobody,
  436 
  437   # "record_answers_when_acting_as_student" takes precedence
  438   # over the following for professors acting as students:
  439   record_answers_before_open_date                 => $nobody,
  440   record_answers_after_open_date_with_attempts    => $student,
  441   record_answers_after_open_date_without_attempts => $nobody,
  442   record_answers_after_due_date                   => $nobody,
  443   record_answers_after_answer_date                => $nobody,
  444 );
  445 
  446 ################################################################################
  447 # Session options
  448 ################################################################################
  449 
  450 # $sessionKeyTimeout defines seconds of inactivity before a key expires
  451 $sessionKeyTimeout = 60*30;
  452 
  453 # $sessionKeyLength defines the length (in characters) of the session key
  454 $sessionKeyLength = 40;
  455 
  456 # @sessionKeyChars lists the legal session key characters
  457 @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
  458 
  459 # Practice users are users who's names start with $practiceUser
  460 # (you can comment this out to remove practice user support)
  461 $practiceUserPrefix = "practice";
  462 
  463 # There is a practice user who can be logged in multiple times.  He's
  464 # commented out by default, though, so you don't hurt yourself.  It is
  465 # kindof a backdoor to the practice user system, since he doesn't have a
  466 # password.  Come to think of it, why do we even have this?!
  467 #$debugPracticeUser = "practice666";
  468 
  469 ################################################################################
  470 # PG subsystem options
  471 ################################################################################
  472 
  473 # List of enabled display modes. Comment out any modes you don't wish to make
  474 # available for use.
  475 $pg{displayModes} = [
  476   "plainText",     # display raw TeX for math expressions
  477   "formattedText", # format math expressions using TtH
  478   "images",        # display math expressions as images generated by dvipng
  479   "jsMath",        # render TeX math expressions on the client side using jsMath
  480   "asciimath",     # render TeX math expressions on the client side using ASCIIMathML
  481 ];
  482 
  483 #### Default settings for the PG translator
  484 
  485 # Default display mode. Should be listed above.
  486 $pg{options}{displayMode}        = "images";
  487 
  488 # The default grader to use, if a problem doesn't specify.
  489 $pg{options}{grader}             = "avg_problem_grader";
  490 
  491 # Fill in answer blanks with the student's last answer by default?
  492 $pg{options}{showOldAnswers}     = 1;
  493 
  494 # Show correct answers (when allowed) by default?
  495 $pg{options}{showCorrectAnswers} = 0;
  496 
  497 # Show hints (when allowed) by default?
  498 $pg{options}{showHints}          = 0;
  499 
  500 # Show solutions (when allowed) by default?
  501 $pg{options}{showSolutions}      = 0;
  502 
  503 # Catch translation warnings internally by default? (We no longer need to do
  504 # this, since there is a global warnings handler. So this should be off.)
  505 $pg{options}{catchWarnings}      = 0;
  506 
  507 ##### Currently-selected renderer
  508 
  509 # Only the local renderer is supported in this version.
  510 $pg{renderer} = "WeBWorK::PG::Local";
  511 
  512 # The remote renderer connects to an XML-RPC PG rendering server.
  513 #$pg{renderer} = "WeBWorK::PG::Remote"'
  514 
  515 ##### Renderer-dependent options
  516 
  517 # The remote renderer has one option:
  518 $pg{renderers}{"WeBWorK::PG::Remote"} = {
  519   # The "proxy" server to connect to for remote rendering.
  520   proxy => "http://localhost:21000/RenderD",
  521 };
  522 
  523 ##### Settings for various display modes
  524 
  525 # "images" mode has several settings:
  526 $pg{displayModeOptions}{images} = {
  527   # Determines the method used to align images in output. Can be
  528   # "baseline", "absmiddle", or "mysql".
  529   dvipng_align => 'baseline',
  530 
  531   # If we choose mysql, we need information on connecting to the
  532   # database. Whatever you use here, you have to create the database
  533   # and grant read/write priveleges to the user listed here. To create
  534   # the database in mysql, as root use:
  535   #
  536   #     CREATE DATABASE DvipngDepths;
  537   #     USE DvipngDepths;
  538   #     CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5));
  539   #     GRANT ALL ON DvipngDepths.* TO webworkWrite;
  540   #
  541   # In the last statement, "webworkWrite" should match the user below.
  542   dvipng_depth_db => {
  543     dbsource => 'dbi:mysql:DvipngDepths',
  544     user     => $dbLayouts{sql}->{password}->{params}->{usernameRW},
  545     passwd   => $dbLayouts{sql}->{password}->{params}->{passwordRW},
  546   },
  547 };
  548 
  549 ##### Directories used by PG
  550 
  551 # The root of the PG directory tree (from pg_root in Apache config).
  552 $pg{directories}{root}   = "$pg_dir";
  553 $pg{directories}{lib}    = "$pg{directories}{root}/lib";
  554 $pg{directories}{macros} = "$pg{directories}{root}/macros";
  555 
  556 ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
  557 
  558 # Users for whom to print the file name of the PG file being processed.
  559 $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
  560 
  561 # Locations of CAPA resources. (Only necessary if you need to use converted CAPA
  562 # problems.)
  563 $pg{specialPGEnvironmentVars}{CAPA_Tools}             = "$courseDirs{macros}/CAPA_Tools/",
  564 $pg{specialPGEnvironmentVars}{CAPA_MCTools}           = "$courseDirs{macros}/CAPA_MCTools/",
  565 $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
  566 $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL}      = "$courseURLs{html}/CAPA_Graphics/",
  567 
  568 # Size in pixels of dynamically-generated images, i.e. graphs.
  569 $pg{specialPGEnvironmentVars}{onTheFlyImageSize}      = 400,
  570 
  571 ##### PG modules to load
  572 
  573 # The first item of each list is the module to load. The remaining items are
  574 # additional packages to import.
  575 
  576 ${pg}{modules} = [
  577   [qw(DynaLoader)],
  578   [qw(Exporter)],
  579   [qw(GD)],
  580 
  581   [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
  582   [qw(AnswerHash AnswerEvaluator)],
  583   [qw(WWPlot)], # required by Circle (and others)
  584   [qw(Circle)],
  585   [qw(Complex)],
  586   [qw(Complex1)],
  587   [qw(Distributions)],
  588   [qw(Fraction)],
  589   [qw(Fun)],
  590   [qw(Hermite)],
  591   [qw(Label)],
  592   [qw(List)],
  593   [qw(Match)],
  594   [qw(MatrixReal1)], # required by Matrix
  595   [qw(Matrix)],
  596   [qw(Multiple)],
  597   [qw(PGrandom)],
  598   [qw(Regression)],
  599   [qw(Select)],
  600   [qw(Units)],
  601   [qw(VectorField)],
  602 ];
  603 
  604 ##### Answer evaluatior defaults
  605 
  606 $pg{ansEvalDefaults} = {
  607   functAbsTolDefault            => .001,
  608   functLLimitDefault            => .0000001,
  609   functMaxConstantOfIntegration => 1E8,
  610   functNumOfPoints              => 3,
  611   functRelPercentTolDefault     => .1,
  612   functULimitDefault            => .9999999,
  613   functVarDefault               => "x",
  614   functZeroLevelDefault         => 1E-14,
  615   functZeroLevelTolDefault      => 1E-12,
  616   numAbsTolDefault              => .001,
  617   numFormatDefault              => "",
  618   numRelPercentTolDefault       => .1,
  619   numZeroLevelDefault           => 1E-14,
  620   numZeroLevelTolDefault        => 1E-12,
  621   useBaseTenLog                 => 0,
  622   defaultDisplayMatrixStyle     => "[s]",
  623 };
  624 
  625 ################################################################################
  626 # Compatibility
  627 ################################################################################
  628 
  629 # Define the old names for the various "root" variables.
  630 $webworkRoot    = $webworkDirs{root};
  631 $webworkURLRoot = $webworkURLs{root};
  632 $pgRoot         = $pg{directories}{root};

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9