[system] / branches / rel-2-4-patches / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

Diff of /branches/rel-2-4-patches/webwork2/conf/global.conf.dist

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

Revision 2849 Revision 4195
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-2006 The WeBWorK Project, http://openwebwork.sf.net/
5# $CVSHeader: webwork2/conf/global.conf.dist,v 1.105 2004/09/27 17:16:14 sh002i Exp $ 5# $CVSHeader: webwork2/conf/global.conf.dist,v 1.169 2006/05/25 12:06:35 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.
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.
42 42
43# URL and path to courses directory. 43# URL and path to courses directory.
44$webwork_courses_url = "/webwork2_course_files"; 44$webwork_courses_url = "/webwork2_course_files";
45$webwork_courses_dir = "$webwork_dir/courses"; 45$webwork_courses_dir = "$webwork_dir/courses";
46 46
47# machine domain name (#FIXME can we get this automatically???) (needed to find applets)
48$domainName = "devel.webwork.rochester.edu:8002";
49
50
47################################################################################ 51################################################################################
48# Paths to external programs 52# Paths to external programs
49################################################################################ 53################################################################################
50 54
55# system utilties
51$externalPrograms{mkdir} = "/bin/mkdir"; 56$externalPrograms{mkdir} = "/bin/mkdir";
57$externalPrograms{mv} = "/bin/mv";
52$externalPrograms{mysql} = "/usr/local/bin/mysql"; 58$externalPrograms{mysql} = "/usr/bin/mysql";
59$externalPrograms{tar} = "/usr/bin/tar";
53 60
61# equation rendering/hardcopy utiltiies
54$externalPrograms{latex} = "/usr/local/bin/latex"; 62$externalPrograms{latex} = "/usr/bin/latex";
55$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files 63$externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --shell-escape allows pdflatex to handle .eps files
56$externalPrograms{dvipng} = "/usr/local/bin/dvipng"; 64$externalPrograms{dvipng} = "/usr/bin/dvipng";
57$externalPrograms{tth} = "/usr/local/bin/tth"; 65$externalPrograms{tth} = "/usr/bin/tth";
66
67# NetPBM - basic image manipulation utilities
68# most sites only need to configure $netpbm_prefix.
69my $netpbm_prefix = "/usr/bin";
70$externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm";
71$externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm";
72$externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops";
73$externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng";
74$externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm";
75
76# url checker
77$externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head "
78
79
80# image conversions utiltiies
81# the source file is given on stdin, and the output expected on stdout.
82#
83# Note on conversions pipelines:
84# we used to use `pnmdepth 1' instead of ppmtopgm as it creates a
85# monochrome image (1 bit) rather than a greyscale image (8 bits).
86# However, this was causing improper display of some sort in PDFs.
87$externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
88$externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null";
89$externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}";
58 90
59################################################################################ 91################################################################################
60# Mail settings 92# Mail settings
61################################################################################ 93################################################################################
62 94
67# When connecting to the above server, WeBWorK will send this address in the 99# When connecting to the above server, WeBWorK will send this address in the
68# MAIL FROM command. This has nothing to do with the "From" address on the mail 100# MAIL FROM command. This has nothing to do with the "From" address on the mail
69# message. It can really be anything, but some mail servers require it contain 101# message. It can really be anything, but some mail servers require it contain
70# a valid mail domain, or at least be well-formed. 102# a valid mail domain, or at least be well-formed.
71$mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; 103$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
72 104
73# AllowedRecipients defines addresses that the PG system is allowed to send mail 105# AllowedRecipients defines addresses that the PG system is allowed to send mail
74# to. this prevents subtle PG exploits. This should be set in course.conf to the 106# to. this prevents subtle PG exploits. This should be set in course.conf to the
75# addresses of professors of each course. Sending mail from the PG system (i.e. 107# addresses of professors of each course. Sending mail from the PG system (i.e.
76# questionaires, essay questions) will fail if this is not set somewhere (either 108# questionaires, essay questions) will fail if this is not set somewhere (either
77# here or in course.conf). 109# here or in course.conf).
78$mail{allowedRecipients} = [ 110$mail{allowedRecipients} = [
79 #'prof1@yourserver.yourdomain.edu', 111 #'prof1@yourserver.yourdomain.edu',
80 #'prof2@yourserver.yourdomain.edu', 112 #'prof2@yourserver.yourdomain.edu',
81]; 113];
82 114
83# If defined, feedbackRecipients overrides the list of recipients for feedback 115# By default, feeback is sent to all users who have permission to
84# email. It's appropriate to set this in the course.conf for specific courses, 116# receive_feedback. If this list is non-empty, feedback is also sent to the
85# but probably not in global.conf. if not defined, mail is sent to all 117# addresses specified here.
86# professors and TAs for a given course 118#
119# * If you want to disable feedback altogether, leave this empty and set
120# submit_feeback => $nobody in %permissionLevels below. This will cause the
121# feedback button to go away as well.
122#
123# * If you want to send email ONLY to addresses in this list, set
124# receive_feedback => $nobody in %permissionLevels below.
125#
126# It's often useful to set this in the course.conf to change the behavior of
127# feedback for a specific course.
128#
129# Items in this list may be bare addresses, or RFC822 mailboxes, like:
130# 'Joe User <joe.user@example.com>'
131# The advantage of this form is that the resulting email will include the name
132# of the recipient in the "To" field of the email.
133#
87#$mail{feedbackRecipients} = [ 134$mail{feedbackRecipients} = [
88# 'prof1@yourserver.yourdomain.edu', 135 #'prof1@yourserver.yourdomain.edu',
89# 'prof2@yourserver.yourdomain.edu', 136 #'prof2@yourserver.yourdomain.edu',
90#]; 137];
91 138
139# Feedback subject line -- the following escape sequences are recognized:
140#
141# %c = course ID
142# %u = user ID
143# %s = set ID
144# %p = problem ID
145# %x = section
146# %r = recitation
147# %% = literal percent sign
148#
149$mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r";
150
92# feedbackVerbosity: 151# feedbackVerbosity:
93# 0: send only the feedback comment and context link 152# 0: send only the feedback comment and context link
94# 1: as in 0, plus user, set, problem, and PG data 153# 1: as in 0, plus user, set, problem, and PG data
95# 2: as in 1, plus the problem environment (debugging data) 154# 2: as in 1, plus the problem environment (debugging data)
96$mail{feedbackVerbosity} = 1; 155$mail{feedbackVerbosity} = 1;
97 156
98# Defines the size of the Mail Merge editor window 157# Defines the size of the Mail Merge editor window
99# FIXME: should this be here? it's UI, not mail 158# FIXME: should this be here? it's UI, not mail
100# FIXME: replace this with the auto-size method that TWiki uses 159# FIXME: replace this with the auto-size method that TWiki uses
101$mail{editor_window_rows} = 15; 160$mail{editor_window_rows} = 15;
102$mail{editor_window_columns} = 100; 161$mail{editor_window_columns} = 100;
118$webworkDirs{bin} = "$webworkDirs{root}/bin"; 177$webworkDirs{bin} = "$webworkDirs{root}/bin";
119 178
120# Location of configuration files, templates, snippets, etc. 179# Location of configuration files, templates, snippets, etc.
121$webworkDirs{conf} = "$webworkDirs{root}/conf"; 180$webworkDirs{conf} = "$webworkDirs{root}/conf";
122 181
182# Location of theme templates.
183$webworkDirs{templates} = "$webworkDirs{conf}/templates";
184
123# Location of course directories. 185# Location of course directories.
124$webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; 186$webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses";
125 187
126# Contains log files. 188# Contains log files.
127$webworkDirs{logs} = "$webworkDirs{root}/logs"; 189$webworkDirs{logs} = "$webworkDirs{root}/logs";
128 190
129# Contains non-web-accessible temporary files, such as TeX working directories. 191# Contains non-web-accessible temporary files, such as TeX working directories.
130$webworkDirs{tmp} = "$webworkDirs{root}/tmp"; 192$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
193
194# The (absolute) destinations of symbolic links that are OK for the FileManager to follow.
195# (any subdirectory of these is a valid target for a symbolic link.)
196# For example:
197# $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"];
198$webworkDirs{valid_symlinks} = [];
131 199
132##### The following locations are web-accessible. 200##### The following locations are web-accessible.
133 201
134# The root URL (usually /webwork2), set by <Location> in Apache configuration. 202# The root URL (usually /webwork2), set by <Location> in Apache configuration.
135$webworkURLs{root} = "$webwork_url"; 203$webworkURLs{root} = "$webwork_url";
160$webworkURLs{oldProf} = "/webwork1/profLogin.pl"; 228$webworkURLs{oldProf} = "/webwork1/profLogin.pl";
161 229
162# URL of WeBWorK Bugzilla database. 230# URL of WeBWorK Bugzilla database.
163$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; 231$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/";
164 232
233# Location of CSS
234$webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css";
235
165# Location of jsMath script, used for the jsMath display mode. 236# Location of jsMath script, used for the jsMath display mode.
166$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js"; 237$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js";
167 238
168# Location of ASCIIMathML script, used for the asciimath display mode. 239# Location of ASCIIMathML script, used for the asciimath display mode.
169$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; 240$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
170 241
171################################################################################ 242################################################################################
176# available in $courseName.) 247# available in $courseName.)
177$courseDirs{root} = "$webworkDirs{courses}/$courseName"; 248$courseDirs{root} = "$webworkDirs{courses}/$courseName";
178 249
179# Location of course-specific data files, such as WW1 (GDBM) database files. 250# Location of course-specific data files, such as WW1 (GDBM) database files.
180$courseDirs{DATA} = "$courseDirs{root}/DATA"; 251$courseDirs{DATA} = "$courseDirs{root}/DATA";
181
182# Location of authentication data files when using a WW1 (GDBM) database.
183$courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth";
184 252
185# Location of course HTML files, passed to PG. 253# Location of course HTML files, passed to PG.
186$courseDirs{html} = "$courseDirs{root}/html"; 254$courseDirs{html} = "$courseDirs{root}/html";
187$courseURLs{html} = "$webwork_courses_url/$courseName"; 255$courseURLs{html} = "$webwork_courses_url/$courseName";
188 256
206# Location of course-specific macro files. 274# Location of course-specific macro files.
207$courseDirs{macros} = "$courseDirs{templates}/macros"; 275$courseDirs{macros} = "$courseDirs{templates}/macros";
208 276
209# Location of mail-merge templates. 277# Location of mail-merge templates.
210$courseDirs{email} = "$courseDirs{templates}/email"; 278$courseDirs{email} = "$courseDirs{templates}/email";
279
280# Location of temporary editing files.
281$courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit";
211 282
212################################################################################ 283################################################################################
213# System-wide files 284# System-wide files
214################################################################################ 285################################################################################
215 286
250##### Screen snippets are used when displaying problem sets on the screen. 321##### Screen snippets are used when displaying problem sets on the screen.
251 322
252# The set header is displayed on the problem set page. It is a PG file. 323# 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" 324$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
254 325
326# A PG template for creation of new problems.
327$webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg"
328
329# A site info "message of the day" file
330$webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt";
331
255################################################################################ 332################################################################################
256# Course-specific files 333# Course-specific files
257################################################################################ 334################################################################################
258 335
259# The course configuration file. 336# The course configuration file.
260$courseFiles{environment} = "$courseDirs{root}/course.conf"; 337$courseFiles{environment} = "$courseDirs{root}/course.conf";
338
339# The course simple configuration file (holds web-based configuratoin).
340$courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf";
261 341
262# File contents are displayed after login, on the problem sets page. Path given 342# File contents are displayed after login, on the problem sets page. Path given
263# here is relative to the templates directory. 343# here is relative to the templates directory.
264$courseFiles{course_info} = "course_info.txt"; 344$courseFiles{course_info} = "course_info.txt";
265 345
293 373
294################################################################################ 374################################################################################
295# Database options 375# Database options
296################################################################################ 376################################################################################
297 377
378# these variables are used by database.conf. we define them here so that editing
379# database.conf isn't necessary.
380$database_dsn = "dbi:mysql:webwork";
381$database_username = "webworkWrite";
382$database_password = "";
383$database_debug = 0;
384
385# Variables for sql_moodle database layout.
386$moodle_dsn = "dbi:mysql:moodle";
387$moodle_dsn = "dbi:mysql:moodle_sam";
388$moodle_table_prefix = "mdl_";
389$moodle_username = $database_username;
390$moodle_password = $database_password;
391
298# Several database are defined in the file conf/database.conf and stored in the 392# Several database are defined in the file conf/database.conf and stored in the
299# hash %dbLayouts. 393# hash %dbLayouts.
300include "conf/database.conf"; 394include "conf/database.conf";
301 395
302# Select the default database layout. This can be overridden in the course.conf 396# Select the default database layout. This can be overridden in the course.conf
303# file of a particular course. If you choose "gdbm", WeBWorK will be able to 397# file of a particular course. The only database layout supported in WW 2.1.4
304# use courses from WeBWorK 1 without first adding course.conf files to them. 398# and up is "sql_single".
305# However, the recommended database layout for new courses is "sql_single". This 399$dbLayoutName = "sql_single";
306# can be set when creating a course.
307$dbLayoutName = "sql_single"; # or "gdbm" or "sql"
308 400
309# This sets the symbol "dbLayout" as an alias for the selected database layout. 401# This sets the symbol "dbLayout" as an alias for the selected database layout.
310*dbLayout = $dbLayouts{$dbLayoutName}; 402*dbLayout = $dbLayouts{$dbLayoutName};
311 403
312################################################################################ 404################################################################################
314################################################################################ 406################################################################################
315 407
316# The directory containing the problem library files. Set to "" if no problem 408# The directory containing the problem library files. Set to "" if no problem
317# library is installed. 409# library is installed.
318$problemLibrary{root} = ""; 410$problemLibrary{root} = "";
411
412# Problem Library version
413# Version 1 is in use. Version 2 will be released soon.
414$problemLibrary{version} = "1";
319 415
320# The name of the SQL database containing problem metadata 416# The name of the SQL database containing problem metadata
321$problemLibrary{sourceSQL} = "ProblemLibrary"; 417$problemLibrary{sourceSQL} = "ProblemLibrary";
322 418
323# The user name to use when connecting to the problem library database 419# The user name to use when connecting to the problem library database
347$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; 443$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
348 444
349# The answer log stores a history of all users' submitted answers. 445# The answer log stores a history of all users' submitted answers.
350$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; 446$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
351 447
352################################################################################ 448# Log logins.
353# More paths to external programs 449$courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log";
354################################################################################
355 450
356# These image conversion utilities are included in the WeBWorK distribution. 451# Log for almost every click. By default it is the empty string, which
357$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps"; 452# turns this log off. If you want it turned on, we suggest
358$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps"; 453# "$courseDirs{logs}/activity.log"
359$externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png"; 454# When turned on, this log can get quite large.
455$courseFiles{logs}{activity_log} = '';
360 456
361################################################################################ 457################################################################################
362# Site defaults (FIXME: what other things could be "site defaults"?) 458# Site defaults (FIXME: what other things could be "site defaults"?)
363################################################################################ 459################################################################################
364 460
365# Status strings -- lists valid status values and their names. If your site uses
366# additional values, add them here.
367$siteDefaults{status} = {
368 A => "Audit",
369 audit => "Audit",
370 D => "Drop",
371 drop => "Drop",
372 withdraw => "Drop",
373 C => "Enrolled",
374 current => "Enrolled",
375 enrolled => "Enrolled",
376};
377
378# Set the default timezone of courses on this server. This must be a value valid 461# Set the default timezone of courses on this server. To get a list of valid
379# for the TZ environment variable. See also tzset(3). 462# timezones, run:
463#
464# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names'
465#
466# To get a list of valid timezone "links" (deprecated names), run:
467#
468# perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links'
380# 469#
381# If left blank, the system timezone will be used. This is usually what you 470# If left blank, the system timezone will be used. This is usually what you
382# want. You might want to set this if your server is NOT in the same timezone as 471# want. You might want to set this if your server is NOT in the same timezone as
383# your school. If just a few courses are in a different timezone, set this in 472# your school. If just a few courses are in a different timezone, set this in
384# course.conf for the affected courses instead. 473# course.conf for the affected courses instead.
385# 474#
386$siteDefaults{timezone} = ""; 475$siteDefaults{timezone} = "";
387 476
388################################################################################ 477# The default_templates_course is used by default to create a new course.
389# Frontend options 478# The contents of the templates directory are copied from this course
390################################################################################ 479# to the new course being created.
480$siteDefaults{default_templates_course} ="modelCourse";
391 481
392%templates = ( 482################################################################################
393 system => "$webworkDirs{conf}/templates/ur.template", 483# Theme
484################################################################################
485
486$defaultTheme = "math";
487$defaultThemeTemplate = "system";
488
489################################################################################
490# Authentication system
491################################################################################
492
493# FIXME This mechanism is a little awkward and probably should be merged with
494# the dblayout selection system somehow.
495
496# Select the authentication module to use for normal logins.
497#
498# If this value is a string, the given authentication module will be used
499# regardless of the database layout. If it is a hash, the database layout name
500# will be looked up in the hash and the resulting value will be used as the
501# authentication module. The special hash key "*" is used if no entry for the
502# current database layout is found.
503#
504$authen{user_module} = {
505 sql_moodle => "WeBWorK::Authen::Moodle",
506 "*" => "WeBWorK::Authen",
507};
508
509# Select the authentication module to use for proctor logins.
510#
511# A string or a hash is accepted, as above.
512#
513$authen{proctor_module} = "WeBWorK::Authen::Proctor";
514
515################################################################################
516# Authorization system
517################################################################################
518
519# this section lets you define which groups of users can perform which actions.
520
521# this hash maps a numeric permission level to the name of a role. the number
522# assigned to a role is significant -- roles with higher numbers are considered
523# "more privileged", and are included when that role is listed for a privilege
524# below.
525#
526%userRoles = (
527 guest => -5,
528 student => 0,
529 proctor => 2,
530 ta => 5,
531 professor => 10,
394); 532);
395 533
396################################################################################ 534# this hash maps operations to the roles that are allowed to perform those
397# Authorization system 535# operations. the role listed and any role with a higher permission level (in
398################################################################################ 536# the %userRoles hash) will be allowed to perform the operation. If the role
399 537# is undefined, no users will be allowed to perform the operation.
400# This lets you specify a minimum permission level needed to perform certain 538#
401# actions. In the current system, >=10 will allow a professor to perform the
402# action, >=5 will allow a TA to, and >=0 will allow a student to perform an
403# action (almost never what you want).
404
405my $student = 0;
406my $ta = 5;
407my $professor = 10;
408my $nobody = undef;
409
410%permissionLevels = ( 539%permissionLevels = (
540 login => "guest",
411 report_bugs => $student, 541 report_bugs => "student",
412 submit_feedback => $student, 542 submit_feedback => "student",
413 change_password => $student, 543 change_password => "student",
414 change_email_address => $student, 544 change_email_address => "student",
415 545
546 proctor_quiz => "proctor",
547 view_proctored_tests => "ta",
548
416 view_multiple_sets => $ta, 549 view_multiple_sets => "ta",
417 view_unopened_sets => $ta, 550 view_unopened_sets => "ta",
418 view_unpublished_sets => $ta, 551 view_unpublished_sets => "ta",
419 view_answers => $ta, 552 view_answers => "ta",
420 553
421 become_student => $professor, 554 become_student => "professor",
422 access_instructor_tools => $ta, 555 access_instructor_tools => "ta",
423 score_sets => $professor, 556 score_sets => "professor",
424 send_mail => $professor, 557 send_mail => "professor",
425 receive_feedback => $ta, 558 receive_feedback => "ta",
426 559
427 create_and_delete_problem_sets => $professor, 560 create_and_delete_problem_sets => "professor",
428 assign_problem_sets => $professor, 561 assign_problem_sets => "professor",
429 modify_problem_sets => $professor, 562 modify_problem_sets => "professor",
430 modify_student_data => $professor, 563 modify_student_data => "professor",
431 modify_classlist_files => $professor, 564 modify_classlist_files => "professor",
432 modify_set_def_files => $professor, 565 modify_set_def_files => "professor",
433 modify_scoring_files => $professor, 566 modify_scoring_files => "professor",
434 modify_problem_template_files => $professor, 567 modify_problem_template_files => "professor",
568 manage_course_files => "professor",
435 569
436 create_and_delete_courses => $professor, 570 create_and_delete_courses => "professor",
437 fix_course_databases => $professor, 571 fix_course_databases => "professor",
438 572
439 ##### Behavior of the interactive problem processor ##### 573 ##### Behavior of the interactive problem processor #####
440 574
441 show_correct_answers_before_answer_date => $ta, 575 show_correct_answers_before_answer_date => "ta",
442 show_solutions_before_answer_date => $ta, 576 show_solutions_before_answer_date => "ta",
443 avoid_recording_answers => $ta, 577 avoid_recording_answers => "ta",
578 # Below this level, old answers are never initially shown
579 can_show_old_answers_by_default => "student",
580 # at this level, we look at showOldAnswers for default value
581 # even after the due date
582 can_always_use_show_old_answers_default => "professor",
444 check_answers_before_open_date => $ta, 583 check_answers_before_open_date => "ta",
445 check_answers_after_open_date_with_attempts => $ta, 584 check_answers_after_open_date_with_attempts => "ta",
446 check_answers_after_open_date_without_attempts => $student, 585 check_answers_after_open_date_without_attempts => "guest",
447 check_answers_after_due_date => $student, 586 check_answers_after_due_date => "guest",
448 check_answers_after_answer_date => $student, 587 check_answers_after_answer_date => "guest",
449 record_answers_when_acting_as_student => $nobody, 588 record_answers_when_acting_as_student => undef,
450 # "record_answers_when_acting_as_student" takes precedence 589 # "record_answers_when_acting_as_student" takes precedence
451 # over the following for professors acting as students: 590 # over the following for professors acting as students:
452 record_answers_before_open_date => $nobody, 591 record_answers_before_open_date => undef,
453 record_answers_after_open_date_with_attempts => $student, 592 record_answers_after_open_date_with_attempts => "student",
454 record_answers_after_open_date_without_attempts => $nobody, 593 record_answers_after_open_date_without_attempts => undef,
455 record_answers_after_due_date => $nobody, 594 record_answers_after_due_date => undef,
456 record_answers_after_answer_date => $nobody, 595 record_answers_after_answer_date => undef,
457 dont_log_past_answers => $professor, 596 dont_log_past_answers => "professor",
597 # does the user get to see a dump of the problem?
598 view_problem_debugging_info => "ta",
458 599
459 ##### Behavior of the Hardcopy Processor ##### 600 ##### Behavior of the Hardcopy Processor #####
460 601
461 download_hardcopy_multiuser => $ta, 602 download_hardcopy_multiuser => "ta",
462 download_hardcopy_multiset => $ta, 603 download_hardcopy_multiset => "ta",
604 download_hardcopy_format_pdf => "guest",
463 download_hardcopy_format_tex => $ta, 605 download_hardcopy_format_tex => "ta",
606);
607
608# This is the default permission level given to new students and students with
609# invalid or missing permission levels.
610$default_permission_level = $userRoles{student};
611
612################################################################################
613# Status system
614################################################################################
615
616# This is the default status given to new students and students with invalid
617# or missing statuses.
618$default_status = "Enrolled";
619
620# The first abbreviation in the abbreviations list is the canonical
621# abbreviation, and will be used when setting the status value in a user record
622# or an exported classlist file.
623#
624# Results are undefined if more than one status has the same abbreviation.
625#
626# The four behaviors that are controlled by status are:
627# allow_course_access => is this user allowed to log in?
628# include_in_assignment => is this user included when assigning as set to "all" users?
629# include_in_stats => is this user included in statistical reports?
630# include_in_email => is this user included in emails sent to the class?
631# include_in_scoring => is this user included in score reports?
632
633%statuses = (
634 Enrolled => {
635 abbrevs => [qw/ C c current enrolled /],
636 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
637 include_in_email include_in_scoring /],
638 },
639 Audit => {
640 abbrevs => [qw/ A a audit /],
641 behaviors => [qw/ allow_course_access include_in_assignment include_in_stats
642 include_in_email /],
643 },
644 Drop => {
645 abbrevs => [qw/ D d drop withdraw /],
646 behaviors => [qw/ /],
647 },
464); 648);
465 649
466################################################################################ 650################################################################################
467# Session options 651# Session options
468################################################################################ 652################################################################################
469 653
470# $sessionKeyTimeout defines seconds of inactivity before a key expires 654# $sessionKeyTimeout defines seconds of inactivity before a key expires
471$sessionKeyTimeout = 60*30; 655$sessionKeyTimeout = 60*30;
472 656
473# $sessionKeyLength defines the length (in characters) of the session key 657# $sessionKeyLength defines the length (in characters) of the session key
474$sessionKeyLength = 40; 658$sessionKeyLength = 32;
475 659
476# @sessionKeyChars lists the legal session key characters 660# @sessionKeyChars lists the legal session key characters
477@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); 661@sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9');
478 662
479# Practice users are users who's names start with $practiceUser 663# Practice users are users who's names start with $practiceUser
480# (you can comment this out to remove practice user support) 664# (you can comment this out to remove practice user support)
481$practiceUserPrefix = "practice"; 665$practiceUserPrefix = "practice";
482 666
483# There is a practice user who can be logged in multiple times. He's 667# There is a practice user who can be logged in multiple times. He's
484# commented out by default, though, so you don't hurt yourself. It is 668# commented out by default, though, so you don't hurt yourself. It is
485# kindof a backdoor to the practice user system, since he doesn't have a 669# kindof a backdoor to the practice user system, since he doesn't have a
486# password. Come to think of it, why do we even have this?! 670# password. Come to think of it, why do we even have this?!
487#$debugPracticeUser = "practice666"; 671#$debugPracticeUser = "practice666";
672
673# Option for gateway tests; $gatewayGracePeriod is the time in seconds
674# after the official due date during which we'll still grade the test
675$gatewayGracePeriod = 120;
488 676
489################################################################################ 677################################################################################
490# PG subsystem options 678# PG subsystem options
491################################################################################ 679################################################################################
492 680
528 716
529# Only the local renderer is supported in this version. 717# Only the local renderer is supported in this version.
530$pg{renderer} = "WeBWorK::PG::Local"; 718$pg{renderer} = "WeBWorK::PG::Local";
531 719
532# The remote renderer connects to an XML-RPC PG rendering server. 720# The remote renderer connects to an XML-RPC PG rendering server.
533#$pg{renderer} = "WeBWorK::PG::Remote"' 721#$pg{renderer} = "WeBWorK::PG::Remote";
534 722
535##### Renderer-dependent options 723##### Renderer-dependent options
536 724
537# The remote renderer has one option: 725# The remote renderer has one option:
538$pg{renderers}{"WeBWorK::PG::Remote"} = { 726$pg{renderers}{"WeBWorK::PG::Remote"} = {
560 # 748 #
561 # In the last statement, "webworkWrite" should match the user below. 749 # In the last statement, "webworkWrite" should match the user below.
562 # FIXME: this database can become a table in the 'webwork' database 750 # FIXME: this database can become a table in the 'webwork' database
563 dvipng_depth_db => { 751 dvipng_depth_db => {
564 dbsource => 'dbi:mysql:DvipngDepths', 752 dbsource => 'dbi:mysql:DvipngDepths',
565 user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, 753 user => $dbLayouts{sql_single}->{password}->{params}->{usernameRW},
566 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, 754 passwd => $dbLayouts{sql_single}->{password}->{params}->{passwordRW},
567 }, 755 },
756};
757
758$pg{displayModeOptions}{jsMath} = {
759 reportMissingFonts => 0, # set to 1 to allow the missing font message
760 missingFontMessage => undef, # set to an HTML string to replace the missing font message
761 noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts
762 processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source
568}; 763};
569 764
570##### Directories used by PG 765##### Directories used by PG
571 766
572# The root of the PG directory tree (from pg_root in Apache config). 767# The root of the PG directory tree (from pg_root in Apache config).
573$pg{directories}{root} = "$pg_dir"; 768$pg{directories}{root} = "$pg_dir";
574$pg{directories}{lib} = "$pg{directories}{root}/lib"; 769$pg{directories}{lib} = "$pg{directories}{root}/lib";
575$pg{directories}{macros} = "$pg{directories}{root}/macros"; 770$pg{directories}{macros} = "$pg{directories}{root}/macros";
771$pg{directories}{applets} = "http://$domainName$webwork_htdocs_url/applets";
772
773#
774# The macro file search path. Each directory in this list is seached
775# (in this order) by loadMacros() when it looks for a .pl file.
776#
777$pg{directories}{macrosPath} = [
778 ".", # search the problem file's directory
779 $courseDirs{macros},
780 $pg{directories}{macros},
781];
782
783$pg{directories}{appletPath} = [ # paths to search for applets (requires full url)
784 $pg{directories}{applets},
785 "http://$domainName$courseURLs{html}/applets",
786];
576 787
577##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) 788##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
578 789
579# Users for whom to print the file name of the PG file being processed. 790# Users for whom to print the file name of the PG file being processed.
580$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; 791$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
586$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", 797$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
587$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", 798$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/",
588 799
589# Size in pixels of dynamically-generated images, i.e. graphs. 800# Size in pixels of dynamically-generated images, i.e. graphs.
590$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, 801$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
802
803# To disable the Parser-based versions of num_cmp and fun_cmp, and use the
804# original versions instead, set this value to 1.
805$pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0;
806
807# Strings to insert at the start and end of the body of a problem
808# (at beginproblem() and ENDDOCUMENT) in various modes. More display modes
809# can be added if different behaviours are desired (e.g., HTML_dpng,
810# HTML_asciimath, etc.). These parts are not used in the Library browser.
811
812$pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' };
813$pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
814
815# To have the problem body indented and boxed, uncomment:
816
817# $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE>
818# <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>';
819# $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE>
820# </BLOCKQUOTE>';
591 821
592##### PG modules to load 822##### PG modules to load
593 823
594# The first item of each list is the module to load. The remaining items are 824# The first item of each list is the module to load. The remaining items are
595# additional packages to import. 825# additional packages to import.
597${pg}{modules} = [ 827${pg}{modules} = [
598 [qw(DynaLoader)], 828 [qw(DynaLoader)],
599 [qw(Exporter)], 829 [qw(Exporter)],
600 [qw(GD)], 830 [qw(GD)],
601 831
602 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], 832 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)],
603 [qw(AnswerHash AnswerEvaluator)], 833 [qw(AnswerHash AnswerEvaluator)],
604 [qw(WWPlot)], # required by Circle (and others) 834 [qw(WWPlot)], # required by Circle (and others)
605 [qw(Circle)], 835 [qw(Circle)],
606 [qw(Complex)], 836 [qw(Complex)],
607 [qw(Complex1)], 837 [qw(Complex1)],
619 [qw(Regression)], 849 [qw(Regression)],
620 [qw(Select)], 850 [qw(Select)],
621 [qw(Units)], 851 [qw(Units)],
622 [qw(VectorField)], 852 [qw(VectorField)],
623 [qw(Parser Value)], 853 [qw(Parser Value)],
854 [qw(Parser::Legacy)],
624]; 855];
625 856
626##### Answer evaluatior defaults 857##### Answer evaluatior defaults
627 858
628$pg{ansEvalDefaults} = { 859$pg{ansEvalDefaults} = {

Legend:
Removed from v.2849  
changed lines
  Added in v.4195

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9