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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6349 - (download) (annotate)
Sat Jul 10 13:09:43 2010 UTC (2 years, 10 months ago) by gage
File size: 42273 byte(s)
added CanvaList.pm and ChoiceList.pm 

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

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9