--- trunk/webwork2/conf/global.conf.dist 2004/07/15 21:22:42 2515 +++ trunk/webwork2/conf/global.conf.dist 2005/07/19 17:22:53 3389 @@ -2,7 +2,7 @@ ################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/conf/global.conf.dist,v 1.91 2004/07/13 04:24:37 sh002i Exp $ +# $CVSHeader: webwork2/conf/global.conf.dist,v 1.123 2005/07/14 14:30:19 glarose 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 @@ -27,13 +27,14 @@ # Seed variables ################################################################################ -# Set these variables to correspond to your configuration and preferences. +# Set these variables to correspond to your configuration and preferences. You +# will need to restart the webserver to reset the variables in this section. # URL of WeBWorK handler. $webwork_url = "/webwork2"; # Root directory of PG. -$pg_dir = "/home/sh002i/work/pg"; +$pg_dir = "/opt/pg"; # URL and path to htdocs directory. $webwork_htdocs_url = "/webwork2_files"; @@ -48,12 +49,15 @@ ################################################################################ $externalPrograms{mkdir} = "/bin/mkdir"; -$externalPrograms{mysql} = "/usr/local/bin/mysql"; +$externalPrograms{mv} = "/bin/mv"; +$externalPrograms{mysql} = "/usr/bin/mysql"; -$externalPrograms{latex} = "/usr/local/bin/latex"; -$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex"; -$externalPrograms{dvipng} = "/usr/local/bin/dvipng"; -$externalPrograms{tth} = "/usr/local/bin/tth"; +$externalPrograms{latex} = "/usr/bin/latex"; +$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files +$externalPrograms{dvipng} = "/usr/bin/dvipng"; +$externalPrograms{tth} = "/usr/bin/tth"; + +$externalPrograms{tar} = "/usr/bin/tar"; ################################################################################ # Mail settings @@ -83,10 +87,10 @@ # email. It's appropriate to set this in the course.conf for specific courses, # but probably not in global.conf. if not defined, mail is sent to all # professors and TAs for a given course -$mail{feedbackRecipients} = [ - #'prof1@yourserver.yourdomain.edu', - #'prof2@yourserver.yourdomain.edu', -]; +#$mail{feedbackRecipients} = [ +# 'prof1@yourserver.yourdomain.edu', +# 'prof2@yourserver.yourdomain.edu', +#]; # feedbackVerbosity: # 0: send only the feedback comment and context link @@ -128,6 +132,12 @@ # Contains non-web-accessible temporary files, such as TeX working directories. $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; +# The (absolute) destinations of symbolic links that are OK for the FileManager to follow. +# (any subdirectory of these is a valid target for a symbolic link.) +# For example: +# $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"]; +$webworkDirs{valid_symlinks} = []; + ##### The following locations are web-accessible. # The root URL (usually /webwork2), set by in Apache configuration. @@ -159,7 +169,10 @@ $webworkURLs{oldProf} = "/webwork1/profLogin.pl"; # URL of WeBWorK Bugzilla database. -$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl"; +$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; + +# Location of CSS +$webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; # Location of jsMath script, used for the jsMath display mode. $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js"; @@ -251,6 +264,11 @@ # The set header is displayed on the problem set page. It is a PG file. $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" +# A PG template for creation of new problems. +$webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" + +# A site info "message of the day" file +$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; ################################################################################ # Course-specific files ################################################################################ @@ -277,12 +295,36 @@ # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; # # would add two buttons, one for the Rochester library and one for the ASU -# library, provided templates/rochester and templates/asu exists. +# library, provided templates/rochester and templates/asu exists either as +# subdirectories or links to other directories. # -$courseFiles{problibs} = {}; +$courseFiles{problibs} = { +# rochesterLibrary => "Rochester", +# asuLibrary => "Arizona State", +# dcdsLibrary => "Detroit CDS", +# dartmouthLibrary => "Dartmouth", +# indianaLibrary => "Indiana", +# osuLibrary => "Ohio State", +# capaLibrary => "CAPA", +}; ################################################################################ -# Database options +# Database options (WWDBv3) +################################################################################ + +# The four arguments passed to the DBI::connect() method. See the DBI manual for +# more information. +$wwdbv3_settings{dsn} = "dbi:mysql:wwdbv3"; +$wwdbv3_settings{user} = "wwdbv3"; +$wwdbv3_settings{pass} = "xyzzy"; +$wwdbv3_settings{attr} = {}; + +# WWDBv3 needs a lock file to prevent concurrent database upgrades. The file +# will be locked with flock(). +$wwdbv3_settings{upgrade_lock} = "$webworkDirs{tmp}/wwdbv3_upgrade.lock"; + +################################################################################ +# Database options (WWDBv2) ################################################################################ # Several database are defined in the file conf/database.conf and stored in the @@ -292,9 +334,9 @@ # 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". This can -# be set when creating a course. -$dbLayoutName = "sql"; # or "gdbm"; +# 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" # This sets the symbol "dbLayout" as an alias for the selected database layout. *dbLayout = $dbLayouts{$dbLayoutName}; @@ -329,6 +371,9 @@ # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; +# Logs courses created via the web-based Course Administration module. +$webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; + # The transaction log contains data from each recorded answer submission. This # is useful if the database becomes corrupted. $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; @@ -336,6 +381,9 @@ # The answer log stores a history of all users' submitted answers. $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; +# Log logins. +$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; + ################################################################################ # More paths to external programs ################################################################################ @@ -353,21 +401,41 @@ # additional values, add them here. $siteDefaults{status} = { A => "Audit", + a => "Audit", audit => "Audit", D => "Drop", + d => "Drop", drop => "Drop", withdraw => "Drop", C => "Enrolled", + c => "Enrolled", current => "Enrolled", enrolled => "Enrolled", }; +# Set the default timezone of courses on this server. To get a list of valid +# timezones, run: +# +# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' +# +# To get a list of valid timezone "links" (deprecated names), run: +# +# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' +# +# If left blank, the system timezone will be used. This is usually what you +# want. You might want to set this if your server is NOT in the same timezone as +# your school. If just a few courses are in a different timezone, set this in +# course.conf for the affected courses instead. +# +$siteDefaults{timezone} = ""; + ################################################################################ # Frontend options ################################################################################ %templates = ( system => "$webworkDirs{conf}/templates/ur.template", + gateway => "$webworkDirs{conf}/templates/gw.template", ); ################################################################################ @@ -375,17 +443,25 @@ ################################################################################ # This lets you specify a minimum permission level needed to perform certain -# actions. In the current system, >=10 will allow a professor to perform the -# action, >=5 will allow a TA to, and >=0 will allow a student to perform an -# action (almost never what you want). +# actions. For each pair in the hash below, in order to perform the action +# described by the key, the user must have a permission level greater than or +# equal to the value. +my $guest = -1; my $student = 0; +my $proctor = 2; my $ta = 5; my $professor = 10; my $nobody = undef; %permissionLevels = ( + login => $guest, report_bugs => $student, + submit_feedback => $student, + change_password => $student, + change_email_address => $student, + + proctor_quiz => $proctor, view_multiple_sets => $ta, view_unopened_sets => $ta, @@ -396,12 +472,12 @@ access_instructor_tools => $ta, score_sets => $professor, send_mail => $professor, + receive_feedback => $ta, create_and_delete_problem_sets => $professor, assign_problem_sets => $professor, modify_problem_sets => $professor, modify_student_data => $professor, - modify_classlist_files => $professor, modify_set_def_files => $professor, modify_scoring_files => $professor, @@ -415,15 +491,12 @@ show_correct_answers_before_answer_date => $ta, show_solutions_before_answer_date => $ta, avoid_recording_answers => $ta, - check_answers_before_open_date => $ta, check_answers_after_open_date_with_attempts => $ta, - check_answers_after_open_date_without_attempts => $student, - check_answers_after_due_date => $student, - check_answers_after_answer_date => $student, - + check_answers_after_open_date_without_attempts => $guest, + check_answers_after_due_date => $guest, + check_answers_after_answer_date => $guest, record_answers_when_acting_as_student => $nobody, - # "record_answers_when_acting_as_student" takes precedence # over the following for professors acting as students: record_answers_before_open_date => $nobody, @@ -431,6 +504,13 @@ record_answers_after_open_date_without_attempts => $nobody, record_answers_after_due_date => $nobody, record_answers_after_answer_date => $nobody, + dont_log_past_answers => $professor, + + ##### Behavior of the Hardcopy Processor ##### + + download_hardcopy_multiuser => $ta, + download_hardcopy_multiset => $ta, + download_hardcopy_format_tex => $ta, ); ################################################################################ @@ -500,7 +580,7 @@ $pg{renderer} = "WeBWorK::PG::Local"; # The remote renderer connects to an XML-RPC PG rendering server. -#$pg{renderer} = "WeBWorK::PG::Remote"' +#$pg{renderer} = "WeBWorK::PG::Remote"; ##### Renderer-dependent options @@ -529,6 +609,7 @@ # 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 dvipng_depth_db => { dbsource => 'dbi:mysql:DvipngDepths', user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, @@ -536,6 +617,11 @@ }, }; +$pg{displayModeOptions}{jsMath} = { + reportMissingFonts => 1, # set to 0 to prevent the missing font message + missingFontMessage => undef, # set to an HTML string to use for the missing font message +}; + ##### Directories used by PG # The root of the PG directory tree (from pg_root in Apache config). @@ -543,6 +629,16 @@ $pg{directories}{lib} = "$pg{directories}{root}/lib"; $pg{directories}{macros} = "$pg{directories}{root}/macros"; +# +# The macro file search path. Each directory in this list is seached +# (in this order) by loadMacros() when it looks for a .pl file. +# +$pg{directories}{macrosPath} = [ + ".", # search the problem file's directory + $courseDirs{macros}, + $pg{directories}{macros}, +]; + ##### "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. @@ -568,7 +664,7 @@ [qw(Exporter)], [qw(GD)], - [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], + [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)], [qw(AnswerHash AnswerEvaluator)], [qw(WWPlot)], # required by Circle (and others) [qw(Circle)], @@ -589,6 +685,8 @@ [qw(Select)], [qw(Units)], [qw(VectorField)], + [qw(Parser Value)], + [qw(Apache::Log)], ]; ##### Answer evaluatior defaults