| 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.115 2004/12/28 04:56:04 gage Exp $ |
5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.135 2005/09/07 01:18:00 gage 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. |
| … | |
… | |
| 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{mv} = "/bin/mv"; |
| 53 | $externalPrograms{mysql} = "/usr/local/bin/mysql"; |
53 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
| 54 | |
54 | |
| 55 | $externalPrograms{latex} = "/usr/local/bin/latex"; |
55 | $externalPrograms{latex} = "/usr/bin/latex"; |
| 56 | $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 |
| 57 | $externalPrograms{dvipng} = "/usr/local/bin/dvipng"; |
57 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
| 58 | $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 | |
|
|
64 | #################################################### |
|
|
65 | # Most sites only need to configure the first line |
|
|
66 | #################################################### |
|
|
67 | my $netpbm_prefix = "/usr/bin"; |
|
|
68 | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; |
|
|
69 | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; |
|
|
70 | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; |
|
|
71 | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; |
|
|
72 | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; |
|
|
73 | |
|
|
74 | # The following lines are the external scripts gif2eps, etc. |
|
|
75 | # The source file is input with cat, and the output is redirected to |
|
|
76 | # the desired file. |
|
|
77 | |
|
|
78 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
79 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
80 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
|
|
81 | |
|
|
82 | # Note on these conversions: |
|
|
83 | # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
|
|
84 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
|
|
85 | # However, this was causing improper display of some sort in PDFs. |
|
|
86 | |
|
|
87 | |
|
|
88 | |
| 59 | |
89 | |
| 60 | ################################################################################ |
90 | ################################################################################ |
| 61 | # Mail settings |
91 | # Mail settings |
| 62 | ################################################################################ |
92 | ################################################################################ |
| 63 | |
93 | |
| … | |
… | |
| 128 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
158 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
| 129 | |
159 | |
| 130 | # Contains non-web-accessible temporary files, such as TeX working directories. |
160 | # Contains non-web-accessible temporary files, such as TeX working directories. |
| 131 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
161 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
| 132 | |
162 | |
|
|
163 | # The (absolute) destinations of symbolic links that are OK for the FileManager to follow. |
|
|
164 | # (any subdirectory of these is a valid target for a symbolic link.) |
|
|
165 | # For example: |
|
|
166 | # $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"]; |
|
|
167 | $webworkDirs{valid_symlinks} = []; |
|
|
168 | |
| 133 | ##### The following locations are web-accessible. |
169 | ##### The following locations are web-accessible. |
| 134 | |
170 | |
| 135 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
171 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
| 136 | $webworkURLs{root} = "$webwork_url"; |
172 | $webworkURLs{root} = "$webwork_url"; |
| 137 | |
173 | |
| … | |
… | |
| 165 | |
201 | |
| 166 | # Location of CSS |
202 | # Location of CSS |
| 167 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; |
203 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; |
| 168 | |
204 | |
| 169 | # Location of jsMath script, used for the jsMath display mode. |
205 | # Location of jsMath script, used for the jsMath display mode. |
| 170 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js"; |
206 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
| 171 | |
207 | |
| 172 | # Location of ASCIIMathML script, used for the asciimath display mode. |
208 | # Location of ASCIIMathML script, used for the asciimath display mode. |
| 173 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
209 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
| 174 | |
210 | |
| 175 | ################################################################################ |
211 | ################################################################################ |
| … | |
… | |
| 257 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
293 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
| 258 | |
294 | |
| 259 | # A PG template for creation of new problems. |
295 | # A PG template for creation of new problems. |
| 260 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
296 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
| 261 | |
297 | |
|
|
298 | # A site info "message of the day" file |
|
|
299 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
| 262 | ################################################################################ |
300 | ################################################################################ |
| 263 | # Course-specific files |
301 | # Course-specific files |
| 264 | ################################################################################ |
302 | ################################################################################ |
| 265 | |
303 | |
| 266 | # The course configuration file. |
304 | # The course configuration file. |
| … | |
… | |
| 337 | |
375 | |
| 338 | # The directory containing the problem library files. Set to "" if no problem |
376 | # The directory containing the problem library files. Set to "" if no problem |
| 339 | # library is installed. |
377 | # library is installed. |
| 340 | $problemLibrary{root} = ""; |
378 | $problemLibrary{root} = ""; |
| 341 | |
379 | |
|
|
380 | # Problem Library version |
|
|
381 | # Version 1 is in use. Version 2 will be released soon. |
|
|
382 | $problemLibrary{version} = "1"; |
|
|
383 | |
| 342 | # The name of the SQL database containing problem metadata |
384 | # The name of the SQL database containing problem metadata |
| 343 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
385 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
| 344 | |
386 | |
| 345 | # The user name to use when connecting to the problem library database |
387 | # The user name to use when connecting to the problem library database |
| 346 | $problemLibrary{userSQL} = "webworkRead"; |
388 | $problemLibrary{userSQL} = "webworkRead"; |
| … | |
… | |
| 369 | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; |
411 | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; |
| 370 | |
412 | |
| 371 | # The answer log stores a history of all users' submitted answers. |
413 | # The answer log stores a history of all users' submitted answers. |
| 372 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
414 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
| 373 | |
415 | |
| 374 | ################################################################################ |
416 | # Log logins. |
| 375 | # More paths to external programs |
417 | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; |
| 376 | ################################################################################ |
|
|
| 377 | |
418 | |
| 378 | # These image conversion utilities are included in the WeBWorK distribution. |
419 | # Log for almost every click. By default it is the empty string, which |
| 379 | $externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps"; |
420 | # turns this log off. If you want it turned on, we suggest |
| 380 | $externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps"; |
421 | # "$courseDirs{logs}/activity.log" |
| 381 | $externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png"; |
422 | # When turned on, this log can get quite large. |
|
|
423 | $courseFiles{logs}{activity_log} = ''; |
| 382 | |
424 | |
| 383 | ################################################################################ |
425 | ################################################################################ |
| 384 | # Site defaults (FIXME: what other things could be "site defaults"?) |
426 | # Site defaults (FIXME: what other things could be "site defaults"?) |
| 385 | ################################################################################ |
427 | ################################################################################ |
| 386 | |
428 | |
| … | |
… | |
| 414 | # your school. If just a few courses are in a different timezone, set this in |
456 | # your school. If just a few courses are in a different timezone, set this in |
| 415 | # course.conf for the affected courses instead. |
457 | # course.conf for the affected courses instead. |
| 416 | # |
458 | # |
| 417 | $siteDefaults{timezone} = ""; |
459 | $siteDefaults{timezone} = ""; |
| 418 | |
460 | |
|
|
461 | # The default_templates_course is used by default to create a new course. |
|
|
462 | # The contents of the templates directory are copied from this course |
|
|
463 | # to the new course being created. |
|
|
464 | $siteDefaults{default_templates_course} ="modelCourse"; |
|
|
465 | |
| 419 | ################################################################################ |
466 | ################################################################################ |
| 420 | # Frontend options |
467 | # Frontend options |
| 421 | ################################################################################ |
468 | ################################################################################ |
| 422 | |
469 | |
| 423 | %templates = ( |
470 | %templates = ( |
| 424 | system => "$webworkDirs{conf}/templates/ur.template", |
471 | system => "$webworkDirs{conf}/templates/ur.template", |
|
|
472 | gateway => "$webworkDirs{conf}/templates/gw.template", |
| 425 | ); |
473 | ); |
| 426 | |
474 | |
| 427 | ################################################################################ |
475 | ################################################################################ |
| 428 | # Authorization system |
476 | # Authorization system |
| 429 | ################################################################################ |
477 | ################################################################################ |
| … | |
… | |
| 433 | # described by the key, the user must have a permission level greater than or |
481 | # described by the key, the user must have a permission level greater than or |
| 434 | # equal to the value. |
482 | # equal to the value. |
| 435 | |
483 | |
| 436 | my $guest = -1; |
484 | my $guest = -1; |
| 437 | my $student = 0; |
485 | my $student = 0; |
|
|
486 | my $proctor = 2; |
| 438 | my $ta = 5; |
487 | my $ta = 5; |
| 439 | my $professor = 10; |
488 | my $professor = 10; |
| 440 | my $nobody = undef; |
489 | my $nobody = undef; |
| 441 | |
490 | |
| 442 | %permissionLevels = ( |
491 | %permissionLevels = ( |
| 443 | login => $guest, |
492 | login => $guest, |
| 444 | report_bugs => $student, |
493 | report_bugs => $student, |
| 445 | submit_feedback => $student, |
494 | submit_feedback => $student, |
| 446 | change_password => $student, |
495 | change_password => $student, |
| 447 | change_email_address => $student, |
496 | change_email_address => $student, |
|
|
497 | |
|
|
498 | proctor_quiz => $proctor, |
| 448 | |
499 | |
| 449 | view_multiple_sets => $ta, |
500 | view_multiple_sets => $ta, |
| 450 | view_unopened_sets => $ta, |
501 | view_unopened_sets => $ta, |
| 451 | view_unpublished_sets => $ta, |
502 | view_unpublished_sets => $ta, |
| 452 | view_answers => $ta, |
503 | view_answers => $ta, |
| … | |
… | |
| 472 | ##### Behavior of the interactive problem processor ##### |
523 | ##### Behavior of the interactive problem processor ##### |
| 473 | |
524 | |
| 474 | show_correct_answers_before_answer_date => $ta, |
525 | show_correct_answers_before_answer_date => $ta, |
| 475 | show_solutions_before_answer_date => $ta, |
526 | show_solutions_before_answer_date => $ta, |
| 476 | avoid_recording_answers => $ta, |
527 | avoid_recording_answers => $ta, |
|
|
528 | # Below this level, old answers are never initially shown |
|
|
529 | can_show_old_answers_by_default => $student, |
|
|
530 | # at this level, we look at showOldAnswers for default value |
|
|
531 | # even after the due date |
|
|
532 | can_always_use_show_old_answers_default => $professor, |
| 477 | check_answers_before_open_date => $ta, |
533 | check_answers_before_open_date => $ta, |
| 478 | check_answers_after_open_date_with_attempts => $ta, |
534 | check_answers_after_open_date_with_attempts => $ta, |
| 479 | check_answers_after_open_date_without_attempts => $guest, |
535 | check_answers_after_open_date_without_attempts => $guest, |
| 480 | check_answers_after_due_date => $guest, |
536 | check_answers_after_due_date => $guest, |
| 481 | check_answers_after_answer_date => $guest, |
537 | check_answers_after_answer_date => $guest, |
| … | |
… | |
| 599 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
655 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
| 600 | }, |
656 | }, |
| 601 | }; |
657 | }; |
| 602 | |
658 | |
| 603 | $pg{displayModeOptions}{jsMath} = { |
659 | $pg{displayModeOptions}{jsMath} = { |
| 604 | reportMissingFonts => 1, # set to 0 to prevent the missing font message |
660 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
| 605 | missingFontMessage => undef, # set to an HTML string to use for the missing font message |
661 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
|
|
662 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
| 606 | }; |
663 | }; |
| 607 | |
664 | |
| 608 | ##### Directories used by PG |
665 | ##### Directories used by PG |
| 609 | |
666 | |
| 610 | # The root of the PG directory tree (from pg_root in Apache config). |
667 | # The root of the PG directory tree (from pg_root in Apache config). |
| 611 | $pg{directories}{root} = "$pg_dir"; |
668 | $pg{directories}{root} = "$pg_dir"; |
| 612 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
669 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 613 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
670 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
|
|
671 | |
|
|
672 | # |
|
|
673 | # The macro file search path. Each directory in this list is seached |
|
|
674 | # (in this order) by loadMacros() when it looks for a .pl file. |
|
|
675 | # |
|
|
676 | $pg{directories}{macrosPath} = [ |
|
|
677 | ".", # search the problem file's directory |
|
|
678 | $courseDirs{macros}, |
|
|
679 | $pg{directories}{macros}, |
|
|
680 | ]; |
| 614 | |
681 | |
| 615 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
682 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 616 | |
683 | |
| 617 | # Users for whom to print the file name of the PG file being processed. |
684 | # Users for whom to print the file name of the PG file being processed. |
| 618 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
685 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
| … | |
… | |
| 624 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
691 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
| 625 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
692 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
| 626 | |
693 | |
| 627 | # Size in pixels of dynamically-generated images, i.e. graphs. |
694 | # Size in pixels of dynamically-generated images, i.e. graphs. |
| 628 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
695 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
|
|
696 | |
|
|
697 | # To activate Parser-based versions of num_cmp and fun_cmp, change this |
|
|
698 | # value to 0. |
|
|
699 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1; |
|
|
700 | |
|
|
701 | # Strings to insert at the start and end of the body of a problem |
|
|
702 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
|
|
703 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
|
|
704 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
|
|
705 | |
|
|
706 | $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; |
|
|
707 | $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; |
|
|
708 | |
|
|
709 | # To have the problem body indented and boxed, uncomment: |
|
|
710 | |
|
|
711 | # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE> |
|
|
712 | # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; |
|
|
713 | # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE> |
|
|
714 | # </BLOCKQUOTE>'; |
| 629 | |
715 | |
| 630 | ##### PG modules to load |
716 | ##### PG modules to load |
| 631 | |
717 | |
| 632 | # The first item of each list is the module to load. The remaining items are |
718 | # The first item of each list is the module to load. The remaining items are |
| 633 | # additional packages to import. |
719 | # additional packages to import. |
| … | |
… | |
| 635 | ${pg}{modules} = [ |
721 | ${pg}{modules} = [ |
| 636 | [qw(DynaLoader)], |
722 | [qw(DynaLoader)], |
| 637 | [qw(Exporter)], |
723 | [qw(Exporter)], |
| 638 | [qw(GD)], |
724 | [qw(GD)], |
| 639 | |
725 | |
| 640 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], |
726 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)], |
| 641 | [qw(AnswerHash AnswerEvaluator)], |
727 | [qw(AnswerHash AnswerEvaluator)], |
| 642 | [qw(WWPlot)], # required by Circle (and others) |
728 | [qw(WWPlot)], # required by Circle (and others) |
| 643 | [qw(Circle)], |
729 | [qw(Circle)], |
| 644 | [qw(Complex)], |
730 | [qw(Complex)], |
| 645 | [qw(Complex1)], |
731 | [qw(Complex1)], |
| … | |
… | |
| 657 | [qw(Regression)], |
743 | [qw(Regression)], |
| 658 | [qw(Select)], |
744 | [qw(Select)], |
| 659 | [qw(Units)], |
745 | [qw(Units)], |
| 660 | [qw(VectorField)], |
746 | [qw(VectorField)], |
| 661 | [qw(Parser Value)], |
747 | [qw(Parser Value)], |
|
|
748 | [qw(Parser::Legacy)], |
| 662 | [qw(Apache::Log)], |
749 | [qw(Apache::Log)], |
| 663 | ]; |
750 | ]; |
| 664 | |
751 | |
| 665 | ##### Answer evaluatior defaults |
752 | ##### Answer evaluatior defaults |
| 666 | |
753 | |