[system] / trunk / webwork2 / conf / global.conf.dist Repository:
ViewVC logotype

Diff of /trunk/webwork2/conf/global.conf.dist

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

Revision 2209 Revision 2477
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.69 2004/05/24 02:01:25 dpvc Exp $ 5# $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.86 2004/07/08 15:23:28 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.
20# All package variables set in this file are added to the course environment. 20# All package variables set in this file are added to the course environment.
21# If you wish to set a variable here but omit it from the course environment, 21# If you wish to set a variable here but omit it from the course environment,
22# use the "my" keyword. The following variables are available to this file: 22# use the "my" keyword. The following variables are available to this file:
23# 23#
24# $webworkRoot directory that contains the WeBWorK distribution 24# $webworkRoot directory that contains the WeBWorK distribution
25# corresponds to the directory !WEBWORK_ROOT! in the stanza below
25# $webworkURL base URL handled by Apache::WeBWorK 26# $webworkURLRoot base URL handled by Apache::WeBWorK
27# corresponds to url /webwork2 in the stanza below
26# $pgRoot directory that contains the PG distribution 28# $pgRoot directory that contains the PG distribution
29# corresponds to the directory !PG_ROOT! below
27# $courseName name of the course being used 30# $courseName name of the course being used (e.g. mth101)
31#
32# Stanza placed in the httpd.conf directory
33# <Location /webwork2>
34# SetHandler perl-script
35# PerlHandler Apache::WeBWorK
36#
37# PerlSetVar webwork_root !WEBWORK_ROOT!
38# PerlSetVar pg_root !PG_ROOT!
39# <Perl>
40# use lib '!WEBWORK_ROOT!/lib';
41# use lib '!PG_ROOT!/lib';
42# </Perl>
43# </Location>
28 44
29################################################################################ 45################################################################################
30# WeBWorK settings 46# The following two variables must match the first and second entries of the
47# AliasMatch statement placed in the httpd.conf file
31################################################################################ 48################################################################################
32 49
33%webworkDirs = (
34 root => "$webworkRoot",
35 DATA => "$webworkRoot/DATA",
36 uploadCache => "$webworkRoot/DATA/uploads",
37 bin => "$webworkRoot/bin",
38 conf => "$webworkRoot/conf",
39 courses => "$webworkRoot/courses",
40 htdocs => "$webworkRoot/htdocs",
41 htdocs_temp => "$webworkRoot/htdocs/tmp",
42 equationCache => "$webworkRoot/htdocs/tmp/equations",
43 lib => "$webworkRoot/lib",
44 logs => "$webworkRoot/logs",
45 macros => "$pgRoot/macros",
46 tmp => "$webworkRoot/tmp",
47);
48 50
49%webworkFiles = ( 51# The AliasMatch directive directs to files stored in the html directory of each course.
50 environment => "$webworkDirs{conf}/global.conf", 52# AliasMatch ^/webwork2_course_files/([^/]*)/(.*) !COURSES_ROOT!/$1/html/$2
51 hardcopySnippets => { 53# URL ---------> html directory of the course
52 preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", 54#
53 setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # hardcopySetHeader.pg", 55# $1 matches the courseName $2 matches any subdirectories of the course html directory
54 problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", 56# !COURSES_ROOT! matches $courseDirsRoot
55 setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg",
56 setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex",
57 userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex",
58 postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex",
59 },
60 screenSnippets => {
61 setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", # screenSetHeader.pg",
62 },
63 logs => {
64 timing => "$webworkDirs{logs}/timing.log",
65 },
66 equationCacheDB => "$webworkDirs{DATA}/equationcache",
67);
68
69%webworkURLs = (
70 root => "$webworkURLRoot",
71 home => "/webwork2_files/index.html",
72 htdocs => "/webwork2_files",
73 htdocs_temp => "/webwork2_files/tmp",
74 equationCache => "/webwork2_files/tmp/equations",
75 docs => "http://webhost.math.rochester.edu/webworkdocs/docs",
76 local_help => "/webwork2_files/helpFiles",
77 oldProf => "/webwork1/profLogin.pl",
78 jsMath => "/webwork2_files/jsMath/jsMath.js",
79 asciimath => "/webwork2_files/ASCIIMathML/ASCIIMathML.js",
80);
81
82################################################################################
83# Default course-specific settings
84################################################################################
85
86my $courseRoot = "$webworkDirs{courses}/$courseName";
87%courseDirs = (
88 root => "$courseRoot",
89 DATA => "$courseRoot/DATA",
90 auth_DATA => "$courseRoot/DATA/.auth",
91 html => "$courseRoot/html",
92 html_images => "$courseRoot/html/images",
93 html_temp => "$courseRoot/html/tmp",
94 logs => "$courseRoot/logs",
95 scoring => "$courseRoot/scoring",
96 templates => "$courseRoot/templates",
97 macros => "$courseRoot/templates/macros",
98 email => "$courseRoot/templates/email",
99);
100
101%courseFiles = (
102 environment => "$courseDirs{root}/course.conf",
103 motd => "$courseDirs{templates}/motd.txt",
104 logs => {
105 answer_log => "$courseDirs{logs}/answer_log",
106 },
107 course_info => "course_info.txt", # path relative to templates directory
108 login_info => "login_info.txt", # path relative to templates directory
109);
110
111# quick hack to fix transaction logging. blah.
112$webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log";
113$webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
114 57
115my $courseURLRoot = "/webwork2_course_files/$courseName"; 58my $courseURLRoot = "/webwork2_course_files/$courseName";
116%courseURLs = (
117 root => "$courseURLRoot",
118 html => "$courseURLRoot",
119 html_temp => "$courseURLRoot/tmp",
120);
121 59
122################################################################################ 60my $courseDirsRoot = "$webworkRoot/courses/";
123# Other site-specific options
124################################################################################
125 61
126%mail = ( 62
127 smtpServer => "mail.math.rochester.edu", 63# This alias directive redirects /webwork2_files to the toplevel material in the global webwork2/htdocs directory
128 smtpSender => "webwork\@math.rochester.edu", 64# Alias /webwork2_files/ !WEBWORK_ROOT!/htdocs/
65
66my $webworkLocalDocsURL = "/webwork2_files";
67my $webworkLocalDocsDir = "$webworkRoot/htdocs";
68################################################################################
69# System-wide locations (directories and URLs)
70################################################################################
71
72# The root directory, set by webwork_root variable in Apache configuration.
73$webworkDirs{root} = "$webworkRoot";
74
75# Location of system-wide data files.
76$webworkDirs{DATA} = "$webworkDirs{root}/DATA";
77
78# Used for temporary storage of uploaded files.
79$webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads";
80
81# Location of utility programs.
82$webworkDirs{bin} = "$webworkDirs{root}/bin";
83
84# Location of configuration files, templates, snippets, etc.
85$webworkDirs{conf} = "$webworkDirs{root}/conf";
86
87# Location of course directories.
88$webworkDirs{courses} = "$courseDirsRoot";
89
90# Contains the WeBWorK libraries. (FIXME: not used)
91#$webworkDirs{lib} = "$webworkDirs{root}/lib";
92
93# Contains log files.
94$webworkDirs{logs} = "$webworkDirs{root}/logs";
95
96# Location of PG macros. (FIXME: not used)
97#$webworkDirs{macros} = "$pgRoot/macros";
98
99# Contains non-web-accessible temporary files, such as TeX working directories.
100$webworkDirs{tmp} = "$webworkDirs{root}/tmp";
101
102##### The following locations are web-accessible.
103
104# The root URL (usually /webwork2), set by <Location> in Apache configuration.
105$webworkURLs{root} = "$webworkURLRoot";
106
107# Location of system-wide web-accessible files, such as equation images, and
108# help files.
109$webworkDirs{htdocs} = "$webworkLocalDocsDir";
110$webworkURLs{htdocs} = "$webworkLocalDocsURL";
111
112# The URL of the static WeBWorK home page (FIXME: not used)
113#$webworkURLs{home} = "$webworkURLs{htdocs}/index.html";
114
115# Location of web-accessible temporary files, such as equation images.
116$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
117$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";
118
119# Location of cached equation images.
120$webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations";
121$webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations";
122
123# Contains context-sensitive help files.
124$webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles";
125$webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles";
126
127# URL of general WeBWorK documentation.
128$webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs";
129
130# URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages.
131# Note that both systems must share a single "courses" directory for this to be
132# useful. Leave this blank to disable
133$webworkURLs{oldProf} = "/webwork1/profLogin.pl";
134
135# URL of WeBWorK Bugzilla database.
136$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl";
137
138# Location of jsMath script, used for the jsMath display mode.
139$webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath.js";
140
141# Location of ASCIIMathML script, used for the asciimath display mode.
142$webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js";
143
144################################################################################
145# Defaults for course-specific locations (directories and URLs)
146################################################################################
147
148# The root directory of the current course. (The ID of the current course is
149# available in $courseName.)
150$courseDirs{root} = "$webworkDirs{courses}/$courseName";
151
152# Location of course-specific data files, such as WW1 (GDBM) database files.
153$courseDirs{DATA} = "$courseDirs{root}/DATA";
154
155# Location of authentication data files when using a WW1 (GDBM) database.
156$courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth";
157
158# Location of course HTML files, passed to PG.
159$courseDirs{html} = "$courseDirs{root}/html";
160$courseURLs{html} = "/webwork2_course_files/$courseName";
161#$courseURLs{root} = $courseURLs{html}; # FIXME: not used
162
163# Location of course image files, passed to PG.
164$courseDirs{html_images} = "$courseDirs{html}/images";
165
166# Location of web-accessible, course-specific temporary files, like static and
167# dynamically-generated PG graphics.
168$courseDirs{html_temp} = "$courseDirs{html}/tmp";
169$courseURLs{html_temp} = "$courseURLs{html}/tmp";
170
171# Location of course-specific logs, like the transaction log.
172$courseDirs{logs} = "$courseDirs{root}/logs";
173
174# Location of scoring files.
175$courseDirs{scoring} = "$courseDirs{root}/scoring";
176
177# Location of PG templates and set definition files.
178$courseDirs{templates} = "$courseDirs{root}/templates";
179
180# Location of course-specific macro files.
181$courseDirs{macros} = "$courseDirs{templates}/macros";
182
183# Location of mail-merge templates.
184$courseDirs{email} = "$courseDirs{templates}/email";
185
186################################################################################
187# System-wide files
188################################################################################
189
190# Location of this file.
191$webworkFiles{environment} = "$webworkDirs{conf}/global.conf";
192
193# Flat-file database used to protect against MD5 hash collisions. TeX equations
194# are hashed to determine the name of the image file. There is a tiny chance of
195# a collision between two TeX strings. This file allows for that. However, this
196# is slow, so most people chose not to worry about it. Set this to "" if you
197# don't want to use the equation cache file.
198$webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache";
199
200##### Hardcopy snippets are used in constructing a TeX file for hardcopy output.
201##### They should contain TeX code unless otherwise noted.
202
203# The preamble is the first thing in the TeX file.
204$webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex";
205
206# The setHeader preceeds each set. It is a PG file.
207$webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg",
208
209# The problem divider goes between problems.
210$webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex";
211
212# The set footer goes after each set. Is is a PG file.
213$webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg";
214
215# The set divider goes between sets (in multiset output).
216$webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex";
217
218# The user divider does between users (in multiuser output).
219$webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex";
220
221# The postabmle is the last thing in the TeX file.
222$webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex";
223
224##### Screen snippets are used when displaying problem sets on the screen.
225
226# The set header is displayed on the problem set page. It is a PG file.
227$webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg"
228
229################################################################################
230# Course-specific files
231################################################################################
232
233# The course configuration file.
234$courseFiles{environment} = "$courseDirs{root}/course.conf";
235
236# The message of the day, displayed after login. (FIXME: not used)
237#$courseFiles{motd} = "$courseDirs{templates}/motd.txt";
238
239# File contents are displayed after login, on the problem sets page. Path given
240# here is relative to the templates directory.
241$courseFiles{course_info} = "course_info.txt";
242
243# File contents are displayed on the login page. Path given here is relative to
244# the templates directory.
245$courseFiles{login_info} = "login_info.txt";
246
247# Additional library buttons can be added to the Library Browser (SetMaker.pm)
248# by adding the libraries you want to the following line. For each key=>value
249# in the list, if a directory (or link to a directory) with name 'key' appears
250# in the templates directory, then a button with name 'value' will be placed at
251# the top of the problem browser. (No button will appear if there is no
252# directory or link with the given name in the templates directory.) For
253# example,
254#
255# $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"};
256#
257# would add two buttons, one for the Rochester library and one for the ASU
258# library, provided templates/rochester and templates/asu exists.
259#
260$courseFiles{problibs} = {};
261
262################################################################################
263# Logs
264################################################################################
265
266# FIXME: take logs out of %webworkFiles/%courseFiles and give them their own
267# top-level hash.
268
269# Logs data about how long it takes to process problems. (Do not confuse this
270# with the /other/ timing log which can be set by WeBWorK::Timing and is used
271# for benchmarking system performance in general. At some point, this timing
272# mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.)
273$webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log";
274
275# The transaction log contains data from each recorded answer submission. This
276# is useful if the database becomes corrupted.
277$webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log";
278
279# The past answer list stores a history of all users' submitted answers. (FIXME: not used)
280$webworkFiles{logs}{pastAnswerList} = "$courseDirs{logs}/past_answers.log";
281
282# The answer log stores a history of all users' submitted answers.
283$courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log";
284
285################################################################################
286# Mail settings
287################################################################################
288
289# Mail sent by the PG system and the mail merge and feedback modules will be
290# sent via this SMTP server.
291$mail{smtpServer} = 'mail.yourschool.edu';
292
293# When connecting to the above server, WeBWorK will send this address in the
294# MAIL FROM command. This has nothing to do with the "From" address on the mail
295# message. It can really be anything, but some mail servers require it contain
296# a valid mail domain, or at least be well-formed.
297$mail{smtpSender} = 'webwork@yourserver.yourschool.edu';
129 298
130 # allowedRecipients defines addresses that the PG system is allowed to 299# AllowedRecipients defines addresses that the PG system is allowed to send mail
131 # send mail to. this prevents subtle PG exploits. This should be set 300# to. this prevents subtle PG exploits. This should be set in course.conf to the
132 # in course.conf to the addresses of professors of each course. Sending 301# addresses of professors of each course. Sending mail from the PG system (i.e.
133 # mail from the PG system (i.e. questionaires, essay questions) will 302# questionaires, essay questions) will fail if this is not set somewhere (either
134 # fail if this is not set somewhere (either here or in course.conf). 303# here or in course.conf).
135 #allowedRecipients => [ 304$mail{allowedRecipients} = [
136 # 'prof1@host.yourdomain.edu', 305 #'prof1@yourserver.yourdomain.edu',
137 # 'prof2@host.yourdomain.edu', 306 #'prof2@yourserver.yourdomain.edu',
138 #], 307];
139 308
140 # if defined, feedbackRecipients overrides the list of recipients for 309# If defined, feedbackRecipients overrides the list of recipients for feedback
141 # feedback email. It's appropriate to set this in the course.conf for 310# email. It's appropriate to set this in the course.conf for specific courses,
142 # specific courses, but probably not in global.conf. if not defined, 311# but probably not in global.conf. if not defined, mail is sent to all
143 # mail is sent to all professors and TAs for a given course 312# professors and TAs for a given course
144 #feedbackRecipients => [ 313$mail{feedbackRecipients} = [
145 # 'prof1@host.yourdomain.edu', 314 #'prof1@yourserver.yourdomain.edu',
146 # 'prof2@host.yourdomain.edu', 315 #'prof2@yourserver.yourdomain.edu',
147 #], 316];
148 317
149 # feedbackVerbosity: 318# feedbackVerbosity:
150 # 0: send only the feedback comment and context link 319# 0: send only the feedback comment and context link
151 # 1: as in 0, plus user, set, problem, and PG data 320# 1: as in 0, plus user, set, problem, and PG data
152 # 2: as in 1, plus the problem environment (debugging data) 321# 2: as in 1, plus the problem environment (debugging data)
153 feedbackVerbosity => 1, 322$mail{feedbackVerbosity} = 1;
154 323
155 # defines the size of the Mail Merge editor window 324# Defines the size of the Mail Merge editor window
156 # FIXME: should this be here? it's UI, not mail 325# FIXME: should this be here? it's UI, not mail
157 # FIXME: replace this with the auto-size method that TWiki uses 326# FIXME: replace this with the auto-size method that TWiki uses
158 editor_window_rows => 15, 327$mail{editor_window_rows} = 15;
159 editor_window_columns => 100, 328$mail{editor_window_columns} = 100;
160);
161 329
162%externalPrograms = ( 330################################################################################
163 mkdir => "/bin/mkdir", 331# Paths to external programs
164 tth => "/usr/local/bin/tth", 332################################################################################
333
334$externalPrograms{mkdir} = "/bin/mkdir";
335$externalPrograms{mysql} = "/usr/local/bin/mysql";
336
337$externalPrograms{latex} = "/usr/local/bin/latex";
165 pdflatex => "/usr/local/bin/pdflatex", 338$externalPrograms{pdflatex} = "/usr/local/bin/pdflatex";
166 latex => "/usr/local/bin/latex", 339$externalPrograms{dvipng} = "/usr/local/bin/dvipng";
167 dvipng => "/usr/local/bin/dvipng", 340$externalPrograms{tth} = "/usr/local/bin/tth";
341
342# These image conversion utilities are included in the WeBWorK distribution.
168 gif2eps => "$webworkDirs{bin}/gif2eps", 343$externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps";
169 png2eps => "$webworkDirs{bin}/png2eps", 344$externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps";
170 gif2png => "$webworkDirs{bin}/gif2png", 345$externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png";
171 mysql => "/usr/local/bin/mysql",
172);
173 346
174%siteDefaults = ( 347################################################################################
175 status => { 348# Site defaults (FIXME: what other things could be "site defaults"?)
349################################################################################
350
351# Status strings -- lists valid status values and their names. If your site uses
352# additional values, add them here.
353$siteDefaults{status} = {
354 A => "Audit",
176 audit => "Audit", 355 audit => "Audit",
177 A => "Audit", 356 D => "Drop",
178 drop => "Drop", 357 drop => "Drop",
179 D => "Drop",
180 withdraw => "Drop", 358 withdraw => "Drop",
359 C => "Enrolled",
181 current => "Enrolled", 360 current => "Enrolled",
182 C => "Enrolled",
183 enrolled => "Enrolled", 361 enrolled => "Enrolled",
184 }, 362};
185);
186 363
187################################################################################ 364################################################################################
188# Frontend options 365# Frontend options
189################################################################################ 366################################################################################
190 367
199# Several database are defined in the file conf/database.conf and stored in the 376# Several database are defined in the file conf/database.conf and stored in the
200# hash %dbLayouts. 377# hash %dbLayouts.
201include "conf/database.conf"; 378include "conf/database.conf";
202 379
203# Select the default database layout. This can be overridden in the course.conf 380# Select the default database layout. This can be overridden in the course.conf
204# file of a particular course. 381# file of a particular course. If you choose "gdbm", WeBWorK will be able to
382# use courses from WeBWorK 1 without first adding course.conf files to them.
383# However, the recommended database layout for new courses is "sql". This can
384# be set when creating a course.
205#$dbLayoutName = "sql"; 385$dbLayoutName = "sql"; # or: "gdbm"
206$dbLayoutName = "gdbm";
207 386
387# This sets the symbol "dbLayout" as an alias for the selected database layout.
208*dbLayout = $dbLayouts{$dbLayoutName}; 388*dbLayout = $dbLayouts{$dbLayoutName};
209 389
210################################################################################ 390################################################################################
211# Problem library options 391# Problem library options
212################################################################################ 392################################################################################
213 393
214%problemLibrary = ( 394# The directory containing the problem library files. Set to "" if no problem
215 root => "", # set to the top of the problem library, if its installed 395# library is installed.
216 sourceSQL => "ProblemLibrary", 396$problemLibrary{root} = "";
217 userSQL => "webworkRead", 397
218 passwordSQL => "", 398# The name of the SQL database containing problem metadata
219); 399$problemLibrary{sourceSQL} = "ProblemLibrary";
400
401# The user name to use when connecting to the problem library database
402$problemLibrary{userSQL} = "webworkRead";
403
404# The password to use when connecting to the problem library database
405$problemLibrary{passwordSQL} = "";
220 406
221################################################################################ 407################################################################################
222# Authorization system 408# Authorization system
223################################################################################ 409################################################################################
224 410
225# This lets you specify a minimum permission level needed to perform certain 411# This lets you specify a minimum permission level needed to perform certain
226# actions. In the current system, >=10 will allow a professor to perform the 412# actions. In the current system, >=10 will allow a professor to perform the
227# action, >=5 will allow a TA to, and >=0 will allow a student to perform an 413# action, >=5 will allow a TA to, and >=0 will allow a student to perform an
228# action (almost never what you want). 414# action (almost never what you want).
415
416my $student = 0;
229my $ta = 5; 417my $ta = 5;
230my $professor = 10; 418my $professor = 10;
419
231%permissionLevels = ( 420%permissionLevels = (
421 report_bugs => $student,
422 view_multiple_sets => $ta,
423 view_unopened_sets => $ta,
424 view_unpublished_sets => $ta,
425 view_answers => $ta,
232 become_student => $professor, 426 become_student => $professor,
233 access_instructor_tools => $ta, 427 access_instructor_tools => $ta,
234 create_and_delete_problem_sets => $professor, 428 create_and_delete_problem_sets => $professor,
235 modify_problem_sets => $professor, 429 modify_problem_sets => $professor,
236 assign_problem_sets => $professor, 430 assign_problem_sets => $professor,
237 modify_student_data => $professor, 431 modify_student_data => $professor,
238 score_sets => $professor, 432 score_sets => $professor,
239 send_mail => $professor, 433 send_mail => $professor,
240 modify_classlist_files => $professor, 434 modify_classlist_files => $professor,
241 modify_set_def_files => $professor, 435 modify_set_def_files => $professor,
242 modify_scoring_files => $professor, 436 modify_scoring_files => $professor,
437 modify_problem_template_files => $professor,
243 create_and_delete_courses => $professor, 438 create_and_delete_courses => $professor,
439 fix_course_databases => $professor,
244); 440);
245 441
246################################################################################ 442################################################################################
247# Session options 443# Session options
248################################################################################ 444################################################################################
265# kindof a backdoor to the practice user system, since he doesn't have a 461# kindof a backdoor to the practice user system, since he doesn't have a
266# password. Come to think of it, why do we even have this?! 462# password. Come to think of it, why do we even have this?!
267#$debugPracticeUser = "practice666"; 463#$debugPracticeUser = "practice666";
268 464
269################################################################################ 465################################################################################
270# PG translation options 466# PG subsystem options
271################################################################################ 467################################################################################
272 468
273%pg = ( 469# List of enabled display modes. Comment out any modes you don't wish to make
274 # available display modes 470# available for use.
275 displayModes => [ qw(plainText formattedText images jsMath asciimath) ], 471$pg{displayModes} = [
276 # pg options 472 "plainText", # display raw TeX for math expressions
277 options => { 473 "formattedText", # format math expressions using TtH
278 # default translation options 474 "images", # display math expressions as images generated by dvipng
475 "jsMath", # render TeX math expressions on the client side using jsMath
476 "asciimath", # render TeX math expressions on the client side using ASCIIMathML
477];
478
479#### Default settings for the PG translator
480
481# Default display mode. Should be listed above.
279 displayMode => "images", 482$pg{options}{displayMode} = "images";
280 showOldAnswers => 1, 483
281 showCorrectAnswers => 0, 484# The default grader to use, if a problem doesn't specify.
282 showHints => 0, 485$pg{options}{grader} = "avg_problem_grader";
283 showSolutions => 0, 486
284 catchWarnings => 0, # there's a global warning catcher now 487# Fill in answer blanks with the student's last answer by default?
285 # default grader 488$pg{options}{showOldAnswers} = 1;
286 grader => "avg_problem_grader", 489
490# Show correct answers (when allowed) by default?
491$pg{options}{showCorrectAnswers} = 0;
492
493# Show hints (when allowed) by default?
494$pg{options}{showHints} = 0;
495
496# Show solutions (when allowed) by default?
497$pg{options}{showSolutions} = 0;
498
499# Catch translation warnings internally by default? (We no longer need to do
500# this, since there is a global warnings handler. So this should be off.)
501$pg{options}{catchWarnings} = 0;
502
503##### Currently-selected renderer
504
505# Only the local renderer is supported in this version.
506$pg{renderer} = "WeBWorK::PG::Local";
507
508# The remote renderer connects to an XML-RPC PG rendering server.
509#$pg{renderer} = "WeBWorK::PG::Remote"'
510
511##### Renderer-dependent options
512
513# The remote renderer has one option:
514$pg{renderers}{"WeBWorK::PG::Remote"} = {
515 # The "proxy" server to connect to for remote rendering.
516 proxy => "http://localhost:21000/RenderD",
517};
518
519##### Settings for various display modes
520
521# "images" mode has several settings:
522$pg{displayModeOptions}{images} = {
523 # Determines the method used to align images in output. Can be
524 # "baseline", "absmiddle", or "mysql".
525 dvipng_align => 'baseline',
526
527 # If we choose mysql, we need information on connecting to the
528 # database. Whatever you use here, you have to create the database
529 # and grant read/write priveleges to the user listed here. To create
530 # the database in mysql, as root use:
531 #
532 # CREATE DATABASE DvipngDepths;
533 # USE DvipngDepths;
534 # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5));
535 # GRANT ALL ON DvipngDepths.* TO webworkWrite;
536 #
537 # In the last statement, "webworkWrite" should match the user below.
538 dvipng_depth_db => {
539 dbsource => 'dbi:mysql:DvipngDepths',
540 user => $dbLayouts{sql}->{password}->{params}->{usernameRW},
541 passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW},
287 }, 542 },
288 # options for various renderers 543};
289 renderers => { 544
290 "WeBWorK::PG::Remote" => {
291 proxy => "http://localhost:21000/RenderD"
292 }
293 },
294 # currently selected renderer
295 renderer => "WeBWorK::PG::Local",
296 #renderer => "WeBWorK::PG::Remote",
297 # directories used by PG 545##### Directories used by PG
298 directories => { 546
299 # directories used only by PG 547# The root of the PG directory tree (from pg_root in Apache config).
300 root => "$pgRoot", 548$pg{directories}{root} = "$pgRoot";
301 lib => "$pgRoot/lib", 549$pg{directories}{lib} = "$pg{directories}{root}/lib";
302 macros => "$pgRoot/macros", 550$pg{directories}{macros} = "$pg{directories}{root}/macros";
303 }, 551
304 # this will be customized in the course.conf file 552##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.)
305 specialPGEnvironmentVars => { 553
306 PRINT_FILE_NAMES_FOR => [ qw(professor) ], 554# Users for whom to print the file name of the PG file being processed.
555$pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ];
556
557# Locations of CAPA resources. (Only necessary if you need to use converted CAPA
558# problems.)
307 CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", 559$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/",
308 CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", 560$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/",
561$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/",
309 CAPA_Graphics_URL => "$courseURLs{html}/CAPA_Graphics/", 562$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/",
310 CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/", 563
311 }, 564# Size in pixels of dynamically-generated images, i.e. graphs.
312 # modules lists module names and the packages each contains 565$pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400,
313 modules => [ 566
567##### PG modules to load
568
569# The first item of each list is the module to load. The remaining items are
570# additional packages to import.
571
572${pg}{modules} = [
314 [qw(DynaLoader)], 573 [qw(DynaLoader)],
315 [qw(Exporter)], 574 [qw(Exporter)],
316 [qw(GD)], 575 [qw(GD)],
317 576
318 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], 577 [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)],
319 [qw(AnswerHash AnswerEvaluator)], 578 [qw(AnswerHash AnswerEvaluator)],
320 [qw(WWPlot)], # required by Circle (and others) 579 [qw(WWPlot)], # required by Circle (and others)
321 [qw(Circle)], 580 [qw(Circle)],
322 [qw(Complex)], 581 [qw(Complex)],
323 [qw(Complex1)], 582 [qw(Complex1)],
324 [qw(Distributions)], 583 [qw(Distributions)],
325 [qw(Fraction)], 584 [qw(Fraction)],
326 [qw(Fun)], 585 [qw(Fun)],
327 [qw(Hermite)], 586 [qw(Hermite)],
328 [qw(Label)], 587 [qw(Label)],
329 [qw(List)], 588 [qw(List)],
330 [qw(Match)], 589 [qw(Match)],
331 [qw(MatrixReal1)], # required by Matrix 590 [qw(MatrixReal1)], # required by Matrix
332 [qw(Matrix)], 591 [qw(Matrix)],
333 [qw(Multiple)], 592 [qw(Multiple)],
334 [qw(PGrandom)], 593 [qw(PGrandom)],
335 [qw(Regression)], 594 [qw(Regression)],
336 [qw(Select)], 595 [qw(Select)],
337 [qw(Units)], 596 [qw(Units)],
338 [qw(VectorField)], 597 [qw(VectorField)],
339 ], 598];
340 # defaults used by answer evaluators 599
600##### Answer evaluatior defaults
601
341 ansEvalDefaults => { 602$pg{ansEvalDefaults} = {
342 functAbsTolDefault => .001, 603 functAbsTolDefault => .001,
343 functLLimitDefault => .0000001, 604 functLLimitDefault => .0000001,
344 functMaxConstantOfIntegration => 1E8, 605 functMaxConstantOfIntegration => 1E8,
345 functNumOfPoints => 3, 606 functNumOfPoints => 3,
346 functRelPercentTolDefault => .1, 607 functRelPercentTolDefault => .1,
347 functULimitDefault => .9999999, 608 functULimitDefault => .9999999,
348 functVarDefault => "x", 609 functVarDefault => "x",
349 functZeroLevelDefault => 1E-14, 610 functZeroLevelDefault => 1E-14,
350 functZeroLevelTolDefault => 1E-12, 611 functZeroLevelTolDefault => 1E-12,
351 numAbsTolDefault => .001, 612 numAbsTolDefault => .001,
352 numFormatDefault => "", 613 numFormatDefault => "",
353 numRelPercentTolDefault => .1, 614 numRelPercentTolDefault => .1,
354 numZeroLevelDefault => 1E-14, 615 numZeroLevelDefault => 1E-14,
355 numZeroLevelTolDefault => 1E-12, 616 numZeroLevelTolDefault => 1E-12,
356 useBaseTenLog => 0, 617 useBaseTenLog => 0,
357 defaultDisplayMatrixStyle => "[s]", 618 defaultDisplayMatrixStyle => "[s]",
358 }, 619};
359);

Legend:
Removed from v.2209  
changed lines
  Added in v.2477

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9