[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 3571 Revision 3691
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: webwork-modperl/conf/global.conf.dist,v 1.130 2005/08/24 20:22:31 jj Exp $ 5# $CVSHeader: webwork2/conf/global.conf.dist,v 1.146 2005/10/05 18:16:48 sh002i 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.
46 46
47################################################################################ 47################################################################################
48# Paths to external programs 48# Paths to external programs
49################################################################################ 49################################################################################
50 50
51# system utilties
51$externalPrograms{mkdir} = "/bin/mkdir"; 52$externalPrograms{mkdir} = "/bin/mkdir";
52$externalPrograms{mv} = "/bin/mv"; 53$externalPrograms{mv} = "/bin/mv";
53$externalPrograms{mysql} = "/usr/bin/mysql"; 54$externalPrograms{mysql} = "/usr/bin/mysql";
55$externalPrograms{tar} = "/usr/bin/tar";
54 56
57# equation rendering/hardcopy utiltiies
55$externalPrograms{latex} = "/usr/bin/latex"; 58$externalPrograms{latex} = "/usr/bin/latex";
56$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files 59$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --shell-escape allows pdflatex to handle .eps files
57$externalPrograms{dvipng} = "/usr/bin/dvipng"; 60$externalPrograms{dvipng} = "/usr/bin/dvipng";
58$externalPrograms{tth} = "/usr/bin/tth"; 61$externalPrograms{tth} = "/usr/bin/tth";
59 62
60$externalPrograms{tar} = "/usr/bin/tar";
61
62# Basic image manipulation utilities 63# NetPBM - basic image manipulation utilities
63# Most sites only need to configure the first line 64# most sites only need to configure $netpbm_prefix.
64$externalPrograms{netpbm} = "/usr/bin/"; # Really a prefix, rather than a program 65my $netpbm_prefix = "/usr/bin";
65$externalPrograms{giftopnm} = $externalPrograms{netpbm}.'giftopnm'; 66$externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm";
66$externalPrograms{ppmtopgm} = $externalPrograms{netpbm}.'ppmtopgm'; 67$externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm";
67$externalPrograms{pnmtops} = $externalPrograms{netpbm}.'pnmtops'; 68$externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops";
68$externalPrograms{pnmtopng} = $externalPrograms{netpbm}.'pnmtopng'; 69$externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng";
69$externalPrograms{pngtopnm} = $externalPrograms{netpbm}.'pngtopnm'; 70$externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm";
70 71
71# The following lines are the external scripts gif2eps, etc. 72# image conversions utiltiies
72# The source file is input with cat, and the output is redirected to 73# the source file is given on stdin, and the output expected on stdout.
73# the desired file. 74#
74 75# Note on conversions pipelines:
76# we used to use `pnmdepth 1' instead of ppmtopgm as it creates a
77# monochrome image (1 bit) rather than a greyscale image (8 bits).
78# However, this was causing improper display of some sort in PDFs.
75$externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null"; 79$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"; 80$externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
77$externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; 81$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
84 82
85################################################################################ 83################################################################################
86# Mail settings 84# Mail settings
87################################################################################ 85################################################################################
88 86
93# When connecting to the above server, WeBWorK will send this address in the 91# When connecting to the above server, WeBWorK will send this address in the
94# MAIL FROM command. This has nothing to do with the "From" address on the mail 92# MAIL FROM command. This has nothing to do with the "From" address on the mail
95# message. It can really be anything, but some mail servers require it contain 93# message. It can really be anything, but some mail servers require it contain
96# a valid mail domain, or at least be well-formed. 94# a valid mail domain, or at least be well-formed.
97$mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; 95$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
98 96
99# AllowedRecipients defines addresses that the PG system is allowed to send mail 97# AllowedRecipients defines addresses that the PG system is allowed to send mail
100# to. this prevents subtle PG exploits. This should be set in course.conf to the 98# to. this prevents subtle PG exploits. This should be set in course.conf to the
101# addresses of professors of each course. Sending mail from the PG system (i.e. 99# addresses of professors of each course. Sending mail from the PG system (i.e.
102# questionaires, essay questions) will fail if this is not set somewhere (either 100# questionaires, essay questions) will fail if this is not set somewhere (either
103# here or in course.conf). 101# here or in course.conf).
104$mail{allowedRecipients} = [ 102$mail{allowedRecipients} = [
105 #'prof1@yourserver.yourdomain.edu', 103 #'prof1@yourserver.yourdomain.edu',
106 #'prof2@yourserver.yourdomain.edu', 104 #'prof2@yourserver.yourdomain.edu',
107]; 105];
108 106
109# If defined, feedbackRecipients overrides the list of recipients for feedback 107# By default, feeback is sent to all users who have permission to
110# email. It's appropriate to set this in the course.conf for specific courses, 108# receive_feedback. If this list is non-empty, feedback is also sent to the
111# but probably not in global.conf. if not defined, mail is sent to all 109# addresses specified here.
112# professors and TAs for a given course 110#
111# * If you want to disable feedback altogether, leave this empty and set
112# submit_feeback => $nobody in %permissionLevels below. This will cause the
113# feedback button to go away as well.
114#
115# * If you want to send email ONLY to addresses in this list, set
116# receive_feedback => $nobody in %permissionLevels below.
117#
118# It's often useful to set this in the course.conf to change the behavior of
119# feedback for a specific course.
120#
113#$mail{feedbackRecipients} = [ 121$mail{feedbackRecipients} = [
114# 'prof1@yourserver.yourdomain.edu', 122 #'prof1@yourserver.yourdomain.edu',
115# 'prof2@yourserver.yourdomain.edu', 123 #'prof2@yourserver.yourdomain.edu',
116#]; 124];
117 125
126# Feedback subject line -- the following escape sequences are recognized:
127#
128# %c = course ID
129# %u = user ID
130# %s = set ID
131# %p = problem ID
132# %x = section
133# %r = recitation
134# %% = literal percent sign
135#
136$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";
137
118# feedbackVerbosity: 138# feedbackVerbosity:
119# 0: send only the feedback comment and context link 139# 0: send only the feedback comment and context link
120# 1: as in 0, plus user, set, problem, and PG data 140# 1: as in 0, plus user, set, problem, and PG data
121# 2: as in 1, plus the problem environment (debugging data) 141# 2: as in 1, plus the problem environment (debugging data)
122$mail{feedbackVerbosity} = 1; 142$mail{feedbackVerbosity} = 1;
123 143
124# Defines the size of the Mail Merge editor window 144# Defines the size of the Mail Merge editor window
125# FIXME: should this be here? it's UI, not mail 145# FIXME: should this be here? it's UI, not mail
126# FIXME: replace this with the auto-size method that TWiki uses 146# FIXME: replace this with the auto-size method that TWiki uses
127$mail{editor_window_rows} = 15; 147$mail{editor_window_rows} = 15;
128$mail{editor_window_columns} = 100; 148$mail{editor_window_columns} = 100;
296# Course-specific files 316# Course-specific files
297################################################################################ 317################################################################################
298 318
299# The course configuration file. 319# The course configuration file.
300$courseFiles{environment} = "$courseDirs{root}/course.conf"; 320$courseFiles{environment} = "$courseDirs{root}/course.conf";
321
322# The course simple configuration file (holds web-based configuratoin).
323$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";
301 324
302# File contents are displayed after login, on the problem sets page. Path given 325# File contents are displayed after login, on the problem sets page. Path given
303# here is relative to the templates directory. 326# here is relative to the templates directory.
304$courseFiles{course_info} = "course_info.txt"; 327$courseFiles{course_info} = "course_info.txt";
305 328
330# osuLibrary => "Ohio State", 353# osuLibrary => "Ohio State",
331# capaLibrary => "CAPA", 354# capaLibrary => "CAPA",
332}; 355};
333 356
334################################################################################ 357################################################################################
335# Database options (WWDBv3) 358# Database options
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)
351################################################################################ 359################################################################################
352 360
353# Several database are defined in the file conf/database.conf and stored in the 361# Several database are defined in the file conf/database.conf and stored in the
354# hash %dbLayouts. 362# hash %dbLayouts.
355include "conf/database.conf"; 363include "conf/database.conf";
409$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; 417$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
410 418
411# Log logins. 419# Log logins.
412$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; 420$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
413 421
422# Log for almost every click. By default it is the empty string, which
423# turns this log off. If you want it turned on, we suggest
424# "$courseDirs{logs}/activity.log"
425# When turned on, this log can get quite large.
426$courseFiles{logs}{activity_log} = '';
427
414################################################################################ 428################################################################################
415# Site defaults (FIXME: what other things could be "site defaults"?) 429# Site defaults (FIXME: what other things could be "site defaults"?)
416################################################################################ 430################################################################################
417
418# Status strings -- lists valid status values and their names. If your site uses
419# additional values, add them here.
420$siteDefaults{status} = {
421 A => "Audit",
422 a => "Audit",
423 audit => "Audit",
424 D => "Drop",
425 d => "Drop",
426 drop => "Drop",
427 withdraw => "Drop",
428 C => "Enrolled",
429 c => "Enrolled",
430 current => "Enrolled",
431 enrolled => "Enrolled",
432};
433 431
434# Set the default timezone of courses on this server. To get a list of valid 432# Set the default timezone of courses on this server. To get a list of valid
435# timezones, run: 433# timezones, run:
436# 434#
437# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' 435# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'
463 461
464################################################################################ 462################################################################################
465# Authorization system 463# Authorization system
466################################################################################ 464################################################################################
467 465
468# This lets you specify a minimum permission level needed to perform certain 466# this section lets you define which groups of users can perform which actions.
469# actions. For each pair in the hash below, in order to perform the action
470# described by the key, the user must have a permission level greater than or
471# equal to the value.
472 467
473my $guest = -1; 468# this hash maps a numeric permission level to the name of a role. the number
474my $student = 0; 469# assigned to a role is significant -- roles with higher numbers are considered
475my $proctor = 2; 470# "more privileged", and are included when that role is listed for a privilege
476my $ta = 5; 471# below.
472#
473%userRoles = (
474 guest => -5,
475 student => 0,
476 proctor => 2,
477 ta => 5,
477my $professor = 10; 478 professor => 10,
478my $nobody = undef; 479);
479 480
481# this hash maps operations to the roles that are allowed to perform those
482# operations. the role listed and any role with a higher permission level (in
483# the %userRoles hash) will be allowed to perform the operation. If the role
484# is undefined, no users will be allowed to perform the operation.
485#
480%permissionLevels = ( 486%permissionLevels = (
481 login => $guest, 487 login => "guest",
482 report_bugs => $student, 488 report_bugs => "student",
483 submit_feedback => $student, 489 submit_feedback => "student",
484 change_password => $student, 490 change_password => "student",
485 change_email_address => $student, 491 change_email_address => "student",
486 492
487 proctor_quiz => $proctor, 493 proctor_quiz => "proctor",
488 494
489 view_multiple_sets => $ta, 495 view_multiple_sets => "ta",
490 view_unopened_sets => $ta, 496 view_unopened_sets => "ta",
491 view_unpublished_sets => $ta, 497 view_unpublished_sets => "ta",
492 view_answers => $ta, 498 view_answers => "ta",
493 499
494 become_student => $professor, 500 become_student => "professor",
495 access_instructor_tools => $ta, 501 access_instructor_tools => "ta",
496 score_sets => $professor, 502 score_sets => "professor",
497 send_mail => $professor, 503 send_mail => "professor",
498 receive_feedback => $ta, 504 receive_feedback => "ta",
499 505
500 create_and_delete_problem_sets => $professor, 506 create_and_delete_problem_sets => "professor",
501 assign_problem_sets => $professor, 507 assign_problem_sets => "professor",
502 modify_problem_sets => $professor, 508 modify_problem_sets => "professor",
503 modify_student_data => $professor, 509 modify_student_data => "professor",
504 modify_classlist_files => $professor, 510 modify_classlist_files => "professor",
505 modify_set_def_files => $professor, 511 modify_set_def_files => "professor",
506 modify_scoring_files => $professor, 512 modify_scoring_files => "professor",
507 modify_problem_template_files => $professor, 513 modify_problem_template_files => "professor",
514 manage_course_files => "professor",
508 515
509 create_and_delete_courses => $professor, 516 create_and_delete_courses => "professor",
510 fix_course_databases => $professor, 517 fix_course_databases => "professor",
511 518
512 ##### Behavior of the interactive problem processor ##### 519 ##### Behavior of the interactive problem processor #####
513 520
514 show_correct_answers_before_answer_date => $ta, 521 show_correct_answers_before_answer_date => "ta",
515 show_solutions_before_answer_date => $ta, 522 show_solutions_before_answer_date => "ta",
516 avoid_recording_answers => $ta, 523 avoid_recording_answers => "ta",
524 # Below this level, old answers are never initially shown
517 can_show_old_answers_by_default => $student, 525 can_show_old_answers_by_default => "student",
526 # at this level, we look at showOldAnswers for default value
527 # even after the due date
528 can_always_use_show_old_answers_default => "professor",
518 check_answers_before_open_date => $ta, 529 check_answers_before_open_date => "ta",
519 check_answers_after_open_date_with_attempts => $ta, 530 check_answers_after_open_date_with_attempts => "ta",
520 check_answers_after_open_date_without_attempts => $guest, 531 check_answers_after_open_date_without_attempts => "guest",
521 check_answers_after_due_date => $guest, 532 check_answers_after_due_date => "guest",
522 check_answers_after_answer_date => $guest, 533 check_answers_after_answer_date => "guest",
523 record_answers_when_acting_as_student => $nobody, 534 record_answers_when_acting_as_student => undef,
524 # "record_answers_when_acting_as_student" takes precedence 535 # "record_answers_when_acting_as_student" takes precedence
525 # over the following for professors acting as students: 536 # over the following for professors acting as students:
526 record_answers_before_open_date => $nobody, 537 record_answers_before_open_date => undef,
527 record_answers_after_open_date_with_attempts => $student, 538 record_answers_after_open_date_with_attempts => "student",
528 record_answers_after_open_date_without_attempts => $nobody, 539 record_answers_after_open_date_without_attempts => undef,
529 record_answers_after_due_date => $nobody, 540 record_answers_after_due_date => undef,
530 record_answers_after_answer_date => $nobody, 541 record_answers_after_answer_date => undef,
531 dont_log_past_answers => $professor, 542 dont_log_past_answers => "professor",
532 543
533 ##### Behavior of the Hardcopy Processor ##### 544 ##### Behavior of the Hardcopy Processor #####
534 545
535 download_hardcopy_multiuser => $ta, 546 download_hardcopy_multiuser => "ta",
536 download_hardcopy_multiset => $ta, 547 download_hardcopy_multiset => "ta",
548 download_hardcopy_format_pdf => "guest",
537 download_hardcopy_format_tex => $ta, 549 download_hardcopy_format_tex => "ta",
550);
551
552################################################################################
553# Status system
554################################################################################
555
556# This is the default status given to new students and students with invalid
557# or missing statuses.
558$default_status = "Enrolled";
559
560# The first abbreviation in the abbreviations list is the canonical
561# abbreviation, and will be used when setting the status value in a user record
562# or an exported classlist file.
563#
564# Results are undefined if more than one status has the same abbreviation.
565#
566# The four behaviors that are controlled by status are:
567# allow_course_access => is this user allowed to log in?
568# include_in_assignment => is this user included when assigning as set to "all" users?
569# include_in_stats => is this user included in statistical reports?
570# include_in_email => is this user included in emails sent to the class?
571# include_in_scoring => is this user included in score reports?
572
573%statuses = (
574 Enrolled => {
575 abbrevs => [qw/ C c current enrolled /],
576 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
577 include_in_email include_in_scoring /],
578 },
579 Audit => {
580 abbrevs => [qw/ A a audit /],
581 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
582 include_in_email /],
583 },
584 Drop => {
585 abbrevs => [qw/ D d drop withdraw /],
586 behaviors => [qw/ /],
587 },
538); 588);
539 589
540################################################################################ 590################################################################################
541# Session options 591# Session options
542################################################################################ 592################################################################################

Legend:
Removed from v.3571  
changed lines
  Added in v.3691

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9