--- trunk/webwork-modperl/conf/global.conf.dist 2004/10/22 18:03:14 2954 +++ trunk/webwork-modperl/conf/global.conf.dist 2005/10/10 22:02:22 3697 @@ -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.110 2004/10/20 17:00:46 sh002i Exp $ +# $CVSHeader: webwork2/conf/global.conf.dist,v 1.147 2005/10/08 21:56:46 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 @@ -28,7 +28,7 @@ ################################################################################ # Set these variables to correspond to your configuration and preferences. You -# will need to restart the webserver to reset the variables in this section +# will need to restart the webserver to reset the variables in this section. # URL of WeBWorK handler. $webwork_url = "/webwork2"; @@ -48,13 +48,37 @@ # Paths to external programs ################################################################################ +# system utilties $externalPrograms{mkdir} = "/bin/mkdir"; -$externalPrograms{mysql} = "/usr/local/bin/mysql"; +$externalPrograms{mv} = "/bin/mv"; +$externalPrograms{mysql} = "/usr/bin/mysql"; +$externalPrograms{tar} = "/usr/bin/tar"; + +# equation rendering/hardcopy utiltiies +$externalPrograms{latex} = "/usr/bin/latex"; +$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --shell-escape allows pdflatex to handle .eps files +$externalPrograms{dvipng} = "/usr/bin/dvipng"; +$externalPrograms{tth} = "/usr/bin/tth"; + +# NetPBM - basic image manipulation utilities +# most sites only need to configure $netpbm_prefix. +my $netpbm_prefix = "/usr/bin"; +$externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; +$externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; +$externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; +$externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; +$externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; -$externalPrograms{latex} = "/usr/local/bin/latex"; -$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files -$externalPrograms{dvipng} = "/usr/local/bin/dvipng"; -$externalPrograms{tth} = "/usr/local/bin/tth"; +# image conversions utiltiies +# the source file is given on stdin, and the output expected on stdout. +# +# Note on conversions pipelines: +# we used to use `pnmdepth 1' instead of ppmtopgm as it creates a +# monochrome image (1 bit) rather than a greyscale image (8 bits). +# However, this was causing improper display of some sort in PDFs. +$externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; +$externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; +$externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; ################################################################################ # Mail settings @@ -69,7 +93,7 @@ # message. It can really be anything, but some mail servers require it contain # a valid mail domain, or at least be well-formed. $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; - + # AllowedRecipients defines addresses that the PG system is allowed to send mail # to. this prevents subtle PG exploits. This should be set in course.conf to the # addresses of professors of each course. Sending mail from the PG system (i.e. @@ -79,22 +103,44 @@ #'prof1@yourserver.yourdomain.edu', #'prof2@yourserver.yourdomain.edu', ]; - -# If defined, feedbackRecipients overrides the list of recipients for feedback -# 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', -#]; - + +# By default, feeback is sent to all users who have permission to +# receive_feedback. If this list is non-empty, feedback is also sent to the +# addresses specified here. +# +# * If you want to disable feedback altogether, leave this empty and set +# submit_feeback => $nobody in %permissionLevels below. This will cause the +# feedback button to go away as well. +# +# * If you want to send email ONLY to addresses in this list, set +# receive_feedback => $nobody in %permissionLevels below. +# +# It's often useful to set this in the course.conf to change the behavior of +# feedback for a specific course. +# +$mail{feedbackRecipients} = [ + #'prof1@yourserver.yourdomain.edu', + #'prof2@yourserver.yourdomain.edu', +]; + +# Feedback subject line -- the following escape sequences are recognized: +# +# %c = course ID +# %u = user ID +# %s = set ID +# %p = problem ID +# %x = section +# %r = recitation +# %% = literal percent sign +# +$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r"; + # feedbackVerbosity: # 0: send only the feedback comment and context link # 1: as in 0, plus user, set, problem, and PG data # 2: as in 1, plus the problem environment (debugging data) $mail{feedbackVerbosity} = 1; - + # Defines the size of the Mail Merge editor window # FIXME: should this be here? it's UI, not mail # FIXME: replace this with the auto-size method that TWiki uses @@ -129,6 +175,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. @@ -162,8 +214,11 @@ # URL of WeBWorK Bugzilla database. $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"; +$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; # Location of ASCIIMathML script, used for the asciimath display mode. $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; @@ -252,6 +307,12 @@ # 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{conf}/snippets/site_info.txt"; + ################################################################################ # Course-specific files ################################################################################ @@ -259,6 +320,9 @@ # The course configuration file. $courseFiles{environment} = "$courseDirs{root}/course.conf"; +# The course simple configuration file (holds web-based configuratoin). +$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf"; + # File contents are displayed after login, on the problem sets page. Path given # here is relative to the templates directory. $courseFiles{course_info} = "course_info.txt"; @@ -317,6 +381,10 @@ # library is installed. $problemLibrary{root} = ""; +# Problem Library version +# Version 1 is in use. Version 2 will be released soon. +$problemLibrary{version} = "1"; + # The name of the SQL database containing problem metadata $problemLibrary{sourceSQL} = "ProblemLibrary"; @@ -349,35 +417,19 @@ # The answer log stores a history of all users' submitted answers. $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; -################################################################################ -# More paths to external programs -################################################################################ +# Log logins. +$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; -# These image conversion utilities are included in the WeBWorK distribution. -$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps"; -$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps"; -$externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png"; +# Log for almost every click. By default it is the empty string, which +# turns this log off. If you want it turned on, we suggest +# "$courseDirs{logs}/activity.log" +# When turned on, this log can get quite large. +$courseFiles{logs}{activity_log} = ''; ################################################################################ # Site defaults (FIXME: what other things could be "site defaults"?) ################################################################################ -# Status strings -- lists valid status values and their names. If your site uses -# 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: # @@ -394,82 +446,146 @@ # $siteDefaults{timezone} = ""; +# The default_templates_course is used by default to create a new course. +# The contents of the templates directory are copied from this course +# to the new course being created. +$siteDefaults{default_templates_course} ="modelCourse"; + ################################################################################ # Frontend options ################################################################################ %templates = ( system => "$webworkDirs{conf}/templates/ur.template", + gateway => "$webworkDirs{conf}/templates/gw.template", ); ################################################################################ # Authorization system ################################################################################ -# 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). - -my $student = 0; -my $ta = 5; -my $professor = 10; -my $nobody = undef; +# this section lets you define which groups of users can perform which actions. + +# this hash maps a numeric permission level to the name of a role. the number +# assigned to a role is significant -- roles with higher numbers are considered +# "more privileged", and are included when that role is listed for a privilege +# below. +# +%userRoles = ( + guest => -5, + student => 0, + proctor => 2, + ta => 5, + professor => 10, +); +# this hash maps operations to the roles that are allowed to perform those +# operations. the role listed and any role with a higher permission level (in +# the %userRoles hash) will be allowed to perform the operation. If the role +# is undefined, no users will be allowed to perform the operation. +# %permissionLevels = ( - report_bugs => $student, - submit_feedback => $student, - change_password => $student, - change_email_address => $student, - - view_multiple_sets => $ta, - view_unopened_sets => $ta, - view_unpublished_sets => $ta, - view_answers => $ta, - - become_student => $professor, - access_instructor_tools => $ta, - score_sets => $professor, - send_mail => $professor, - receive_feedback => $ta, + 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", + view_unpublished_sets => "ta", + view_answers => "ta", + + become_student => "professor", + 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", + modify_problem_template_files => "professor", + manage_course_files => "professor", - 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, - modify_problem_template_files => $professor, - - create_and_delete_courses => $professor, - fix_course_databases => $professor, + create_and_delete_courses => "professor", + fix_course_databases => "professor", ##### Behavior of the interactive problem processor ##### - 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, - record_answers_when_acting_as_student => $nobody, + show_correct_answers_before_answer_date => "ta", + show_solutions_before_answer_date => "ta", + avoid_recording_answers => "ta", + # Below this level, old answers are never initially shown + can_show_old_answers_by_default => "student", + # at this level, we look at showOldAnswers for default value + # even after the due date + can_always_use_show_old_answers_default => "professor", + check_answers_before_open_date => "ta", + check_answers_after_open_date_with_attempts => "ta", + 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 => undef, # "record_answers_when_acting_as_student" takes precedence # over the following for professors acting as students: - record_answers_before_open_date => $nobody, - record_answers_after_open_date_with_attempts => $student, - 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, + record_answers_before_open_date => undef, + record_answers_after_open_date_with_attempts => "student", + record_answers_after_open_date_without_attempts => undef, + record_answers_after_due_date => undef, + record_answers_after_answer_date => undef, + dont_log_past_answers => "professor", ##### Behavior of the Hardcopy Processor ##### - download_hardcopy_multiuser => $ta, - download_hardcopy_multiset => $ta, - download_hardcopy_format_tex => $ta, + download_hardcopy_multiuser => "ta", + download_hardcopy_multiset => "ta", + download_hardcopy_format_pdf => "guest", + download_hardcopy_format_tex => "ta", +); + +################################################################################ +# Status system +################################################################################ + +# This is the default status given to new students and students with invalid +# or missing statuses. +$default_status = "Enrolled"; + +# The first abbreviation in the abbreviations list is the canonical +# abbreviation, and will be used when setting the status value in a user record +# or an exported classlist file. +# +# Results are undefined if more than one status has the same abbreviation. +# +# The four behaviors that are controlled by status are: +# allow_course_access => is this user allowed to log in? +# include_in_assignment => is this user included when assigning as set to "all" users? +# include_in_stats => is this user included in statistical reports? +# include_in_email => is this user included in emails sent to the class? +# include_in_scoring => is this user included in score reports? + +%statuses = ( + Enrolled => { + abbrevs => [qw/ C c current enrolled /], + behaviors => [qw/ allow_course_access include_in_assignment include_in_stats + include_in_email include_in_scoring /], + }, + Audit => { + abbrevs => [qw/ A a audit /], + behaviors => [qw/ allow_course_access include_in_assignment include_in_stats + include_in_email /], + }, + Drop => { + abbrevs => [qw/ D d drop withdraw /], + behaviors => [qw/ /], + }, ); ################################################################################ @@ -576,6 +692,12 @@ }, }; +$pg{displayModeOptions}{jsMath} = { + 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 +}; + ##### Directories used by PG # The root of the PG directory tree (from pg_root in Apache config). @@ -583,6 +705,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. @@ -597,6 +729,25 @@ # 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; + +# Strings to insert at the start and end of the body of a problem +# (at beginproblem() and ENDDOCUMENT) in various modes. More display modes +# can be added if different behaviours are desired (e.g., HTML_dpng, +# HTML_asciimath, etc.). These parts are not used in the Library browser. + +$pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; +$pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; + +# To have the problem body indented and boxed, uncomment: + +# $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '
+#
'; +# $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '
+#
'; ##### PG modules to load @@ -608,7 +759,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)], @@ -630,6 +781,7 @@ [qw(Units)], [qw(VectorField)], [qw(Parser Value)], + [qw(Parser::Legacy)], [qw(Apache::Log)], ];