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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2431 - (download) (annotate)
Thu Jul 1 20:31:13 2004 UTC (8 years, 10 months ago) by dpvc
File size: 15355 byte(s)
Provide mechanism for adding extra problem library buttons
to the Library Browser.

These changes allow you to specify (via course.conf or global.conf)
that certain subdirectories of the templates directory are to have
separate buttons in the top panel of the Set Maker.  These buttons
only appear if the directories actually exist, and any other
directories are listed in the "Local Problems" button as usual.  If
the list of these directories is empty (the default), then the results
are just like they currently are, but it allows one more level of
separation of the hierarchy for those who want it.

The idea is to make symbolic links to the problem libraries from
Rochester, ASU, etc., and have separate buttons for these.  This
avoids having one monster menu with all the problems in it.  (Of
course, you could make buttons for any directories you want.)  There
are instructions in global.conf.dist that exmplain how to do configure
this.

    1 #!perl
    2 ################################################################################
    3 # WeBWorK Online Homework Delivery System
    4 # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
    5 # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.80 2004/06/26 20:40:17 jj 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 following variables are available to this file:
   23 #
   24 #         $webworkRoot    directory that contains the WeBWorK distribution
   25 #         $webworkURLRoot base URL handled by Apache::WeBWorK
   26 #         $pgRoot         directory that contains the PG distribution
   27 #         $courseName     name of the course being used
   28 
   29 ################################################################################
   30 # WeBWorK settings
   31 ################################################################################
   32 
   33 %webworkDirs = (
   34   root          => "$webworkRoot",
   35   DATA          => "$webworkRoot/DATA",
   36   uploadCache   => "$webworkRoot/DATA/uploads",
   37   bin           => "$webworkRoot/bin",
   38   conf          => "$webworkRoot/conf",
   39   courses       => "$webworkRoot/courses",
   40   htdocs        => "$webworkRoot/htdocs",
   41   htdocs_temp   => "$webworkRoot/htdocs/tmp",
   42   equationCache => "$webworkRoot/htdocs/tmp/equations",
   43   local_help    => "$webworkRoot/htdocs/helpFiles",
   44   lib           => "$webworkRoot/lib",
   45   logs          => "$webworkRoot/logs",
   46   macros        => "$pgRoot/macros",
   47   tmp           => "$webworkRoot/tmp",
   48 );
   49 
   50 %webworkFiles = (
   51   environment        => "$webworkDirs{conf}/global.conf",
   52   hardcopySnippets   => {
   53     preamble       => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex",
   54     setHeader      => "$webworkDirs{conf}/snippets/setHeader.pg",  # hardcopySetHeader.pg",
   55     problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex",
   56     setFooter      => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg",
   57     setDivider     => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex",
   58     userDivider    => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex",
   59     postamble      => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex",
   60   },
   61   screenSnippets => {
   62     setHeader => "$webworkDirs{conf}/snippets/setHeader.pg",       # screenSetHeader.pg",
   63   },
   64   logs => {
   65     timing         => "$webworkDirs{logs}/timing.log",
   66   },
   67   # Set this to "" if you don't want to use the equation cache file
   68   equationCacheDB => "$webworkDirs{DATA}/equationcache",
   69 );
   70 
   71 %webworkURLs = (
   72   root          => "$webworkURLRoot",
   73   home          => "/webwork2_files/index.html",
   74   htdocs        => "/webwork2_files",
   75   htdocs_temp   => "/webwork2_files/tmp",
   76   equationCache => "/webwork2_files/tmp/equations",
   77   docs          => "http://webhost.math.rochester.edu/webworkdocs/docs",
   78   local_help    => "/webwork2_files/helpFiles",
   79   oldProf       => "/webwork1/profLogin.pl",
   80   bugReporter   => "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl",
   81   jsMath        => "/webwork2_files/jsMath/jsMath.js",
   82   asciimath     => "/webwork2_files/ASCIIMathML/ASCIIMathML.js",
   83 );
   84 
   85 ################################################################################
   86 # Default course-specific settings
   87 ################################################################################
   88 
   89 my $courseRoot = "$webworkDirs{courses}/$courseName";
   90 %courseDirs = (
   91   root        => "$courseRoot",
   92   DATA        => "$courseRoot/DATA",
   93   auth_DATA   => "$courseRoot/DATA/.auth",
   94   html        => "$courseRoot/html",
   95   html_images => "$courseRoot/html/images",
   96   html_temp   => "$courseRoot/html/tmp",
   97   logs        => "$courseRoot/logs",
   98   scoring     => "$courseRoot/scoring",
   99   templates   => "$courseRoot/templates",
  100   macros      => "$courseRoot/templates/macros",
  101   email       => "$courseRoot/templates/email",
  102 );
  103 
  104 %courseFiles = (
  105   environment => "$courseDirs{root}/course.conf",
  106   motd        => "$courseDirs{templates}/motd.txt",
  107   logs => {
  108     answer_log  => "$courseDirs{logs}/answer_log",
  109   },
  110   course_info => "course_info.txt",  # path relative to templates directory
  111   login_info  => "login_info.txt",   # path relative to templates directory
  112 );
  113 
  114 #
  115 #  Additional library buttons can be added to the Library Browser (SetMaker.pm)
  116 #  by adding the libraries you want to the following line.  For each key=>value
  117 #  in the list, if a directory (or link to a directory) with name 'key' appears
  118 #  in the templates directory, then a button with name 'value' will be placed at
  119 #  the top of the problem browser.  (No button will appear if there is no directory
  120 #  or link with the given name in the templates directory.)  For example,
  121 #
  122 #    $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
  123 #
  124 #  would add two buttons, one for the Rochester library and one for the ASU
  125 #  library, provided templates/rochester and templates/asu exists.
  126 #
  127 $courseFiles{problibs} = {};
  128 
  129 
  130 # quick hack to fix transaction logging. blah.
  131 $webworkFiles{logs}->{transaction}    = "$courseDirs{logs}/transaction.log";
  132 $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
  133 
  134 my $courseURLRoot = "/webwork2_course_files/$courseName";
  135 %courseURLs = (
  136   root      => "$courseURLRoot",
  137   html      => "$courseURLRoot",
  138   html_temp => "$courseURLRoot/tmp",
  139 );
  140 
  141 ################################################################################
  142 # Other site-specific options
  143 ################################################################################
  144 
  145 %mail = (
  146   smtpServer => "mail.math.rochester.edu",
  147   smtpSender => "webwork\@math.rochester.edu",
  148 
  149   # allowedRecipients defines addresses that the PG system is allowed to
  150   # send mail to. this prevents subtle PG exploits. This should be set
  151   # in course.conf to the addresses of professors of each course. Sending
  152   # mail from the PG system (i.e. questionaires, essay questions) will
  153   # fail if this is not set somewhere (either here or in course.conf).
  154   #allowedRecipients => [
  155   # 'prof1@host.yourdomain.edu',
  156   # 'prof2@host.yourdomain.edu',
  157   #],
  158 
  159   # if defined, feedbackRecipients overrides the list of recipients for
  160   # feedback email. It's appropriate to set this in the course.conf for
  161   # specific courses, but probably not in global.conf. if not defined,
  162   # mail is sent to all professors and TAs for a given course
  163   #feedbackRecipients => [
  164   # 'prof1@host.yourdomain.edu',
  165   # 'prof2@host.yourdomain.edu',
  166   #],
  167 
  168   # feedbackVerbosity:
  169   #  0: send only the feedback comment and context link
  170   #  1: as in 0, plus user, set, problem, and PG data
  171   #  2: as in 1, plus the problem environment (debugging data)
  172   feedbackVerbosity => 1,
  173 
  174   # defines the size of the Mail Merge editor window
  175   # FIXME: should this be here? it's UI, not mail
  176   # FIXME: replace this with the auto-size method that TWiki uses
  177   editor_window_rows    => 15,
  178   editor_window_columns => 100,
  179 );
  180 
  181 %externalPrograms = (
  182   mkdir    => "/bin/mkdir",
  183   tth      => "/usr/local/bin/tth",
  184   pdflatex => "/usr/local/bin/pdflatex",
  185   latex    => "/usr/local/bin/latex",
  186   dvipng   => "/usr/local/bin/dvipng",
  187   gif2eps  => "$webworkDirs{bin}/gif2eps",
  188   png2eps  => "$webworkDirs{bin}/png2eps",
  189   gif2png  => "$webworkDirs{bin}/gif2png",
  190   mysql    => "/usr/local/bin/mysql",
  191 );
  192 
  193 %siteDefaults = (
  194   status => {
  195       audit => "Audit",
  196       A => "Audit",
  197       drop  => "Drop",
  198       D => "Drop",
  199       withdraw => "Drop",
  200       current => "Enrolled",
  201       C => "Enrolled",
  202       enrolled => "Enrolled",
  203   },
  204 );
  205 
  206 ################################################################################
  207 # Frontend options
  208 ################################################################################
  209 
  210 %templates = (
  211   system => "$webworkDirs{conf}/templates/ur.template",
  212 );
  213 
  214 ################################################################################
  215 # Database options
  216 ################################################################################
  217 
  218 # Several database are defined in the file conf/database.conf and stored in the
  219 # hash %dbLayouts.
  220 include "conf/database.conf";
  221 
  222 # Select the default database layout. This can be overridden in the course.conf
  223 # file of a particular course.
  224 #$dbLayoutName = "sql";
  225 $dbLayoutName = "gdbm";
  226 
  227 *dbLayout = $dbLayouts{$dbLayoutName};
  228 
  229 ################################################################################
  230 # Problem library options
  231 ################################################################################
  232 
  233 %problemLibrary = (
  234   root => "", # set to the top of the problem library, if its installed
  235   sourceSQL   => "ProblemLibrary",
  236   userSQL     => "webworkRead",
  237   passwordSQL => "",
  238 );
  239 
  240 ################################################################################
  241 # Authorization system
  242 ################################################################################
  243 
  244 # This lets you specify a minimum permission level needed to perform certain
  245 # actions.  In the current system, >=10 will allow a professor to perform the
  246 # action, >=5 will allow a TA to, and >=0 will allow a student to perform an
  247 # action (almost never what you want).
  248 my $student = 0;
  249 my $ta = 5;
  250 my $professor = 10;
  251 %permissionLevels = (
  252   report_bugs                    => $student,
  253   view_multiple_sets             => $ta,
  254   view_unopened_sets             => $ta,
  255   view_unpublished_sets          => $ta,
  256   view_answers                   => $ta,
  257   become_student                 => $professor,
  258   access_instructor_tools        => $ta,
  259   create_and_delete_problem_sets => $professor,
  260   modify_problem_sets            => $professor,
  261   assign_problem_sets            => $professor,
  262   modify_student_data            => $professor,
  263   score_sets                     => $professor,
  264   send_mail                      => $professor,
  265   modify_classlist_files         => $professor,
  266   modify_set_def_files           => $professor,
  267   modify_scoring_files           => $professor,
  268   create_and_delete_courses      => $professor,
  269   fix_course_databases           => $professor,
  270 );
  271 
  272 ################################################################################
  273 # Session options
  274 ################################################################################
  275 
  276 # $sessionKeyTimeout defines seconds of inactivity before a key expires
  277 $sessionKeyTimeout = 60*30;
  278 
  279 # $sessionKeyLength defines the length (in characters) of the session key
  280 $sessionKeyLength = 40;
  281 
  282 # @sessionKeyChars lists the legal session key characters
  283 @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*');
  284 
  285 # Practice users are users who's names start with $practiceUser
  286 # (you can comment this out to remove practice user support)
  287 $practiceUserPrefix = "practice";
  288 
  289 # There is a practice user who can be logged in multiple times.  He's
  290 # commented out by default, though, so you don't hurt yourself.  It is
  291 # kindof a backdoor to the practice user system, since he doesn't have a
  292 # password.  Come to think of it, why do we even have this?!
  293 #$debugPracticeUser = "practice666";
  294 
  295 ################################################################################
  296 # PG translation options
  297 ################################################################################
  298 
  299 %pg = (
  300   # available display modes
  301   displayModes => [ qw(plainText formattedText images jsMath asciimath) ],
  302   # pg options
  303   options => {
  304     # default translation options
  305     displayMode        => "images",
  306     showOldAnswers     => 1,
  307     showCorrectAnswers => 0,
  308     showHints          => 0,
  309     showSolutions      => 0,
  310     catchWarnings      => 0, # there's a global warning catcher now
  311     # default grader
  312     grader => "avg_problem_grader",
  313   },
  314   # options for various renderers
  315   renderers => {
  316     "WeBWorK::PG::Remote" => {
  317       proxy => "http://localhost:21000/RenderD"
  318     },
  319 
  320     # next can be baseline, absmiddle, or mysql
  321     dvipng_align => 'baseline',
  322 
  323     # if we choose mysql, we need information on connecting
  324     # to the database.  Whatever you use here, you have to
  325     # create the database and grant read/write priveleges to
  326     # the user listed here
  327     # To create the database in mysql, as root use:
  328 
  329     # create database DvipngDepths;
  330     # use  DvipngDepths;
  331     # create table depths ( md5 char(33) not null, depth smallint, PRIMARY KEY (md5)) ;
  332     # grant ALL on DvipngDepths.* to webworkWrite;
  333 
  334     # In the last statement, "webworkWrite" should match the
  335     # user below
  336 
  337     dvipng_depth_db => {
  338       dbsource => 'dbi:mysql:DvipngDepths',
  339                         user     => $dbLayouts{sql}->{password}->{params}->{usernameRW},
  340                         passwd   => $dbLayouts{sql}->{password}->{params}->{passwordRW},
  341     }
  342   },
  343   # currently selected renderer
  344   renderer => "WeBWorK::PG::Local",
  345   #renderer => "WeBWorK::PG::Remote",
  346   # directories used by PG
  347   directories => {
  348     # directories used only by PG
  349     root   => "$pgRoot",
  350     lib    => "$pgRoot/lib",
  351     macros => "$pgRoot/macros",
  352   },
  353   # this can be customized in the course.conf file
  354   specialPGEnvironmentVars => {
  355     PRINT_FILE_NAMES_FOR   => [ qw(professor) ],
  356     CAPA_Tools             => "$courseDirs{macros}/CAPA_Tools/",
  357     CAPA_MCTools           => "$courseDirs{macros}/CAPA_MCTools/",
  358     CAPA_Graphics_URL      => "$courseURLs{html}/CAPA_Graphics/",
  359     CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/",
  360     onTheFlyImageSize  => 400,
  361   },
  362   # modules lists module names and the packages each contains
  363   modules => [
  364     [qw(DynaLoader)],
  365     [qw(Exporter)],
  366     [qw(GD)],
  367 
  368     [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
  369     [qw(AnswerHash AnswerEvaluator)],
  370     [qw(WWPlot)], # required by Circle (and others)
  371     [qw(Circle)],
  372     [qw(Complex)],
  373     [qw(Complex1)],
  374     [qw(Distributions)],
  375     [qw(Fraction)],
  376     [qw(Fun)],
  377     [qw(Hermite)],
  378     [qw(Label)],
  379     [qw(List)],
  380     [qw(Match)],
  381     [qw(MatrixReal1)], # required by Matrix
  382     [qw(Matrix)],
  383     [qw(Multiple)],
  384     [qw(PGrandom)],
  385     [qw(Regression)],
  386     [qw(Select)],
  387     [qw(Units)],
  388     [qw(VectorField)],
  389   ],
  390   # defaults used by answer evaluators
  391   ansEvalDefaults => {
  392     functAbsTolDefault            => .001,
  393     functLLimitDefault            => .0000001,
  394     functMaxConstantOfIntegration => 1E8,
  395     functNumOfPoints              => 3,
  396     functRelPercentTolDefault     => .1,
  397     functULimitDefault            => .9999999,
  398     functVarDefault               => "x",
  399     functZeroLevelDefault         => 1E-14,
  400     functZeroLevelTolDefault      => 1E-12,
  401     numAbsTolDefault              => .001,
  402     numFormatDefault              => "",
  403     numRelPercentTolDefault       => .1,
  404     numZeroLevelDefault           => 1E-14,
  405     numZeroLevelTolDefault        => 1E-12,
  406     useBaseTenLog                 => 0,
  407     defaultDisplayMatrixStyle     => "[s]",
  408   },
  409 );

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9