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

Legend:
Removed from v.2410  
changed lines
  Added in v.2519

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9