[system] / trunk / webwork-modperl / conf / global.conf.dist Repository:
ViewVC logotype

View of /trunk/webwork-modperl/conf/global.conf.dist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6273 - (download) (annotate)
Thu May 20 12:48:22 2010 UTC (3 years, 1 month ago) by apizer
File size: 42192 byte(s)
remoed path to HughesHallett macros (this was redundant --- they are also under Michigan)

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9