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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2954 Revision 3552
1#!perl 1#!perl
2################################################################################ 2################################################################################
3# WeBWorK Online Homework Delivery System 3# WeBWorK Online Homework Delivery System
4# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 4# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
5# $CVSHeader: webwork2/conf/global.conf.dist,v 1.110 2004/10/20 17:00:46 sh002i Exp $ 5# $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.128 2005/08/22 01:23:16 jj Exp $
6# 6#
7# This program is free software; you can redistribute it and/or modify it under 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 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 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. 10# version, or (b) the "Artistic License" which comes with this package.
26################################################################################ 26################################################################################
27# Seed variables 27# Seed variables
28################################################################################ 28################################################################################
29 29
30# Set these variables to correspond to your configuration and preferences. You 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 31# will need to restart the webserver to reset the variables in this section.
32 32
33# URL of WeBWorK handler. 33# URL of WeBWorK handler.
34$webwork_url = "/webwork2"; 34$webwork_url = "/webwork2";
35 35
36# Root directory of PG. 36# Root directory of PG.
47################################################################################ 47################################################################################
48# Paths to external programs 48# Paths to external programs
49################################################################################ 49################################################################################
50 50
51$externalPrograms{mkdir} = "/bin/mkdir"; 51$externalPrograms{mkdir} = "/bin/mkdir";
52$externalPrograms{mv} = "/bin/mv";
52$externalPrograms{mysql} = "/usr/local/bin/mysql"; 53$externalPrograms{mysql} = "/usr/bin/mysql";
53 54
54$externalPrograms{latex} = "/usr/local/bin/latex"; 55$externalPrograms{latex} = "/usr/bin/latex";
55$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files 56$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files
56$externalPrograms{dvipng} = "/usr/local/bin/dvipng"; 57$externalPrograms{dvipng} = "/usr/bin/dvipng";
57$externalPrograms{tth} = "/usr/local/bin/tth"; 58$externalPrograms{tth} = "/usr/bin/tth";
59
60$externalPrograms{tar} = "/usr/bin/tar";
61
62# Basic image manipulation utilities
63# Most sites only need to configure the first line
64$externalPrograms{netpbm} = "/usr/bin/"; # Really a prefix, rather than a program
65$externalPrograms{giftopnm} = $externalPrograms{netpbm}.'giftopnm';
66$externalPrograms{ppmtopgm} = $externalPrograms{netpbm}.'ppmtopgm';
67$externalPrograms{pnmtops} = $externalPrograms{netpbm}.'pnmtops';
68$externalPrograms{pnmtopng} = $externalPrograms{netpbm}.'pnmtopng';
69$externalPrograms{pngtopnm} = $externalPrograms{netpbm}.'pngtopnm';
70
71# The following lines are the external scripts gif2eps, etc.
72# The source file is input with cat, and the output is redirected to
73# the desired file.
74
75$externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null";
76$externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
77$externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}";
78
79# Note on these conversions:
80# we used to use `pnmdepth 1' instead of ppmtopgm as it creates a
81# monochrome image (1 bit) rather than a greyscale image (8 bits).
82# However, this was causing improper display of some sort in PDFs.
83
58 84
59################################################################################ 85################################################################################
60# Mail settings 86# Mail settings
61################################################################################ 87################################################################################
62 88
127$webworkDirs{logs} = "$webworkDirs{root}/logs"; 153$webworkDirs{logs} = "$webworkDirs{root}/logs";
128 154
129# Contains non-web-accessible temporary files, such as TeX working directories. 155# Contains non-web-accessible temporary files, such as TeX working directories.
130$webworkDirs{tmp} = "$webworkDirs{root}/tmp"; 156$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
131 157
158# The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
159# (any subdirectory of these is a valid target for a symbolic link.)
160# For example:
161# $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
162$webworkDirs{valid_symlinks} = [];
163
132##### The following locations are web-accessible. 164##### The following locations are web-accessible.
133 165
134# The root URL (usually /webwork2), set by <Location> in Apache configuration. 166# The root URL (usually /webwork2), set by <Location> in Apache configuration.
135$webworkURLs{root} = "$webwork_url"; 167$webworkURLs{root} = "$webwork_url";
136 168
160$webworkURLs{oldProf} = "/webwork1/profLogin.pl"; 192$webworkURLs{oldProf} = "/webwork1/profLogin.pl";
161 193
162# URL of WeBWorK Bugzilla database. 194# URL of WeBWorK Bugzilla database.
163$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; 195$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/";
164 196
197# Location of CSS
198$webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css";
199
165# Location of jsMath script, used for the jsMath display mode. 200# Location of jsMath script, used for the jsMath display mode.
166$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js"; 201$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js";
167 202
168# Location of ASCIIMathML script, used for the asciimath display mode. 203# Location of ASCIIMathML script, used for the asciimath display mode.
169$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; 204$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
170 205
171################################################################################ 206################################################################################
250##### Screen snippets are used when displaying problem sets on the screen. 285##### Screen snippets are used when displaying problem sets on the screen.
251 286
252# The set header is displayed on the problem set page. It is a PG file. 287# The set header is displayed on the problem set page. It is a PG file.
253$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" 288$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
254 289
290# A PG template for creation of new problems.
291$webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg"
292
293# A site info "message of the day" file
294$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
255################################################################################ 295################################################################################
256# Course-specific files 296# Course-specific files
257################################################################################ 297################################################################################
258 298
259# The course configuration file. 299# The course configuration file.
290# osuLibrary => "Ohio State", 330# osuLibrary => "Ohio State",
291# capaLibrary => "CAPA", 331# capaLibrary => "CAPA",
292}; 332};
293 333
294################################################################################ 334################################################################################
295# Database options 335# Database options (WWDBv3)
336################################################################################
337
338# The four arguments passed to the DBI::connect() method. See the DBI manual for
339# more information.
340$wwdbv3_settings{dsn} = "dbi:mysql:wwdbv3";
341$wwdbv3_settings{user} = "wwdbv3";
342$wwdbv3_settings{pass} = "xyzzy";
343$wwdbv3_settings{attr} = {};
344
345# WWDBv3 needs a lock file to prevent concurrent database upgrades. The file
346# will be locked with flock().
347$wwdbv3_settings{upgrade_lock} = "$webworkDirs{tmp}/wwdbv3_upgrade.lock";
348
349################################################################################
350# Database options (WWDBv2)
296################################################################################ 351################################################################################
297 352
298# Several database are defined in the file conf/database.conf and stored in the 353# Several database are defined in the file conf/database.conf and stored in the
299# hash %dbLayouts. 354# hash %dbLayouts.
300include "conf/database.conf"; 355include "conf/database.conf";
315 370
316# The directory containing the problem library files. Set to "" if no problem 371# The directory containing the problem library files. Set to "" if no problem
317# library is installed. 372# library is installed.
318$problemLibrary{root} = ""; 373$problemLibrary{root} = "";
319 374
375# Problem Library version
376# Version 1 is in use. Version 2 will be released soon.
377$problemLibrary{version} = "1";
378
320# The name of the SQL database containing problem metadata 379# The name of the SQL database containing problem metadata
321$problemLibrary{sourceSQL} = "ProblemLibrary"; 380$problemLibrary{sourceSQL} = "ProblemLibrary";
322 381
323# The user name to use when connecting to the problem library database 382# The user name to use when connecting to the problem library database
324$problemLibrary{userSQL} = "webworkRead"; 383$problemLibrary{userSQL} = "webworkRead";
347$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; 406$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
348 407
349# The answer log stores a history of all users' submitted answers. 408# The answer log stores a history of all users' submitted answers.
350$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; 409$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
351 410
352################################################################################ 411# Log logins.
353# More paths to external programs 412$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
354################################################################################
355
356# These image conversion utilities are included in the WeBWorK distribution.
357$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps";
358$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps";
359$externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png";
360 413
361################################################################################ 414################################################################################
362# Site defaults (FIXME: what other things could be "site defaults"?) 415# Site defaults (FIXME: what other things could be "site defaults"?)
363################################################################################ 416################################################################################
364 417
392# your school. If just a few courses are in a different timezone, set this in 445# your school. If just a few courses are in a different timezone, set this in
393# course.conf for the affected courses instead. 446# course.conf for the affected courses instead.
394# 447#
395$siteDefaults{timezone} = ""; 448$siteDefaults{timezone} = "";
396 449
450# The default_templates_course is used by default to create a new course.
451# The contents of the templates directory are copied from this course
452# to the new course being created.
453$siteDefaults{default_templates_course} ="modelCourse";
454
397################################################################################ 455################################################################################
398# Frontend options 456# Frontend options
399################################################################################ 457################################################################################
400 458
401%templates = ( 459%templates = (
402 system => "$webworkDirs{conf}/templates/ur.template", 460 system => "$webworkDirs{conf}/templates/ur.template",
461 gateway => "$webworkDirs{conf}/templates/gw.template",
403); 462);
404 463
405################################################################################ 464################################################################################
406# Authorization system 465# Authorization system
407################################################################################ 466################################################################################
408 467
409# This lets you specify a minimum permission level needed to perform certain 468# This lets you specify a minimum permission level needed to perform certain
410# actions. In the current system, >=10 will allow a professor to perform the 469# actions. For each pair in the hash below, in order to perform the action
411# action, >=5 will allow a TA to, and >=0 will allow a student to perform an 470# described by the key, the user must have a permission level greater than or
412# action (almost never what you want). 471# equal to the value.
413 472
473my $guest = -1;
414my $student = 0; 474my $student = 0;
475my $proctor = 2;
415my $ta = 5; 476my $ta = 5;
416my $professor = 10; 477my $professor = 10;
417my $nobody = undef; 478my $nobody = undef;
418 479
419%permissionLevels = ( 480%permissionLevels = (
481 login => $guest,
420 report_bugs => $student, 482 report_bugs => $student,
421 submit_feedback => $student, 483 submit_feedback => $student,
422 change_password => $student, 484 change_password => $student,
423 change_email_address => $student, 485 change_email_address => $student,
486
487 proctor_quiz => $proctor,
424 488
425 view_multiple_sets => $ta, 489 view_multiple_sets => $ta,
426 view_unopened_sets => $ta, 490 view_unopened_sets => $ta,
427 view_unpublished_sets => $ta, 491 view_unpublished_sets => $ta,
428 view_answers => $ta, 492 view_answers => $ta,
450 show_correct_answers_before_answer_date => $ta, 514 show_correct_answers_before_answer_date => $ta,
451 show_solutions_before_answer_date => $ta, 515 show_solutions_before_answer_date => $ta,
452 avoid_recording_answers => $ta, 516 avoid_recording_answers => $ta,
453 check_answers_before_open_date => $ta, 517 check_answers_before_open_date => $ta,
454 check_answers_after_open_date_with_attempts => $ta, 518 check_answers_after_open_date_with_attempts => $ta,
455 check_answers_after_open_date_without_attempts => $student, 519 check_answers_after_open_date_without_attempts => $guest,
456 check_answers_after_due_date => $student, 520 check_answers_after_due_date => $guest,
457 check_answers_after_answer_date => $student, 521 check_answers_after_answer_date => $guest,
458 record_answers_when_acting_as_student => $nobody, 522 record_answers_when_acting_as_student => $nobody,
459 # "record_answers_when_acting_as_student" takes precedence 523 # "record_answers_when_acting_as_student" takes precedence
460 # over the following for professors acting as students: 524 # over the following for professors acting as students:
461 record_answers_before_open_date => $nobody, 525 record_answers_before_open_date => $nobody,
462 record_answers_after_open_date_with_attempts => $student, 526 record_answers_after_open_date_with_attempts => $student,
574 user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, 638 user => $dbLayouts{sql}->{password}->{params}->{usernameRW},
575 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, 639 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW},
576 }, 640 },
577}; 641};
578 642
643$pg{displayModeOptions}{jsMath} = {
644 reportMissingFonts => 0, # set to 1 to allow the missing font message
645 missingFontMessage => undef, # set to an HTML string to replace the missing font message
646 noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts
647};
648
579##### Directories used by PG 649##### Directories used by PG
580 650
581# The root of the PG directory tree (from pg_root in Apache config). 651# The root of the PG directory tree (from pg_root in Apache config).
582$pg{directories}{root} = "$pg_dir"; 652$pg{directories}{root} = "$pg_dir";
583$pg{directories}{lib} = "$pg{directories}{root}/lib"; 653$pg{directories}{lib} = "$pg{directories}{root}/lib";
584$pg{directories}{macros} = "$pg{directories}{root}/macros"; 654$pg{directories}{macros} = "$pg{directories}{root}/macros";
655
656#
657# The macro file search path. Each directory in this list is seached
658# (in this order) by loadMacros() when it looks for a .pl file.
659#
660$pg{directories}{macrosPath} = [
661 ".", # search the problem file's directory
662 $courseDirs{macros},
663 $pg{directories}{macros},
664];
585 665
586##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) 666##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
587 667
588# Users for whom to print the file name of the PG file being processed. 668# Users for whom to print the file name of the PG file being processed.
589$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; 669$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
596$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", 676$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/",
597 677
598# Size in pixels of dynamically-generated images, i.e. graphs. 678# Size in pixels of dynamically-generated images, i.e. graphs.
599$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, 679$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
600 680
681# Strings to insert at the start and end of the body of a problem
682# (at beginproblem() and ENDDOCUMENT) in various modes. More display modes
683# can be added if different behaviours are desired (e.g., HTML_dpng,
684# HTML_asciimath, etc.). These parts are not used in the Library browser.
685
686$pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
687$pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
688
689# To have the problem body indented and boxed, uncomment:
690
691# $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
692# <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
693# $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
694# </BLOCKQUOTE>';
695
601##### PG modules to load 696##### PG modules to load
602 697
603# The first item of each list is the module to load. The remaining items are 698# The first item of each list is the module to load. The remaining items are
604# additional packages to import. 699# additional packages to import.
605 700
606${pg}{modules} = [ 701${pg}{modules} = [
607 [qw(DynaLoader)], 702 [qw(DynaLoader)],
608 [qw(Exporter)], 703 [qw(Exporter)],
609 [qw(GD)], 704 [qw(GD)],
610 705
611 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], 706 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
612 [qw(AnswerHash AnswerEvaluator)], 707 [qw(AnswerHash AnswerEvaluator)],
613 [qw(WWPlot)], # required by Circle (and others) 708 [qw(WWPlot)], # required by Circle (and others)
614 [qw(Circle)], 709 [qw(Circle)],
615 [qw(Complex)], 710 [qw(Complex)],
616 [qw(Complex1)], 711 [qw(Complex1)],

Legend:
Removed from v.2954  
changed lines
  Added in v.3552

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9