--- trunk/webwork-modperl/conf/global.conf.dist 2005/10/10 22:02:22 3697 +++ trunk/webwork-modperl/conf/global.conf.dist 2006/09/11 20:33:27 4485 @@ -1,8 +1,8 @@ #!perl ################################################################################ # WeBWorK Online Homework Delivery System -# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/conf/global.conf.dist,v 1.147 2005/10/08 21:56:46 sh002i Exp $ +# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ +# $CVSHeader: webwork2/conf/global.conf.dist,v 1.177 2006/09/08 19:53:21 sh002i Exp $ # # This program is free software; you can redistribute it and/or modify it under # the terms of either: (a) the GNU General Public License as published by the @@ -34,7 +34,7 @@ $webwork_url = "/webwork2"; # Root directory of PG. -$pg_dir = "/opt/pg"; +$pg_dir = "/opt/webwork/pg"; # URL and path to htdocs directory. $webwork_htdocs_url = "/webwork2_files"; @@ -42,7 +42,7 @@ # URL and path to courses directory. $webwork_courses_url = "/webwork2_course_files"; -$webwork_courses_dir = "$webwork_dir/courses"; +$webwork_courses_dir = "/opt/webwork/courses"; ################################################################################ # Paths to external programs @@ -69,6 +69,9 @@ $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; +# url checker +$externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head " + # image conversions utiltiies # the source file is given on stdin, and the output expected on stdout. # @@ -118,6 +121,11 @@ # It's often useful to set this in the course.conf to change the behavior of # feedback for a specific course. # +# Items in this list may be bare addresses, or RFC822 mailboxes, like: +# 'Joe User ' +# The advantage of this form is that the resulting email will include the name +# of the recipient in the "To" field of the email. +# $mail{feedbackRecipients} = [ #'prof1@yourserver.yourdomain.edu', #'prof2@yourserver.yourdomain.edu', @@ -166,6 +174,9 @@ # Location of configuration files, templates, snippets, etc. $webworkDirs{conf} = "$webworkDirs{root}/conf"; +# Location of theme templates. +$webworkDirs{templates} = "$webworkDirs{conf}/templates"; + # Location of course directories. $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; @@ -206,11 +217,6 @@ # URL of general WeBWorK documentation. $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; -# URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages. -# Note that both systems must share a single "courses" directory for this to be -# useful. Leave this blank to disable -$webworkURLs{oldProf} = "/webwork1/profLogin.pl"; - # URL of WeBWorK Bugzilla database. $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; @@ -223,6 +229,9 @@ # Location of ASCIIMathML script, used for the asciimath display mode. $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; +# Location of LaTeXMathML script, used for the LaTeXMathML display mode. +$webworkURLs{LaTeXMathML} = "$webworkURLs{htdocs}/LaTeXMathML/LaTeXMathML.js"; + ################################################################################ # Defaults for course-specific locations (directories and URLs) ################################################################################ @@ -231,12 +240,9 @@ # available in $courseName.) $courseDirs{root} = "$webworkDirs{courses}/$courseName"; -# Location of course-specific data files, such as WW1 (GDBM) database files. +# Location of course-specific data files. $courseDirs{DATA} = "$courseDirs{root}/DATA"; -# Location of authentication data files when using a WW1 (GDBM) database. -$courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; - # Location of course HTML files, passed to PG. $courseDirs{html} = "$courseDirs{root}/html"; $courseURLs{html} = "$webwork_courses_url/$courseName"; @@ -264,6 +270,9 @@ # Location of mail-merge templates. $courseDirs{email} = "$courseDirs{templates}/email"; +# Location of temporary editing files. +$courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit"; + ################################################################################ # System-wide files ################################################################################ @@ -311,7 +320,7 @@ $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" # A site info "message of the day" file -$webworkFiles{site_info} = "$webworkDirs{conf}/snippets/site_info.txt"; +$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; ################################################################################ # Course-specific files @@ -359,16 +368,27 @@ # Database options ################################################################################ +# these variables are used by database.conf. we define them here so that editing +# database.conf isn't necessary. +$database_dsn = "dbi:mysql:webwork"; +$database_username = "webworkWrite"; +$database_password = ""; +$database_debug = 0; + +# Variables for sql_moodle database layout. +$moodle_dsn = "dbi:mysql:moodle"; +$moodle_table_prefix = "mdl_"; +$moodle_username = $database_username; +$moodle_password = $database_password; + # Several database are defined in the file conf/database.conf and stored in the # hash %dbLayouts. include "conf/database.conf"; # Select the default database layout. This can be overridden in the course.conf -# file of a particular course. If you choose "gdbm", WeBWorK will be able to -# use courses from WeBWorK 1 without first adding course.conf files to them. -# However, the recommended database layout for new courses is "sql_single". This -# can be set when creating a course. -$dbLayoutName = "sql_single"; # or "gdbm" or "sql" +# file of a particular course. The only database layout supported in WW 2.1.4 +# and up is "sql_single". +$dbLayoutName = "sql_single"; # This sets the symbol "dbLayout" as an alias for the selected database layout. *dbLayout = $dbLayouts{$dbLayoutName}; @@ -377,22 +397,25 @@ # Problem library options ################################################################################ +# For configuration instructions, see: +# http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/DatabaseProblemLibrary + # The directory containing the problem library files. Set to "" if no problem # library is installed. $problemLibrary{root} = ""; # Problem Library version # Version 1 is in use. Version 2 will be released soon. -$problemLibrary{version} = "1"; +$problemLibrary{version} = "2"; # The name of the SQL database containing problem metadata $problemLibrary{sourceSQL} = "ProblemLibrary"; # The user name to use when connecting to the problem library database -$problemLibrary{userSQL} = "webworkRead"; +$problemLibrary{userSQL} = $database_username; # The password to use when connecting to the problem library database -$problemLibrary{passwordSQL} = ""; +$problemLibrary{passwordSQL} = $database_password; ################################################################################ # Logs @@ -452,13 +475,60 @@ $siteDefaults{default_templates_course} ="modelCourse"; ################################################################################ -# Frontend options +# Theme ################################################################################ -%templates = ( - system => "$webworkDirs{conf}/templates/ur.template", - gateway => "$webworkDirs{conf}/templates/gw.template", -); +$defaultTheme = "math"; +$defaultThemeTemplate = "system"; + +################################################################################ +# Authentication system +################################################################################ + +# FIXME This mechanism is a little awkward and probably should be merged with +# the dblayout selection system somehow. + +# Select the authentication module to use for normal logins. +# +# If this value is a string, the given authentication module will be used +# regardless of the database layout. If it is a hash, the database layout name +# will be looked up in the hash and the resulting value will be used as the +# authentication module. The special hash key "*" is used if no entry for the +# current database layout is found. +# +$authen{user_module} = { + sql_moodle => "WeBWorK::Authen::Moodle", + "*" => "WeBWorK::Authen", +}; + +# Select the authentication module to use for proctor logins. +# +# A string or a hash is accepted, as above. +# +$authen{proctor_module} = "WeBWorK::Authen::Proctor"; + +# Options for particular authentication modules + +$authen{ldap_options} = { + # hosts to attempt to connect to, in order. for example: + # auth.myschool.edu -- uses LDAP scheme and port 389 + # ldap://auth.myschool.edu:666 -- non-standard port + # ldaps://auth.myschool.edu -- uses LDAPS scheme and port 636 + # ldaps://auth.myschool.edu:389 -- SSL on non-SSL port + net_ldap_hosts => [ + "ldaps://corona-dmc.its.rochester.edu", + "ldaps://corona-dmb.acs.rochester.edu", + ], + # connection options + net_ldap_options => { + timeout => 30, + version => 3, + }, + # base to use when searching for user's DN + net_ldap_base => "ou=people,dc=rochester,dc=edu", + # If LDAP rejects password, check it against the WeBWorK password database + failover => 1, +}; ################################################################################ # Authorization system @@ -492,6 +562,7 @@ change_email_address => "student", proctor_quiz => "proctor", + view_proctored_tests => "ta", view_multiple_sets => "ta", view_unopened_sets => "ta", @@ -541,6 +612,8 @@ record_answers_after_due_date => undef, record_answers_after_answer_date => undef, dont_log_past_answers => "professor", + # does the user get to see a dump of the problem? + view_problem_debugging_info => "ta", ##### Behavior of the Hardcopy Processor ##### @@ -550,6 +623,10 @@ download_hardcopy_format_tex => "ta", ); +# This is the default permission level given to new students and students with +# invalid or missing permission levels. +$default_permission_level = $userRoles{student}; + ################################################################################ # Status system ################################################################################ @@ -596,10 +673,10 @@ $sessionKeyTimeout = 60*30; # $sessionKeyLength defines the length (in characters) of the session key -$sessionKeyLength = 40; +$sessionKeyLength = 32; # @sessionKeyChars lists the legal session key characters -@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); +@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); # Practice users are users who's names start with $practiceUser # (you can comment this out to remove practice user support) @@ -611,6 +688,10 @@ # password. Come to think of it, why do we even have this?! #$debugPracticeUser = "practice666"; +# Option for gateway tests; $gatewayGracePeriod is the time in seconds +# after the official due date during which we'll still grade the test +$gatewayGracePeriod = 120; + ################################################################################ # PG subsystem options ################################################################################ @@ -623,6 +704,7 @@ "images", # display math expressions as images generated by dvipng "jsMath", # render TeX math expressions on the client side using jsMath "asciimath", # render TeX math expressions on the client side using ASCIIMathML + "LaTeXMathML", # render TeX math expressions on the client side using LaTeXMathML ]; #### Default settings for the PG translator @@ -671,24 +753,17 @@ $pg{displayModeOptions}{images} = { # Determines the method used to align images in output. Can be # "baseline", "absmiddle", or "mysql". - dvipng_align => 'baseline', + dvipng_align => 'mysql', - # If we choose mysql, we need information on connecting to the - # database. Whatever you use here, you have to create the database - # and grant read/write priveleges to the user listed here. To create - # the database in mysql, as root use: - # - # CREATE DATABASE DvipngDepths; - # USE DvipngDepths; - # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); - # GRANT ALL ON DvipngDepths.* TO webworkWrite; - # - # In the last statement, "webworkWrite" should match the user below. - # FIXME: this database can become a table in the 'webwork' database + # If mysql is chosen, this information indicates which database contains the + # 'depths' table. Since 2.3.0, the depths table is kept in the main webwork + # database. (If you are upgrading from an earlier version of webwork, and + # used the mysql method in the past, you should move your existing 'depths' + # table to the main database.) dvipng_depth_db => { - dbsource => 'dbi:mysql:DvipngDepths', - user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, - passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, + dbsource => $database_dsn, + user => $database_username, + passwd => $database_password, }, }; @@ -696,6 +771,7 @@ reportMissingFonts => 0, # set to 1 to allow the missing font message missingFontMessage => undef, # set to an HTML string to replace the missing font message noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts + processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source }; ##### Directories used by PG @@ -715,6 +791,18 @@ $pg{directories}{macros}, ]; +# The applet search path. If a full URL is given, it is used unmodified. If an +# absolute path is given, the URL of the local server is prepended to it. +# +# For example, if an item is "/math/applets", +# and the local server is "https://math.yourschool.edu", +# then the URL "https://math.yourschool.edu/math/applets" will be used. +# +$pg{directories}{appletPath} = [ # paths to search for applets (requires full url) + "$webworkURLs{htdocs}/applets", + "$courseURLs{html}/applets", +]; + ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) # Users for whom to print the file name of the PG file being processed. @@ -730,9 +818,9 @@ # Size in pixels of dynamically-generated images, i.e. graphs. $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, -# To activate Parser-based versions of num_cmp and fun_cmp, change this -# value to 0. -$pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1; +# To disable the Parser-based versions of num_cmp and fun_cmp, and use the +# original versions instead, set this value to 1. +$pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; # Strings to insert at the start and end of the body of a problem # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes @@ -782,7 +870,6 @@ [qw(VectorField)], [qw(Parser Value)], [qw(Parser::Legacy)], - [qw(Apache::Log)], ]; ##### Answer evaluatior defaults