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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6063 - (download) (annotate)
Fri Jun 26 00:37:00 2009 UTC (3 years, 10 months ago) by gage
File size: 39895 byte(s)
syncing with HEAD

    1 #!perl
    2 ################################################################################
    3 # WeBWorK Online Homework Delivery System
    4 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
    5 # $CVSHeader$
    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. If WeBWorK is to be on the web server root, use "". Note
   34 # that using "" may not work so we suggest sticking with "/webwork2".
   35 $webwork_url         = "/webwork2";
   36 
   37 # Root directory of PG.
   38 $pg_dir              = "/opt/webwork/pg";
   39 
   40 # URL and path to htdocs directory.
   41 $webwork_htdocs_url  = "/webwork2_files";
   42 $webwork_htdocs_dir  = "$webwork_dir/htdocs";
   43 
   44 # URL and path to courses directory.
   45 $webwork_courses_url = "/webwork2_course_files";
   46 $webwork_courses_dir = "/opt/webwork/courses"; #(a typical place to put the course directory
   47 
   48 ################################################################################
   49 # Paths to external programs
   50 ################################################################################
   51 
   52 # system utilities
   53 $externalPrograms{mv}    = "/bin/mv";
   54 $externalPrograms{cp}    = "/bin/cp";
   55 $externalPrograms{rm}    = "/bin/rm";
   56 $externalPrograms{mkdir} = "/bin/mkdir";
   57 $externalPrograms{tar}   = "/bin/tar";
   58 $externalPrograms{gzip}  = "/bin/gzip";
   59 
   60 # equation rendering/hardcopy utiltiies
   61 $externalPrograms{latex}    = "/usr/bin/latex";
   62 $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape";
   63 $externalPrograms{dvipng}   = "/usr/bin/dvipng";
   64 $externalPrograms{tth}      = "/usr/bin/tth";
   65 
   66 # NetPBM - basic image manipulation utilities
   67 # Most sites only need to configure $netpbm_prefix.
   68 my $netpbm_prefix = "/usr/bin";
   69 $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm";
   70 $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm";
   71 $externalPrograms{pnmtops}  = "$netpbm_prefix/pnmtops";
   72 $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng";
   73 $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm";
   74 
   75 # url checker
   76 $externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head "
   77 
   78 # image conversions utiltiies
   79 # the source file is given on stdin, and the output expected on stdout.
   80 $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
   81 $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
   82 $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}";
   83 
   84 # mysql clients
   85 $externalPrograms{mysql}     = "/usr/bin/mysql";
   86 $externalPrograms{mysqldump} = "/usr/bin/mysqldump";
   87 
   88 ################################################################################
   89 # Mail settings
   90 ################################################################################
   91 
   92 # Mail sent by the PG system and the mail merge and feedback modules will be
   93 # sent via this SMTP server.
   94 $mail{smtpServer}            = 'mail.yourschool.edu';
   95 
   96 # When connecting to the above server, WeBWorK will send this address in the
   97 # MAIL FROM command. This has nothing to do with the "From" address on the mail
   98 # message. It can really be anything, but some mail servers require it contain
   99 # a valid mail domain, or at least be well-formed.
  100 $mail{smtpSender}            = 'webwork@yourserver.yourschool.edu';
  101 
  102 # Seconds to wait before timing out when connecting to the SMTP server.
  103 $mail{smtpTimeout}           = 30;
  104 
  105 # AllowedRecipients defines addresses that the PG system is allowed to send mail
  106 # to. this prevents subtle PG exploits. This should be set in course.conf to the
  107 # addresses of professors of each course. Sending mail from the PG system (i.e.
  108 # questionaires, essay questions) will fail if this is not set somewhere (either
  109 # here or in course.conf).
  110 $mail{allowedRecipients}     = [
  111   #'prof1@yourserver.yourdomain.edu',
  112   #'prof2@yourserver.yourdomain.edu',
  113 ];
  114 
  115 # By default, feeback is sent to all users who have permission to
  116 # receive_feedback. If this list is non-empty, feedback is also sent to the
  117 # addresses specified here.
  118 #
  119 # * If you want to disable feedback altogether, leave this empty and set
  120 #   submit_feeback => $nobody in %permissionLevels below. This will cause the
  121 #   feedback button to go away as well.
  122 #
  123 # * If you want to send email ONLY to addresses in this list, set
  124 #   receive_feedback => $nobody in %permissionLevels below.
  125 #
  126 # It's often useful to set this in the course.conf to change the behavior of
  127 # feedback for a specific course.
  128 #
  129 # Items in this list may be bare addresses, or RFC822 mailboxes, like:
  130 #   'Joe User <joe.user@example.com>'
  131 # The advantage of this form is that the resulting email will include the name
  132 # of the recipient in the "To" field of the email.
  133 #
  134 $mail{feedbackRecipients}    = [
  135   #'prof1@yourserver.yourdomain.edu',
  136   #'prof2@yourserver.yourdomain.edu',
  137 ];
  138 
  139 # Feedback subject line -- the following escape sequences are recognized:
  140 #
  141 #   %c = course ID
  142 #   %u = user ID
  143 #   %s = set ID
  144 #   %p = problem ID
  145 #   %x = section
  146 #   %r = recitation
  147 #   %% = literal percent sign
  148 #
  149 
  150 $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";
  151 
  152 # feedbackVerbosity:
  153 #  0: send only the feedback comment and context link
  154 #  1: as in 0, plus user, set, problem, and PG data
  155 #  2: as in 1, plus the problem environment (debugging data)
  156 $mail{feedbackVerbosity}     = 1;
  157 
  158 # Defines the size of the Mail Merge editor window
  159 # FIXME: should this be here? it's UI, not mail
  160 # FIXME: replace this with the auto-size method that TWiki uses
  161 $mail{editor_window_rows}    = 15;
  162 $mail{editor_window_columns} = 100;
  163 
  164 # Use this to customize the text of the feedback button.
  165 $feedback_button_name = "Email instructor";
  166 
  167 # If this value is true, feedback will only be sent to users with the same
  168 # section as the user initiating the feedback.
  169 $feedback_by_section = 0;
  170 
  171 ################################################################################
  172 # Theme
  173 ################################################################################
  174 
  175 $defaultTheme = "math";
  176 $defaultThemeTemplate = "system";
  177 
  178 ################################################################################
  179 # System-wide locations (directories and URLs)
  180 ################################################################################
  181 
  182 # The root directory, set by webwork_root variable in Apache configuration.
  183 $webworkDirs{root}          = "$webwork_dir";
  184 
  185 # Location of system-wide data files.
  186 $webworkDirs{DATA}          = "$webworkDirs{root}/DATA";
  187 
  188 # Used for temporary storage of uploaded files.
  189 $webworkDirs{uploadCache}   = "$webworkDirs{DATA}/uploads";
  190 
  191 # Location of utility programs.
  192 $webworkDirs{bin}           = "$webworkDirs{root}/bin";
  193 
  194 # Location of configuration files, templates, snippets, etc.
  195 $webworkDirs{conf}          = "$webworkDirs{root}/conf";
  196 
  197 # Location of theme templates.
  198 $webworkDirs{templates}     = "$webworkDirs{conf}/templates";
  199 
  200 # Location of course directories.
  201 $webworkDirs{courses}       = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
  202 
  203 # Contains log files.
  204 $webworkDirs{logs}          = "$webworkDirs{root}/logs";
  205 
  206 # Contains non-web-accessible temporary files, such as TeX working directories.
  207 $webworkDirs{tmp}           = "$webworkDirs{root}/tmp";
  208 
  209 # The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
  210 #   (any subdirectory of these is a valid target for a symbolic link.)
  211 # For example:
  212 #    $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
  213 $webworkDirs{valid_symlinks}   = [];
  214 
  215 ################################################################################
  216 ##### The following locations are web-accessible.
  217 ################################################################################
  218 
  219 # The root URL (usually /webwork2), set by <Location> in Apache configuration.
  220 $webworkURLs{root}          = "$webwork_url";
  221 
  222 # Location of system-wide web-accessible files, such as equation images, and
  223 # help files.
  224 $webworkDirs{htdocs}        = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs";
  225 $webworkURLs{htdocs}        = "$webwork_htdocs_url";
  226 
  227 # Location of web-accessible temporary files, such as equation images.
  228 $webworkDirs{htdocs_temp}   = "$webworkDirs{htdocs}/tmp";
  229 $webworkURLs{htdocs_temp}   = "$webworkURLs{htdocs}/tmp";
  230 
  231 # Location of cached equation images.
  232 $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
  233 $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
  234 
  235 # Contains context-sensitive help files.
  236 $webworkDirs{local_help}    = "$webworkDirs{htdocs}/helpFiles";
  237 $webworkURLs{local_help}    = "$webworkURLs{htdocs}/helpFiles";
  238 
  239 # URL of general WeBWorK documentation.
  240 $webworkURLs{docs}          = "http://webwork.maa.org";
  241 
  242 # URL of WeBWorK Bugzilla database.
  243 $webworkURLs{bugReporter}   = "http://bugs.webwork.rochester.edu/";
  244 
  245 # Location of CSS
  246 # $webworkURLs{stylesheet}    = "$webworkURLs{htdocs}/css/${defaultTheme}.css";
  247 # this is never used -- changing the theme from the config panel
  248 # doesn't appear to reset the theme in time?
  249 # It's better to refer directly to the .css file in the system.template
  250 # <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/>
  251 
  252 # Location of jsMath script, used for the jsMath display mode.
  253 $webworkURLs{jsMath}        = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js";
  254 
  255 # Location of ASCIIMathML script, used for the asciimath display mode.
  256 $webworkURLs{asciimath}     = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
  257 
  258 # Location of LaTeXMathML script, used for the LaTeXMathML display mode.
  259 $webworkURLs{LaTeXMathML}   = "$webworkURLs{htdocs}/LaTeXMathML/LaTeXMathML.js";
  260 
  261 ################################################################################
  262 # Defaults for course-specific locations (directories and URLs)
  263 ################################################################################
  264 
  265 # The root directory of the current course. (The ID of the current course is
  266 # available in $courseName.)
  267 $courseDirs{root}        = "$webworkDirs{courses}/$courseName";
  268 
  269 # Location of course-specific data files.
  270 $courseDirs{DATA}        = "$courseDirs{root}/DATA";
  271 
  272 # Location of course HTML files, passed to PG.
  273 $courseDirs{html}        = "$courseDirs{root}/html";
  274 $courseURLs{html}        = "$webwork_courses_url/$courseName";
  275 
  276 # Location of course image files, passed to PG.
  277 $courseDirs{html_images} = "$courseDirs{html}/images";
  278 
  279 # Location of web-accessible, course-specific temporary files, like static and
  280 # dynamically-generated PG graphics.
  281 $courseDirs{html_temp}   = "$courseDirs{html}/tmp";
  282 $courseURLs{html_temp}   = "$courseURLs{html}/tmp";
  283 
  284 # Location of course-specific logs, like the transaction log.
  285 $courseDirs{logs}        = "$courseDirs{root}/logs";
  286 
  287 # Location of scoring files.
  288 $courseDirs{scoring}     = "$courseDirs{root}/scoring";
  289 
  290 # Location of PG templates and set definition files.
  291 $courseDirs{templates}   = "$courseDirs{root}/templates";
  292 
  293 # Location of course-specific macro files.
  294 $courseDirs{macros}      = "$courseDirs{templates}/macros";
  295 
  296 # Location of mail-merge templates.
  297 $courseDirs{email}       = "$courseDirs{templates}/email";
  298 
  299 # Location of temporary editing files.
  300 $courseDirs{tmpEditFileDir}  = "$courseDirs{templates}/tmpEdit";
  301 
  302 # If this is set to a non-empty value (i.e. in course.conf), WeBWorK's usual
  303 # email feedback mechanism  will be replaced with a link to the given URL.
  304 # See also $feedback_button_name, above.
  305 $courseURLs{feedbackURL} = "";
  306 
  307 # mail merge status directory
  308 $courseDirs{mailmerge}   = "$courseDirs{DATA}/mailmerge";
  309 
  310 ################################################################################
  311 # System-wide files
  312 ################################################################################
  313 
  314 # Location of this file.
  315 $webworkFiles{environment}                      = "$webworkDirs{conf}/global.conf";
  316 
  317 # Flat-file database used to protect against MD5 hash collisions. TeX equations
  318 # are hashed to determine the name of the image file. There is a tiny chance of
  319 # a collision between two TeX strings. This file allows for that. However, this
  320 # is slow, so most people chose not to worry about it. Set this to "" if you
  321 # don't want to use the equation cache file.
  322 $webworkFiles{equationCacheDB}                  = ""; # "$webworkDirs{DATA}/equationcache";
  323 
  324 ################################################################################
  325 # Hardcopy snippets are used in constructing a TeX file for hardcopy output.
  326 # They should contain TeX code unless otherwise noted.
  327 ################################################################################
  328 # The preamble is the first thing in the TeX file.
  329 $webworkFiles{hardcopySnippets}{preamble}       = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
  330 
  331 # The setHeader preceeds each set. It is a PG file.
  332 $webworkFiles{hardcopySnippets}{setHeader}      = "$webworkDirs{conf}/snippets/setHeader.pg";  # hardcopySetHeader.pg",
  333 
  334 # The problem divider goes between problems.
  335 $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
  336 
  337 # The set footer goes after each set. Is is a PG file.
  338 $webworkFiles{hardcopySnippets}{setFooter}      = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";
  339 
  340 # The set divider goes between sets (in multiset output).
  341 $webworkFiles{hardcopySnippets}{setDivider}     = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";
  342 
  343 # The user divider does between users (in multiuser output).
  344 $webworkFiles{hardcopySnippets}{userDivider}    = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";
  345 
  346 # The postabmle is the last thing in the TeX file.
  347 $webworkFiles{hardcopySnippets}{postamble}      = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
  348 
  349 ##### Screen snippets are used when displaying problem sets on the screen.
  350 
  351 # The set header is displayed on the problem set page. It is a PG file.
  352 $webworkFiles{screenSnippets}{setHeader}        = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
  353 
  354 # A PG template for creation of new problems.
  355 $webworkFiles{screenSnippets}{blankProblem}    = "$webworkDirs{conf}/snippets/blankProblem2.pg"; # screenSetHeader.pg"
  356 
  357 # A site info  "message of the day" file
  358 $webworkFiles{site_info}                       = "$webworkDirs{htdocs}/site_info.txt";
  359 
  360 ################################################################################
  361 # Course-specific files
  362 ################################################################################
  363 
  364 # The course configuration file.
  365 $courseFiles{environment} = "$courseDirs{root}/course.conf";
  366 
  367 # The course simple configuration file (holds web-based configuratoin).
  368 $courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";
  369 
  370 # File contents are displayed after login, on the problem sets page. Path given
  371 # here is relative to the templates directory.
  372 $courseFiles{course_info} = "course_info.txt";
  373 
  374 # File contents are displayed on the login page. Path given here is relative to
  375 # the templates directory.
  376 $courseFiles{login_info}  = "login_info.txt";
  377 
  378 # Additional library buttons can be added to the Library Browser (SetMaker.pm)
  379 # by adding the libraries you want to the following line.  For each key=>value
  380 # in the list, if a directory (or link to a directory) with name 'key' appears
  381 # in the templates directory, then a button with name 'value' will be placed at
  382 # the top of the problem browser.  (No button will appear if there is no
  383 # directory or link with the given name in the templates directory.)  For
  384 # example,
  385 #
  386 #     $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
  387 #
  388 # would add two buttons, one for the Rochester library and one for the ASU
  389 # library, provided templates/rochester and templates/asu exists either as
  390 # subdirectories or links to other directories. The "NPL Directory" button
  391 # activated below gives access to all the directories in the National
  392 # Problem Library.
  393 #
  394 $courseFiles{problibs}    = {
  395   Library          => "NPL Directory",
  396 #   rochesterLibrary => "Rochester",
  397 #   asuLibrary       => "Arizona State",
  398 #   dcdsLibrary      => "Detroit CDS",
  399 #   dartmouthLibrary => "Dartmouth",
  400 #   indianaLibrary   => "Indiana",
  401 #   osuLibrary       => "Ohio State",
  402 #   capaLibrary      => "CAPA",
  403 };
  404 
  405 ################################################################################
  406 # Status system
  407 ################################################################################
  408 
  409 # This is the default status given to new students and students with invalid
  410 # or missing statuses.
  411 $default_status = "Enrolled";
  412 
  413 # The first abbreviation in the abbreviations list is the canonical
  414 # abbreviation, and will be used when setting the status value in a user record
  415 # or an exported classlist file.
  416 #
  417 # Results are undefined if more than one status has the same abbreviation.
  418 #
  419 # The four behaviors that are controlled by status are:
  420 #   allow_course_access   => is this user allowed to log in?
  421 #   include_in_assignment => is this user included when assigning as set to "all" users?
  422 #   include_in_stats      => is this user included in statistical reports?
  423 #   include_in_email      => is this user included in emails sent to the class?
  424 #   include_in_scoring    => is this user included in score reports?
  425 
  426 %statuses = (
  427   Enrolled => {
  428     abbrevs => [qw/ C c current enrolled /],
  429     behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /],
  430   },
  431   Audit => {
  432     abbrevs => [qw/ A a audit /],
  433     behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /],
  434   },
  435   Drop => {
  436     abbrevs => [qw/ D d drop withdraw /],
  437     behaviors => [qw/  /],
  438   },
  439   Proctor => {
  440     abbrevs => [qw/ P p proctor /],
  441     behaviors => [qw/  /],
  442   },
  443 );
  444 
  445 ################################################################################
  446 # Database options
  447 ################################################################################
  448 
  449 # these variables are used by database.conf. we define them here so that editing
  450 # database.conf isn't necessary.
  451 
  452 # required permissions
  453 # GRANT SELECT ON webwork.* TO webworkRead@localhost IDENTIFIED BY 'passwordRO';
  454 # GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'passwordRW';
  455 
  456 $database_dsn = "dbi:mysql:webwork";
  457 $database_username = "webworkWrite";
  458 $database_password = "";
  459 $database_debug = 0;
  460 
  461 # Variables for sql_moodle database layout.
  462 $moodle_dsn = "dbi:mysql:moodle";
  463 $moodle_username = $database_username;
  464 $moodle_password = $database_password;
  465 $moodle_table_prefix = "mdl_";
  466 $moodle17 = 0;
  467 
  468 # Several database are defined in the file conf/database.conf and stored in the
  469 # hash %dbLayouts.
  470 include "conf/database.conf";
  471 
  472 # Select the default database layout. This can be overridden in the course.conf
  473 # file of a particular course. The only database layout supported in WW 2.1.4
  474 # and up is "sql_single".
  475 $dbLayoutName = "sql_single";
  476 
  477 # This sets the symbol "dbLayout" as an alias for the selected database layout.
  478 *dbLayout     = $dbLayouts{$dbLayoutName};
  479 
  480 ################################################################################
  481 # Problem library options
  482 ################################################################################
  483 
  484 # For configuration instructions, see:
  485 # http://webwork.maa.org/wiki/National_Problem_Library
  486 # The directory containing the natinal problem library files. Set to "" if no problem
  487 # library is installed.
  488 $problemLibrary{root}        = "";
  489 
  490 # Problem Library version
  491 # Version 1 is in use.  Version 2 will be released soon.
  492 $problemLibrary{version} = "2";
  493 
  494 # Problem Library SQL database connection information
  495 $problemLibrary_db = {
  496         dbsource => $database_dsn,
  497         user     => $database_username,
  498         passwd   => $database_password,
  499 };
  500 
  501 ################################################################################
  502 # Logs
  503 ################################################################################
  504 
  505 # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own
  506 # top-level hash.
  507 
  508 # Logs data about how long it takes to process problems. (Do not confuse this
  509 # with the /other/ timing log which can be set by WeBWorK::Timing and is used
  510 # for benchmarking system performance in general. At some point, this timing
  511 # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
  512 $webworkFiles{logs}{timing}         = "$webworkDirs{logs}/timing.log";
  513 
  514 # Logs courses created via the web-based Course Administration module.
  515 $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log";
  516 
  517 # The transaction log contains data from each recorded answer submission. This
  518 # is useful if the database becomes corrupted.
  519 $webworkFiles{logs}{transaction}    = "$webworkDirs{logs}/${courseName}_transaction.log";
  520 
  521 # The answer log stores a history of all users' submitted answers.
  522 $courseFiles{logs}{answer_log}      = "$courseDirs{logs}/answer_log";
  523 
  524 # Log logins.
  525 $courseFiles{logs}{login_log}       = "$courseDirs{logs}/login.log";
  526 
  527 # Log for almost every click.  By default it is the empty string, which
  528 # turns this log off.  If you want it turned on, we suggest
  529 #                "$courseDirs{logs}/activity.log"
  530 # When turned on, this log can get quite large.
  531 $courseFiles{logs}{activity_log} = '';
  532 
  533 ################################################################################
  534 # Site defaults (FIXME: what other things could be "site defaults"?)
  535 ################################################################################
  536 
  537 # Set the default timezone of courses on this server. To get a list of valid
  538 # timezones, run:
  539 #
  540 #     perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'
  541 #
  542 # To get a list of valid timezone "links" (deprecated names), run:
  543 #
  544 #     perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links'
  545 #
  546 # If left blank, the system timezone will be used. This is usually what you
  547 # want. You might want to set this if your server is NOT in the same timezone as
  548 # your school. If just a few courses are in a different timezone, set this in
  549 # course.conf for the affected courses instead.
  550 #
  551 $siteDefaults{timezone} = "";
  552 
  553 # The default_templates_course is used by default to create a new course.
  554 # The contents of the templates directory are copied from this course
  555 # to the new course being created.
  556 $siteDefaults{default_templates_course} ="modelCourse";
  557 
  558 ################################################################################
  559 # Authentication system
  560 ################################################################################
  561 
  562 # FIXME This mechanism is a little awkward and probably should be merged with
  563 # the dblayout selection system somehow.
  564 
  565 # Select the authentication module to use for normal logins.
  566 #
  567 # If this value is a string, the given authentication module will be used
  568 # regardless of the database layout. If it is a hash, the database layout name
  569 # will be looked up in the hash and the resulting value will be used as the
  570 # authentication module. The special hash key "*" is used if no entry for the
  571 # current database layout is found.
  572 #
  573 $authen{user_module} = {
  574   sql_moodle => "WeBWorK::Authen::Moodle",
  575   "*" => "WeBWorK::Authen",
  576 };
  577 
  578 # Select the authentication module to use for proctor logins.
  579 #
  580 # A string or a hash is accepted, as above.
  581 #
  582 $authen{proctor_module} = "WeBWorK::Authen::Proctor";
  583 
  584 # Options for particular authentication modules
  585 
  586 $authen{moodle_options} = {
  587   dsn => $moodle_dsn,
  588   username => $moodle_username,
  589   password => $moodle_password,
  590   table_prefix => $moodle_table_prefix,
  591   moodle17 => $moodle17,
  592 };
  593 
  594 $authen{ldap_options} = {
  595   # hosts to attempt to connect to, in order. for example:
  596   #   auth.myschool.edu             -- uses LDAP scheme and port 389
  597   #   ldap://auth.myschool.edu:666  -- non-standard port
  598   #   ldaps://auth.myschool.edu     -- uses LDAPS scheme and port 636
  599   #   ldaps://auth.myschool.edu:389 -- SSL on non-SSL port
  600   net_ldap_hosts => [
  601     "ldaps://corona-dmc.its.rochester.edu",
  602     "ldaps://corona-dmb.acs.rochester.edu",
  603   ],
  604   # connection options
  605   net_ldap_options => {
  606     timeout => 30,
  607     version => 3,
  608   },
  609   # base to use when searching for user's DN
  610   net_ldap_base => "ou=people,dc=rochester,dc=edu",
  611   # If LDAP rejects password, check it against the WeBWorK password database
  612   failover => 1,
  613 };
  614 
  615 ################################################################################
  616 # Authorization system
  617 ################################################################################
  618 
  619 # this section lets you define which groups of users can perform which actions.
  620 
  621 # this hash maps a numeric permission level to the name of a role. the number
  622 # assigned to a role is significant -- roles with higher numbers are considered
  623 # "more privileged", and are included when that role is listed for a privilege
  624 # below.
  625 #
  626 %userRoles = (
  627   guest => -5,
  628   student => 0,
  629   login_proctor => 2,
  630   grade_proctor => 3,
  631   ta => 5,
  632   professor => 10,
  633 );
  634 
  635 # this hash maps operations to the roles that are allowed to perform those
  636 # operations. the role listed and any role with a higher permission level (in
  637 # the %userRoles hash) will be allowed to perform the operation. If the role
  638 # is undefined, no users will be allowed to perform the operation.
  639 #
  640 %permissionLevels = (
  641   login                          => "guest",
  642   report_bugs                    => "student",
  643   submit_feedback                => "student",
  644   change_password                => "student",
  645   change_email_address           => "student",
  646 
  647   proctor_quiz_login             => "login_proctor",
  648   proctor_quiz_grade             => "grade_proctor",
  649   view_proctored_tests           => "student",
  650   view_hidden_work               => "ta",
  651 
  652   view_multiple_sets             => "ta",
  653   view_unopened_sets             => "ta",
  654   view_unpublished_sets          => "ta",
  655   view_answers                   => "ta",
  656   view_ip_restricted_sets        => "ta",
  657 
  658   become_student                 => "professor",
  659   access_instructor_tools        => "ta",
  660   score_sets                     => "professor",
  661   send_mail                      => "professor",
  662   receive_feedback               => "ta",
  663 
  664   create_and_delete_problem_sets => "professor",
  665   assign_problem_sets            => "professor",
  666   modify_problem_sets            => "professor",
  667   modify_student_data            => "professor",
  668   modify_classlist_files         => "professor",
  669   modify_set_def_files           => "professor",
  670   modify_scoring_files           => "professor",
  671   modify_problem_template_files  => "professor",
  672   manage_course_files            => "professor",
  673 
  674   create_and_delete_courses      => "professor",
  675   fix_course_databases           => "professor",
  676 
  677   ##### Behavior of the interactive problem processor #####
  678 
  679   show_correct_answers_before_answer_date         => "ta",
  680   show_solutions_before_answer_date               => "ta",
  681   avoid_recording_answers                         => "ta",
  682   # Below this level, old answers are never initially shown
  683   can_show_old_answers_by_default                 => "student",
  684   # at this level, we look at showOldAnswers for default value
  685   # even after the due date
  686   can_always_use_show_old_answers_default         => "professor",
  687   check_answers_before_open_date                  => "ta",
  688   check_answers_after_open_date_with_attempts     => "ta",
  689   check_answers_after_open_date_without_attempts  => "guest",
  690   check_answers_after_due_date                    => "guest",
  691   check_answers_after_answer_date                 => "guest",
  692   create_new_set_version_when_acting_as_student   => undef,
  693   print_path_to_problem                           => "professor", # see "Special" PG environment variables
  694   record_set_version_answers_when_acting_as_student => undef,
  695   record_answers_when_acting_as_student           => undef,
  696   # "record_answers_when_acting_as_student" takes precedence
  697   # over the following for professors acting as students:
  698   record_answers_before_open_date                 => undef,
  699   record_answers_after_open_date_with_attempts    => "student",
  700   record_answers_after_open_date_without_attempts => undef,
  701   record_answers_after_due_date                   => undef,
  702   record_answers_after_answer_date                => undef,
  703   dont_log_past_answers                           => "professor",
  704   # does the user get to see a dump of the problem?
  705   view_problem_debugging_info                     => "ta",
  706 
  707   ##### Behavior of the Hardcopy Processor #####
  708 
  709   download_hardcopy_multiuser  => "ta",
  710   download_hardcopy_multiset   => "ta",
  711   download_hardcopy_format_pdf => "guest",
  712   download_hardcopy_format_tex => "ta",
  713 );
  714 
  715 # This is the default permission level given to new students and students with
  716 # invalid or missing permission levels.
  717 $default_permission_level = $userRoles{student};
  718 
  719 ################################################################################
  720 # Session options
  721 ################################################################################
  722 
  723 # $sessionKeyTimeout defines seconds of inactivity before a key expires
  724 $sessionKeyTimeout = 60*30;
  725 
  726 # $sessionKeyLength defines the length (in characters) of the session key
  727 $sessionKeyLength = 32;
  728 
  729 # @sessionKeyChars lists the legal session key characters
  730 @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9');
  731 
  732 # Practice users are users who's names start with $practiceUser
  733 # (you can comment this out to remove practice user support)
  734 $practiceUserPrefix = "practice";
  735 
  736 # There is a practice user who can be logged in multiple times.  He's
  737 # commented out by default, though, so you don't hurt yourself.  It is
  738 # kindof a backdoor to the practice user system, since he doesn't have a
  739 # password.  Come to think of it, why do we even have this?!
  740 #$debugPracticeUser = "practice666";
  741 
  742 # Option for gateway tests; $gatewayGracePeriod is the time in seconds
  743 # after the official due date during which we'll still grade the test
  744 $gatewayGracePeriod = 120;
  745 
  746 ################################################################################
  747 # PG subsystem options
  748 ################################################################################
  749 
  750 # List of enabled display modes. Comment out any modes you don't wish to make
  751 # available for use.
  752 $pg{displayModes} = [
  753   "plainText",     # display raw TeX for math expressions
  754   "formattedText", # format math expressions using TtH
  755   "images",        # display math expressions as images generated by dvipng
  756   "jsMath",        # render TeX math expressions on the client side using jsMath
  757   "asciimath",     # render TeX math expressions on the client side using ASCIIMathML
  758   "LaTeXMathML",   # render TeX math expressions on the client side using LaTeXMathML
  759 ];
  760 
  761 #### Default settings for the PG translator
  762 
  763 # Default display mode. Should be listed above.
  764 $pg{options}{displayMode}        = "images";
  765 
  766 # The default grader to use, if a problem doesn't specify.
  767 $pg{options}{grader}             = "avg_problem_grader";
  768 
  769 # Fill in answer blanks with the student's last answer by default?
  770 $pg{options}{showOldAnswers}     = 1;
  771 
  772 # Show correct answers (when allowed) by default?
  773 $pg{options}{showCorrectAnswers} = 0;
  774 
  775 # Show hints (when allowed) by default?
  776 $pg{options}{showHints}          = 0;
  777 
  778 # Show solutions (when allowed) by default?
  779 $pg{options}{showSolutions}      = 0;
  780 
  781 # Catch translation warnings internally by default? (We no longer need to do
  782 # this, since there is a global warnings handler. So this should be off.)
  783 $pg{options}{catchWarnings}      = 0;
  784 
  785 ##### Currently-selected renderer
  786 
  787 # Only the local renderer is supported in this version.
  788 $pg{renderer} = "WeBWorK::PG::Local";
  789 
  790 # The remote renderer connects to an XML-RPC PG rendering server.
  791 #$pg{renderer} = "WeBWorK::PG::Remote";
  792 
  793 ##### Renderer-dependent options
  794 
  795 # The remote renderer has one option:
  796 $pg{renderers}{"WeBWorK::PG::Remote"} = {
  797   # The "proxy" server to connect to for remote rendering.
  798   proxy => "http://localhost:21000/RenderD",
  799 };
  800 
  801 ##### Settings for various display modes
  802 
  803 # "images" mode has several settings:
  804 $pg{displayModeOptions}{images} = {
  805   # Determines the method used to align images in output. Can be
  806   # "baseline", "absmiddle", or "mysql".
  807   dvipng_align => 'mysql',
  808 
  809   # If mysql is chosen, this information indicates which database contains the
  810   # 'depths' table. Since 2.3.0, the depths table is kept in the main webwork
  811   # database. (If you are upgrading from an earlier version of webwork, and
  812   # used the mysql method in the past, you should move your existing 'depths'
  813   # table to the main database.)
  814   dvipng_depth_db => {
  815     dbsource => $database_dsn,
  816     user     => $database_username,
  817     passwd   => $database_password,
  818   },
  819 };
  820 
  821 $pg{displayModeOptions}{jsMath} = {
  822   reportMissingFonts => 0,       # set to 1 to allow the missing font message
  823   missingFontMessage => undef,   # set to an HTML string to replace the missing font message
  824   noImageFonts => 0,             # set to 1 if you didn't install the jsMath image fonts
  825   processDoubleClicks => 1,      # set to 0 to disable double-click on math to get TeX source
  826 };
  827 
  828 ##### Directories used by PG
  829 
  830 # The root of the PG directory tree (from pg_root in Apache config).
  831 $pg{directories}{root}   = "$pg_dir";
  832 $pg{directories}{lib}    = "$pg{directories}{root}/lib";
  833 $pg{directories}{macros} = "$pg{directories}{root}/macros";
  834 
  835 #
  836 #  The macro file search path.  Each directory in this list is seached
  837 #  (in this order) by loadMacros() when it looks for a .pl file.
  838 #
  839 $pg{directories}{macrosPath} = [
  840    ".",                     # search the problem file's directory
  841    $courseDirs{macros},
  842    $pg{directories}{macros},
  843    "$courseDirs{templates}/Library/macros/Dartmouth",
  844    "$courseDirs{templates}/Library/macros/Union",
  845    "$courseDirs{templates}/Library/macros/NAU",
  846    "$courseDirs{templates}/Library/macros/Michigan",
  847 ];
  848 
  849 # The applet search path. If a full URL is given, it is used unmodified. If an
  850 # absolute path is given, the URL of the local server is prepended to it.
  851 #
  852 # For example, if an item is "/math/applets",
  853 # and the local server is  "https://math.yourschool.edu",
  854 # then the URL "https://math.yourschool.edu/math/applets" will be used.
  855 #
  856 
  857 $pg{directories}{appletPath} = [    # paths to search for applets (requires full url)
  858   "$webworkURLs{htdocs}/applets",
  859   "$courseURLs{html}/applets",
  860 ];
  861 
  862 ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
  863 
  864 # Users for whom to print the file name of the PG file being processed.
  865 $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
  866    # ie file paths are printed for 'gage'
  867 $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} = $userRoles{ $permissionLevels{print_path_to_problem} };
  868    # (file paths are also printed for anyone with this permission or higher)
  869 
  870 # Locations of CAPA resources. (Only necessary if you need to use converted CAPA
  871 # problems.)
  872 $pg{specialPGEnvironmentVars}{CAPA_Tools}             = "$courseDirs{macros}/CAPA_Tools/",
  873 $pg{specialPGEnvironmentVars}{CAPA_MCTools}           = "$courseDirs{macros}/CAPA_MCTools/",
  874 $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
  875 $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL}      = "$courseURLs{html}/CAPA_Graphics/",
  876 
  877 # Size in pixels of dynamically-generated images, i.e. graphs.
  878 $pg{specialPGEnvironmentVars}{onTheFlyImageSize}      = 400,
  879 
  880 # To disable the Parser-based versions of num_cmp and fun_cmp, and use the
  881 # original versions instead, set this value to 1.
  882 $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0;
  883 
  884 # Strings to insert at the start and end of the body of a problem
  885 #  (at beginproblem() and ENDDOCUMENT) in various modes.  More display modes
  886 #  can be added if different behaviours are desired (e.g., HTML_dpng,
  887 #  HTML_asciimath, etc.).  These parts are not used in the Library browser.
  888 
  889 $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
  890 $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
  891 
  892 # To have the problem body indented and boxed, uncomment:
  893 
  894 # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
  895 #     <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
  896 # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
  897 #     </BLOCKQUOTE>';
  898 
  899 ##### PG modules to load
  900 
  901 # The first item of each list is the module to load. The remaining items are
  902 # additional packages to import.
  903 
  904 ${pg}{modules} = [
  905   [qw(DynaLoader)],
  906   [qw(Exporter)],
  907   [qw(GD)],
  908 
  909   [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
  910   [qw(AnswerHash AnswerEvaluator)],
  911   [qw(WWPlot)], # required by Circle (and others)
  912   [qw(Circle)],
  913   [qw(Complex)],
  914   [qw(Complex1)],
  915   [qw(Distributions)],
  916   [qw(Fraction)],
  917   [qw(Fun)],
  918   [qw(Hermite)],
  919   [qw(Label)],
  920   [qw(List)],
  921   [qw(Match)],
  922   [qw(MatrixReal1)], # required by Matrix
  923   [qw(Matrix)],
  924   [qw(Multiple)],
  925   [qw(PGrandom)],
  926   [qw(Regression)],
  927   [qw(Select)],
  928   [qw(Units)],
  929   [qw(VectorField)],
  930   [qw(Parser Value)],
  931   [qw(Parser::Legacy)],
  932 # [qw(SaveFile)],
  933 #   [qw(Chromatic)], # for Northern Arizona graph problems
  934 #                    #  -- follow instructions at libraries/nau_problib/lib/README to install
  935   [qw(Applet FlashApplet JavaApplet)],
  936 ];
  937 
  938 ##### Answer evaluatior defaults
  939 
  940 $pg{ansEvalDefaults} = {
  941   functAbsTolDefault            => .001,
  942   functLLimitDefault            => .0000001,
  943   functMaxConstantOfIntegration => 1E8,
  944   functNumOfPoints              => 3,
  945   functRelPercentTolDefault     => .1,
  946   functULimitDefault            => .9999999,
  947   functVarDefault               => "x",
  948   functZeroLevelDefault         => 1E-14,
  949   functZeroLevelTolDefault      => 1E-12,
  950   numAbsTolDefault              => .001,
  951   numFormatDefault              => "",
  952   numRelPercentTolDefault       => .1,
  953   numZeroLevelDefault           => 1E-14,
  954   numZeroLevelTolDefault        => 1E-12,
  955   useBaseTenLog                 => 0,
  956   defaultDisplayMatrixStyle     => "[s]",
  957 };
  958 
  959 ################################################################################
  960 # Compatibility
  961 ################################################################################
  962 
  963 # Define the old names for the various "root" variables.
  964 $webworkRoot    = $webworkDirs{root};
  965 $webworkURLRoot = $webworkURLs{root};
  966 $pgRoot         = $pg{directories}{root};
  967 

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9