| 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-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.48 2004/02/12 04:25:47 sh002i Exp $ |
5 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.203 2008/02/04 22:54:56 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 | # |
23 | # configuration file (webwork.apache-config) and is available for use here. In |
| 24 | # $webworkRoot directory that contains the WeBWorK distribution |
24 | # addition, the $courseName variable holds the name of the current course. |
| 25 | # $webworkURL base URL handled by Apache::WeBWorK |
|
|
| 26 | # $pgRoot directory that contains the PG distribution |
|
|
| 27 | # $courseName name of the course being used |
|
|
| 28 | |
25 | |
| 29 | ################################################################################ |
26 | ################################################################################ |
| 30 | # WeBWorK settings |
27 | # Seed variables |
| 31 | ################################################################################ |
28 | ################################################################################ |
| 32 | |
29 | |
| 33 | %webworkDirs = ( |
30 | # Set these variables to correspond to your configuration and preferences. You |
| 34 | root => "$webworkRoot", |
31 | # will need to restart the webserver to reset the variables in this section. |
| 35 | DATA => "$webworkRoot/DATA", |
32 | |
| 36 | uploadCache => "$webworkRoot/DATA/uploads", |
33 | # URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "". |
| 37 | bin => "$webworkRoot/bin", |
34 | $webwork_url = "/webwork2"; |
| 38 | conf => "$webworkRoot/conf", |
35 | |
| 39 | courses => "$webworkRoot/courses", |
36 | # Root directory of PG. |
| 40 | htdocs => "$webworkRoot/htdocs", |
37 | $pg_dir = "/opt/webwork/pg"; |
| 41 | htdocs_temp => "$webworkRoot/htdocs/tmp", |
38 | |
|
|
39 | # URL and path to htdocs directory. |
|
|
40 | $webwork_htdocs_url = "/webwork2_files"; |
|
|
41 | $webwork_htdocs_dir = "$webwork_dir/htdocs"; |
|
|
42 | |
|
|
43 | # URL and path to courses directory. |
|
|
44 | $webwork_courses_url = "/webwork2_course_files"; |
|
|
45 | #$webwork_courses_dir = "/opt/webwork/courses"; |
|
|
46 | |
|
|
47 | ################################################################################ |
|
|
48 | # Paths to external programs |
|
|
49 | ################################################################################ |
|
|
50 | |
|
|
51 | # system utilties |
|
|
52 | $externalPrograms{mv} = "/bin/mv"; |
|
|
53 | $externalPrograms{cp} = "/bin/cp"; |
|
|
54 | $externalPrograms{rm} = "/bin/rm"; |
|
|
55 | $externalPrograms{mkdir} = "/bin/mkdir"; |
|
|
56 | $externalPrograms{tar} = "/bin/tar"; |
|
|
57 | $externalPrograms{gzip} = "/bin/gzip"; |
|
|
58 | |
|
|
59 | # equation rendering/hardcopy utiltiies |
|
|
60 | $externalPrograms{latex} = "/usr/bin/latex"; |
|
|
61 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; |
|
|
62 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
|
|
63 | $externalPrograms{tth} = "/usr/bin/tth"; |
|
|
64 | |
|
|
65 | # NetPBM - basic image manipulation utilities |
|
|
66 | # Most sites only need to configure $netpbm_prefix. |
|
|
67 | my $netpbm_prefix = "/usr/bin"; |
|
|
68 | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; |
|
|
69 | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; |
|
|
70 | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; |
|
|
71 | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; |
|
|
72 | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; |
|
|
73 | |
|
|
74 | # url checker |
|
|
75 | $externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head " |
|
|
76 | |
|
|
77 | # image conversions utiltiies |
|
|
78 | # the source file is given on stdin, and the output expected on stdout. |
|
|
79 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
80 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
81 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
|
|
82 | |
|
|
83 | # mysql clients |
|
|
84 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
|
|
85 | $externalPrograms{mysqldump} = "/usr/bin/mysqldump"; |
|
|
86 | |
|
|
87 | ################################################################################ |
|
|
88 | # Mail settings |
|
|
89 | ################################################################################ |
|
|
90 | |
|
|
91 | # Mail sent by the PG system and the mail merge and feedback modules will be |
|
|
92 | # sent via this SMTP server. |
|
|
93 | $mail{smtpServer} = 'mail.yourschool.edu'; |
|
|
94 | |
|
|
95 | # When connecting to the above server, WeBWorK will send this address in the |
|
|
96 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
|
|
97 | # message. It can really be anything, but some mail servers require it contain |
|
|
98 | # a valid mail domain, or at least be well-formed. |
|
|
99 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
|
|
100 | |
|
|
101 | # Seconds to wait before timing out when connecting to the SMTP server. |
|
|
102 | $mail{smtpTimeout} = 30; |
|
|
103 | |
|
|
104 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
|
|
105 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
|
|
106 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
|
|
107 | # questionaires, essay questions) will fail if this is not set somewhere (either |
|
|
108 | # here or in course.conf). |
|
|
109 | $mail{allowedRecipients} = [ |
|
|
110 | #'prof1@yourserver.yourdomain.edu', |
|
|
111 | #'prof2@yourserver.yourdomain.edu', |
|
|
112 | ]; |
|
|
113 | |
|
|
114 | # By default, feeback is sent to all users who have permission to |
|
|
115 | # receive_feedback. If this list is non-empty, feedback is also sent to the |
|
|
116 | # addresses specified here. |
|
|
117 | # |
|
|
118 | # * If you want to disable feedback altogether, leave this empty and set |
|
|
119 | # submit_feeback => $nobody in %permissionLevels below. This will cause the |
|
|
120 | # feedback button to go away as well. |
|
|
121 | # |
|
|
122 | # * If you want to send email ONLY to addresses in this list, set |
|
|
123 | # receive_feedback => $nobody in %permissionLevels below. |
|
|
124 | # |
|
|
125 | # It's often useful to set this in the course.conf to change the behavior of |
|
|
126 | # feedback for a specific course. |
|
|
127 | # |
|
|
128 | # Items in this list may be bare addresses, or RFC822 mailboxes, like: |
|
|
129 | # 'Joe User <joe.user@example.com>' |
|
|
130 | # The advantage of this form is that the resulting email will include the name |
|
|
131 | # of the recipient in the "To" field of the email. |
|
|
132 | # |
|
|
133 | $mail{feedbackRecipients} = [ |
|
|
134 | #'prof1@yourserver.yourdomain.edu', |
|
|
135 | #'prof2@yourserver.yourdomain.edu', |
|
|
136 | ]; |
|
|
137 | |
|
|
138 | # Feedback subject line -- the following escape sequences are recognized: |
|
|
139 | # |
|
|
140 | # %c = course ID |
|
|
141 | # %u = user ID |
|
|
142 | # %s = set ID |
|
|
143 | # %p = problem ID |
|
|
144 | # %x = section |
|
|
145 | # %r = recitation |
|
|
146 | # %% = literal percent sign |
|
|
147 | # |
|
|
148 | |
|
|
149 | $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r"; |
|
|
150 | |
|
|
151 | # feedbackVerbosity: |
|
|
152 | # 0: send only the feedback comment and context link |
|
|
153 | # 1: as in 0, plus user, set, problem, and PG data |
|
|
154 | # 2: as in 1, plus the problem environment (debugging data) |
|
|
155 | $mail{feedbackVerbosity} = 1; |
|
|
156 | |
|
|
157 | # Defines the size of the Mail Merge editor window |
|
|
158 | # FIXME: should this be here? it's UI, not mail |
|
|
159 | # FIXME: replace this with the auto-size method that TWiki uses |
|
|
160 | $mail{editor_window_rows} = 15; |
|
|
161 | $mail{editor_window_columns} = 100; |
|
|
162 | |
|
|
163 | # Use this to customize the text of the feedback button. |
|
|
164 | $feedback_button_name = "Email instructor"; |
|
|
165 | |
|
|
166 | ################################################################################ |
|
|
167 | # Theme |
|
|
168 | ################################################################################ |
|
|
169 | |
|
|
170 | $defaultTheme = "math"; |
|
|
171 | $defaultThemeTemplate = "system"; |
|
|
172 | |
|
|
173 | ################################################################################ |
|
|
174 | # System-wide locations (directories and URLs) |
|
|
175 | ################################################################################ |
|
|
176 | |
|
|
177 | # The root directory, set by webwork_root variable in Apache configuration. |
|
|
178 | $webworkDirs{root} = "$webwork_dir"; |
|
|
179 | |
|
|
180 | # Location of system-wide data files. |
|
|
181 | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; |
|
|
182 | |
|
|
183 | # Used for temporary storage of uploaded files. |
|
|
184 | $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads"; |
|
|
185 | |
|
|
186 | # Location of utility programs. |
|
|
187 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
|
|
188 | |
|
|
189 | # Location of configuration files, templates, snippets, etc. |
|
|
190 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
|
|
191 | |
|
|
192 | # Location of theme templates. |
|
|
193 | $webworkDirs{templates} = "$webworkDirs{conf}/templates"; |
|
|
194 | |
|
|
195 | # Location of course directories. |
|
|
196 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
|
|
197 | |
|
|
198 | # Contains log files. |
|
|
199 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
|
|
200 | |
|
|
201 | # Contains non-web-accessible temporary files, such as TeX working directories. |
|
|
202 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
|
|
203 | |
|
|
204 | # The (absolute) destinations of symbolic links that are OK for the FileManager to follow. |
|
|
205 | # (any subdirectory of these is a valid target for a symbolic link.) |
|
|
206 | # For example: |
|
|
207 | # $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"]; |
|
|
208 | $webworkDirs{valid_symlinks} = []; |
|
|
209 | |
|
|
210 | ################################################################################ |
|
|
211 | ##### The following locations are web-accessible. |
|
|
212 | ################################################################################ |
|
|
213 | |
|
|
214 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
|
|
215 | $webworkURLs{root} = "$webwork_url"; |
|
|
216 | |
|
|
217 | # Location of system-wide web-accessible files, such as equation images, and |
|
|
218 | # help files. |
|
|
219 | $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs"; |
|
|
220 | $webworkURLs{htdocs} = "$webwork_htdocs_url"; |
|
|
221 | |
|
|
222 | # Location of web-accessible temporary files, such as equation images. |
|
|
223 | $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; |
|
|
224 | $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; |
|
|
225 | |
|
|
226 | # Location of cached equation images. |
|
|
227 | $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; |
| 42 | equationCache => "$webworkRoot/htdocs/tmp/equations", |
228 | $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; |
| 43 | lib => "$webworkRoot/lib", |
229 | |
| 44 | logs => "$webworkRoot/logs", |
230 | # Contains context-sensitive help files. |
| 45 | macros => "$pgRoot/macros", |
231 | $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles"; |
| 46 | tmp => "$webworkRoot/tmp", |
232 | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; |
|
|
233 | |
|
|
234 | # URL of general WeBWorK documentation. |
|
|
235 | $webworkURLs{docs} = "http://webwork.maa.org"; |
|
|
236 | |
|
|
237 | # URL of WeBWorK Bugzilla database. |
|
|
238 | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; |
|
|
239 | |
|
|
240 | # Location of CSS |
|
|
241 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/${defaultTheme}.css"; |
|
|
242 | |
|
|
243 | # Location of jsMath script, used for the jsMath display mode. |
|
|
244 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
|
|
245 | |
|
|
246 | # Location of ASCIIMathML script, used for the asciimath display mode. |
|
|
247 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
|
|
248 | |
|
|
249 | # Location of LaTeXMathML script, used for the LaTeXMathML display mode. |
|
|
250 | $webworkURLs{LaTeXMathML} = "$webworkURLs{htdocs}/LaTeXMathML/LaTeXMathML.js"; |
|
|
251 | |
|
|
252 | ################################################################################ |
|
|
253 | # Defaults for course-specific locations (directories and URLs) |
|
|
254 | ################################################################################ |
|
|
255 | |
|
|
256 | # The root directory of the current course. (The ID of the current course is |
|
|
257 | # available in $courseName.) |
|
|
258 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
|
|
259 | |
|
|
260 | # Location of course-specific data files. |
|
|
261 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
|
|
262 | |
|
|
263 | # Location of course HTML files, passed to PG. |
|
|
264 | $courseDirs{html} = "$courseDirs{root}/html"; |
|
|
265 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
|
|
266 | |
|
|
267 | # Location of course image files, passed to PG. |
|
|
268 | $courseDirs{html_images} = "$courseDirs{html}/images"; |
|
|
269 | |
|
|
270 | # Location of web-accessible, course-specific temporary files, like static and |
|
|
271 | # dynamically-generated PG graphics. |
|
|
272 | $courseDirs{html_temp} = "$courseDirs{html}/tmp"; |
|
|
273 | $courseURLs{html_temp} = "$courseURLs{html}/tmp"; |
|
|
274 | |
|
|
275 | # Location of course-specific logs, like the transaction log. |
|
|
276 | $courseDirs{logs} = "$courseDirs{root}/logs"; |
|
|
277 | |
|
|
278 | # Location of scoring files. |
|
|
279 | $courseDirs{scoring} = "$courseDirs{root}/scoring"; |
|
|
280 | |
|
|
281 | # Location of PG templates and set definition files. |
|
|
282 | $courseDirs{templates} = "$courseDirs{root}/templates"; |
|
|
283 | |
|
|
284 | # Location of course-specific macro files. |
|
|
285 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
|
|
286 | |
|
|
287 | # Location of mail-merge templates. |
|
|
288 | $courseDirs{email} = "$courseDirs{templates}/email"; |
|
|
289 | |
|
|
290 | # Location of temporary editing files. |
|
|
291 | $courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit"; |
|
|
292 | |
|
|
293 | # If this is set to a non-empty value (i.e. in course.conf), WeBWorK's usual |
|
|
294 | # email feedback mechanism will be replaced with a link to the given URL. |
|
|
295 | # See also $feedback_button_name, above. |
|
|
296 | $courseURLs{feedbackURL} = ""; |
|
|
297 | |
|
|
298 | # mail merge status directory |
|
|
299 | $courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge"; |
|
|
300 | |
|
|
301 | ################################################################################ |
|
|
302 | # System-wide files |
|
|
303 | ################################################################################ |
|
|
304 | |
|
|
305 | # Location of this file. |
|
|
306 | $webworkFiles{environment} = "$webworkDirs{conf}/global.conf"; |
|
|
307 | |
|
|
308 | # Flat-file database used to protect against MD5 hash collisions. TeX equations |
|
|
309 | # are hashed to determine the name of the image file. There is a tiny chance of |
|
|
310 | # a collision between two TeX strings. This file allows for that. However, this |
|
|
311 | # is slow, so most people chose not to worry about it. Set this to "" if you |
|
|
312 | # don't want to use the equation cache file. |
|
|
313 | $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache"; |
|
|
314 | |
|
|
315 | ################################################################################ |
|
|
316 | # Hardcopy snippets are used in constructing a TeX file for hardcopy output. |
|
|
317 | # They should contain TeX code unless otherwise noted. |
|
|
318 | ################################################################################ |
|
|
319 | # The preamble is the first thing in the TeX file. |
|
|
320 | $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; |
|
|
321 | |
|
|
322 | # The setHeader preceeds each set. It is a PG file. |
|
|
323 | $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg", |
|
|
324 | |
|
|
325 | # The problem divider goes between problems. |
|
|
326 | $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; |
|
|
327 | |
|
|
328 | # The set footer goes after each set. Is is a PG file. |
|
|
329 | $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg"; |
|
|
330 | |
|
|
331 | # The set divider goes between sets (in multiset output). |
|
|
332 | $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex"; |
|
|
333 | |
|
|
334 | # The user divider does between users (in multiuser output). |
|
|
335 | $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex"; |
|
|
336 | |
|
|
337 | # The postabmle is the last thing in the TeX file. |
|
|
338 | $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; |
|
|
339 | |
|
|
340 | ##### Screen snippets are used when displaying problem sets on the screen. |
|
|
341 | |
|
|
342 | # The set header is displayed on the problem set page. It is a PG file. |
|
|
343 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
|
|
344 | |
|
|
345 | # A PG template for creation of new problems. |
|
|
346 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem2.pg"; # screenSetHeader.pg" |
|
|
347 | |
|
|
348 | # A site info "message of the day" file |
|
|
349 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
|
|
350 | |
|
|
351 | ################################################################################ |
|
|
352 | # Course-specific files |
|
|
353 | ################################################################################ |
|
|
354 | |
|
|
355 | # The course configuration file. |
|
|
356 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
|
|
357 | |
|
|
358 | # The course simple configuration file (holds web-based configuratoin). |
|
|
359 | $courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf"; |
|
|
360 | |
|
|
361 | # File contents are displayed after login, on the problem sets page. Path given |
|
|
362 | # here is relative to the templates directory. |
|
|
363 | $courseFiles{course_info} = "course_info.txt"; |
|
|
364 | |
|
|
365 | # File contents are displayed on the login page. Path given here is relative to |
|
|
366 | # the templates directory. |
|
|
367 | $courseFiles{login_info} = "login_info.txt"; |
|
|
368 | |
|
|
369 | # Additional library buttons can be added to the Library Browser (SetMaker.pm) |
|
|
370 | # by adding the libraries you want to the following line. For each key=>value |
|
|
371 | # in the list, if a directory (or link to a directory) with name 'key' appears |
|
|
372 | # in the templates directory, then a button with name 'value' will be placed at |
|
|
373 | # the top of the problem browser. (No button will appear if there is no |
|
|
374 | # directory or link with the given name in the templates directory.) For |
|
|
375 | # example, |
|
|
376 | # |
|
|
377 | # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; |
|
|
378 | # |
|
|
379 | # would add two buttons, one for the Rochester library and one for the ASU |
|
|
380 | # library, provided templates/rochester and templates/asu exists either as |
|
|
381 | # subdirectories or links to other directories. |
|
|
382 | # |
|
|
383 | $courseFiles{problibs} = { |
|
|
384 | # rochesterLibrary => "Rochester", |
|
|
385 | # asuLibrary => "Arizona State", |
|
|
386 | # dcdsLibrary => "Detroit CDS", |
|
|
387 | # dartmouthLibrary => "Dartmouth", |
|
|
388 | # indianaLibrary => "Indiana", |
|
|
389 | # osuLibrary => "Ohio State", |
|
|
390 | # capaLibrary => "CAPA", |
|
|
391 | }; |
|
|
392 | |
|
|
393 | ################################################################################ |
|
|
394 | # Status system |
|
|
395 | ################################################################################ |
|
|
396 | |
|
|
397 | # This is the default status given to new students and students with invalid |
|
|
398 | # or missing statuses. |
|
|
399 | $default_status = "Enrolled"; |
|
|
400 | |
|
|
401 | # The first abbreviation in the abbreviations list is the canonical |
|
|
402 | # abbreviation, and will be used when setting the status value in a user record |
|
|
403 | # or an exported classlist file. |
|
|
404 | # |
|
|
405 | # Results are undefined if more than one status has the same abbreviation. |
|
|
406 | # |
|
|
407 | # The four behaviors that are controlled by status are: |
|
|
408 | # allow_course_access => is this user allowed to log in? |
|
|
409 | # include_in_assignment => is this user included when assigning as set to "all" users? |
|
|
410 | # include_in_stats => is this user included in statistical reports? |
|
|
411 | # include_in_email => is this user included in emails sent to the class? |
|
|
412 | # include_in_scoring => is this user included in score reports? |
|
|
413 | |
|
|
414 | %statuses = ( |
|
|
415 | Enrolled => { |
|
|
416 | abbrevs => [qw/ C c current enrolled /], |
|
|
417 | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /], |
|
|
418 | }, |
|
|
419 | Audit => { |
|
|
420 | abbrevs => [qw/ A a audit /], |
|
|
421 | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /], |
|
|
422 | }, |
|
|
423 | Drop => { |
|
|
424 | abbrevs => [qw/ D d drop withdraw /], |
|
|
425 | behaviors => [qw/ /], |
|
|
426 | }, |
|
|
427 | Proctor => { |
|
|
428 | abbrevs => [qw/ P p proctor /], |
|
|
429 | behaviors => [qw/ /], |
|
|
430 | }, |
| 47 | ); |
431 | ); |
| 48 | |
432 | |
| 49 | %webworkFiles = ( |
|
|
| 50 | environment => "$webworkDirs{conf}/global.conf", |
|
|
| 51 | hardcopySnippets => { |
|
|
| 52 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
|
|
| 53 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
|
|
| 54 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
|
|
| 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", |
|
|
| 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 | oldProf => "/webwork-old/profLogin.pl", |
|
|
| 77 | ); |
|
|
| 78 | |
|
|
| 79 | ################################################################################ |
|
|
| 80 | # Default course-specific settings |
|
|
| 81 | ################################################################################ |
|
|
| 82 | |
|
|
| 83 | my $courseRoot = "$webworkDirs{courses}/$courseName"; |
|
|
| 84 | %courseDirs = ( |
|
|
| 85 | root => "$courseRoot", |
|
|
| 86 | DATA => "$courseRoot/DATA", |
|
|
| 87 | auth_DATA => "$courseRoot/DATA/.auth", |
|
|
| 88 | html => "$courseRoot/html", |
|
|
| 89 | html_images => "$courseRoot/html/images", |
|
|
| 90 | html_temp => "$courseRoot/html/tmp", |
|
|
| 91 | logs => "$courseRoot/logs", |
|
|
| 92 | scoring => "$courseRoot/scoring", |
|
|
| 93 | templates => "$courseRoot/templates", |
|
|
| 94 | macros => "$courseRoot/templates/macros", |
|
|
| 95 | email => "$courseRoot/templates/email", |
|
|
| 96 | ); |
|
|
| 97 | |
|
|
| 98 | %courseFiles = ( |
|
|
| 99 | environment => "$courseDirs{root}/course.conf", |
|
|
| 100 | motd => "$courseDirs{templates}/motd.txt", |
|
|
| 101 | logs => { |
|
|
| 102 | answer_log => "$courseDirs{logs}/answer_log", |
|
|
| 103 | }, |
|
|
| 104 | course_info => "course_info.txt", # path relative to templates directory |
|
|
| 105 | login_info => "login_info.txt", # path relative to templates directory |
|
|
| 106 | ); |
|
|
| 107 | |
|
|
| 108 | # quick hack to fix transaction logging. blah. |
|
|
| 109 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
| 110 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
|
|
| 111 | |
|
|
| 112 | my $courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; |
|
|
| 113 | %courseURLs = ( |
|
|
| 114 | root => "$courseURLRoot", |
|
|
| 115 | html => "$courseURLRoot", |
|
|
| 116 | html_temp => "$courseURLRoot/tmp", |
|
|
| 117 | ); |
|
|
| 118 | |
|
|
| 119 | ################################################################################ |
|
|
| 120 | # Other site-specific options |
|
|
| 121 | ################################################################################ |
|
|
| 122 | |
|
|
| 123 | %mail = ( |
|
|
| 124 | smtpServer => "mail.math.rochester.edu", |
|
|
| 125 | smtpSender => "webwork\@math.rochester.edu", |
|
|
| 126 | # allowedRecipients defines addresses that the PG system is allowed to |
|
|
| 127 | # send mail to. this prevents subtle PG exploits. This should be set |
|
|
| 128 | # in course.conf to the addresses of professors of each course. Sending |
|
|
| 129 | # mail from the PG system (i.e. questionaires, essay questions) will |
|
|
| 130 | # fail if this is not set somewhere (either here or in course.conf). |
|
|
| 131 | #allowedRecipients => [ |
|
|
| 132 | # 'yourname@host.yourdomain.edu', |
|
|
| 133 | #], |
|
|
| 134 | # if defined, feedbackRecipients overrides the list of recipients for |
|
|
| 135 | # feedback email. It's appropriate to set this in the course.conf for |
|
|
| 136 | # specific courses, but probably not in global.conf. if not defined, |
|
|
| 137 | # mail is sent to all professors and TAs for a given course |
|
|
| 138 | #feedbackRecipients => [ |
|
|
| 139 | # 'prof1@host.yourdomain.edu', |
|
|
| 140 | # 'prof2@host.yourdomain.edu', |
|
|
| 141 | #], |
|
|
| 142 | # feedbackVerbosity: |
|
|
| 143 | # 0: send only the feedback comment and context link |
|
|
| 144 | # 1: as in 0, plus user, set, problem, and PG data |
|
|
| 145 | # 2: as in 1, plus the problem environment (debugging data) |
|
|
| 146 | feedbackVerbosity => 1, |
|
|
| 147 | editor_window_rows => 15, |
|
|
| 148 | editor_window_columns => 100, |
|
|
| 149 | ); |
|
|
| 150 | |
|
|
| 151 | %externalPrograms = ( |
|
|
| 152 | mkdir => "/bin/mkdir", |
|
|
| 153 | tth => "/usr/local/bin/tth", |
|
|
| 154 | pdflatex => "/usr/local/bin/pdflatex", |
|
|
| 155 | latex => "/usr/local/bin/latex", |
|
|
| 156 | dvipng => "/usr/local/bin/dvipng", |
|
|
| 157 | gif2eps => "$webworkDirs{bin}/gif2eps", |
|
|
| 158 | png2eps => "$webworkDirs{bin}/png2eps", |
|
|
| 159 | gif2png => "$webworkDirs{bin}/gif2png", |
|
|
| 160 | ); |
|
|
| 161 | |
|
|
| 162 | ################################################################################ |
|
|
| 163 | # Frontend options |
|
|
| 164 | ################################################################################ |
|
|
| 165 | |
|
|
| 166 | %templates = ( |
|
|
| 167 | system => "$webworkDirs{conf}/templates/ur.template", |
|
|
| 168 | ); |
|
|
| 169 | |
|
|
| 170 | ################################################################################ |
433 | ################################################################################ |
| 171 | # Database options |
434 | # Database options |
| 172 | ################################################################################ |
435 | ################################################################################ |
|
|
436 | |
|
|
437 | # these variables are used by database.conf. we define them here so that editing |
|
|
438 | # database.conf isn't necessary. |
|
|
439 | $database_dsn = "dbi:mysql:webwork"; |
|
|
440 | $database_username = "webworkWrite"; |
|
|
441 | $database_password = ""; |
|
|
442 | $database_debug = 0; |
|
|
443 | |
|
|
444 | # Variables for sql_moodle database layout. |
|
|
445 | $moodle_dsn = "dbi:mysql:moodle"; |
|
|
446 | $moodle_username = $database_username; |
|
|
447 | $moodle_password = $database_password; |
|
|
448 | $moodle_table_prefix = "mdl_"; |
|
|
449 | $moodle17 = 0; |
| 173 | |
450 | |
| 174 | # Several database are defined in the file conf/database.conf and stored in the |
451 | # Several database are defined in the file conf/database.conf and stored in the |
| 175 | # hash %dbLayouts. |
452 | # hash %dbLayouts. |
| 176 | include "conf/database.conf"; |
453 | include "conf/database.conf"; |
| 177 | |
454 | |
| 178 | # Select the default database layout. This can be overridden in the course.conf |
455 | # Select the default database layout. This can be overridden in the course.conf |
| 179 | # file of a particular course. |
456 | # file of a particular course. The only database layout supported in WW 2.1.4 |
| 180 | #*dbLayout = $dbLayouts{sql}; |
457 | # and up is "sql_single". |
|
|
458 | $dbLayoutName = "sql_single"; |
|
|
459 | |
|
|
460 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 181 | *dbLayout = $dbLayouts{gdbm}; |
461 | *dbLayout = $dbLayouts{$dbLayoutName}; |
|
|
462 | |
|
|
463 | ################################################################################ |
|
|
464 | # Problem library options |
|
|
465 | ################################################################################ |
|
|
466 | |
|
|
467 | # For configuration instructions, see: |
|
|
468 | # http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/DatabaseProblemLibrary |
|
|
469 | |
|
|
470 | # The directory containing the problem library files. Set to "" if no problem |
|
|
471 | # library is installed. |
|
|
472 | $problemLibrary{root} = ""; |
|
|
473 | |
|
|
474 | # Problem Library version |
|
|
475 | # Version 1 is in use. Version 2 will be released soon. |
|
|
476 | $problemLibrary{version} = "2"; |
|
|
477 | |
|
|
478 | # Problem Library SQL database connection information |
|
|
479 | $problemLibrary_db = { |
|
|
480 | dbsource => $database_dsn, |
|
|
481 | user => $database_username, |
|
|
482 | passwd => $database_password, |
|
|
483 | }; |
|
|
484 | |
|
|
485 | ################################################################################ |
|
|
486 | # Logs |
|
|
487 | ################################################################################ |
|
|
488 | |
|
|
489 | # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own |
|
|
490 | # top-level hash. |
|
|
491 | |
|
|
492 | # Logs data about how long it takes to process problems. (Do not confuse this |
|
|
493 | # with the /other/ timing log which can be set by WeBWorK::Timing and is used |
|
|
494 | # for benchmarking system performance in general. At some point, this timing |
|
|
495 | # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) |
|
|
496 | $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; |
|
|
497 | |
|
|
498 | # Logs courses created via the web-based Course Administration module. |
|
|
499 | $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; |
|
|
500 | |
|
|
501 | # The transaction log contains data from each recorded answer submission. This |
|
|
502 | # is useful if the database becomes corrupted. |
|
|
503 | $webworkFiles{logs}{transaction} = "$webworkDirs{logs}/${courseName}_transaction.log"; |
|
|
504 | |
|
|
505 | # The answer log stores a history of all users' submitted answers. |
|
|
506 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
|
|
507 | |
|
|
508 | # Log logins. |
|
|
509 | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; |
|
|
510 | |
|
|
511 | # Log for almost every click. By default it is the empty string, which |
|
|
512 | # turns this log off. If you want it turned on, we suggest |
|
|
513 | # "$courseDirs{logs}/activity.log" |
|
|
514 | # When turned on, this log can get quite large. |
|
|
515 | $courseFiles{logs}{activity_log} = ''; |
|
|
516 | |
|
|
517 | ################################################################################ |
|
|
518 | # Site defaults (FIXME: what other things could be "site defaults"?) |
|
|
519 | ################################################################################ |
|
|
520 | |
|
|
521 | # Set the default timezone of courses on this server. To get a list of valid |
|
|
522 | # timezones, run: |
|
|
523 | # |
|
|
524 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
|
|
525 | # |
|
|
526 | # To get a list of valid timezone "links" (deprecated names), run: |
|
|
527 | # |
|
|
528 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' |
|
|
529 | # |
|
|
530 | # If left blank, the system timezone will be used. This is usually what you |
|
|
531 | # want. You might want to set this if your server is NOT in the same timezone as |
|
|
532 | # your school. If just a few courses are in a different timezone, set this in |
|
|
533 | # course.conf for the affected courses instead. |
|
|
534 | # |
|
|
535 | $siteDefaults{timezone} = ""; |
|
|
536 | |
|
|
537 | # The default_templates_course is used by default to create a new course. |
|
|
538 | # The contents of the templates directory are copied from this course |
|
|
539 | # to the new course being created. |
|
|
540 | $siteDefaults{default_templates_course} ="modelCourse"; |
|
|
541 | |
|
|
542 | ################################################################################ |
|
|
543 | # Authentication system |
|
|
544 | ################################################################################ |
|
|
545 | |
|
|
546 | # FIXME This mechanism is a little awkward and probably should be merged with |
|
|
547 | # the dblayout selection system somehow. |
|
|
548 | |
|
|
549 | # Select the authentication module to use for normal logins. |
|
|
550 | # |
|
|
551 | # If this value is a string, the given authentication module will be used |
|
|
552 | # regardless of the database layout. If it is a hash, the database layout name |
|
|
553 | # will be looked up in the hash and the resulting value will be used as the |
|
|
554 | # authentication module. The special hash key "*" is used if no entry for the |
|
|
555 | # current database layout is found. |
|
|
556 | # |
|
|
557 | $authen{user_module} = { |
|
|
558 | sql_moodle => "WeBWorK::Authen::Moodle", |
|
|
559 | "*" => "WeBWorK::Authen", |
|
|
560 | }; |
|
|
561 | |
|
|
562 | # Select the authentication module to use for proctor logins. |
|
|
563 | # |
|
|
564 | # A string or a hash is accepted, as above. |
|
|
565 | # |
|
|
566 | $authen{proctor_module} = "WeBWorK::Authen::Proctor"; |
|
|
567 | |
|
|
568 | # Options for particular authentication modules |
|
|
569 | |
|
|
570 | $authen{moodle_options} = { |
|
|
571 | dsn => $moodle_dsn, |
|
|
572 | username => $moodle_username, |
|
|
573 | password => $moodle_password, |
|
|
574 | table_prefix => $moodle_table_prefix, |
|
|
575 | moodle17 => $moodle17, |
|
|
576 | }; |
|
|
577 | |
|
|
578 | $authen{ldap_options} = { |
|
|
579 | # hosts to attempt to connect to, in order. for example: |
|
|
580 | # auth.myschool.edu -- uses LDAP scheme and port 389 |
|
|
581 | # ldap://auth.myschool.edu:666 -- non-standard port |
|
|
582 | # ldaps://auth.myschool.edu -- uses LDAPS scheme and port 636 |
|
|
583 | # ldaps://auth.myschool.edu:389 -- SSL on non-SSL port |
|
|
584 | net_ldap_hosts => [ |
|
|
585 | "ldaps://corona-dmc.its.rochester.edu", |
|
|
586 | "ldaps://corona-dmb.acs.rochester.edu", |
|
|
587 | ], |
|
|
588 | # connection options |
|
|
589 | net_ldap_options => { |
|
|
590 | timeout => 30, |
|
|
591 | version => 3, |
|
|
592 | }, |
|
|
593 | # base to use when searching for user's DN |
|
|
594 | net_ldap_base => "ou=people,dc=rochester,dc=edu", |
|
|
595 | # If LDAP rejects password, check it against the WeBWorK password database |
|
|
596 | failover => 1, |
|
|
597 | }; |
| 182 | |
598 | |
| 183 | ################################################################################ |
599 | ################################################################################ |
| 184 | # Authorization system |
600 | # Authorization system |
| 185 | ################################################################################ |
601 | ################################################################################ |
| 186 | |
602 | |
| 187 | # This lets you specify a minimum permission level needed to perform certain |
603 | # this section lets you define which groups of users can perform which actions. |
| 188 | # actions. In the current system, >=10 will allow a professor to perform the |
604 | |
| 189 | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an |
605 | # this hash maps a numeric permission level to the name of a role. the number |
| 190 | # action (almost never what you want). |
606 | # assigned to a role is significant -- roles with higher numbers are considered |
| 191 | my $ta = 5; |
607 | # "more privileged", and are included when that role is listed for a privilege |
|
|
608 | # below. |
|
|
609 | # |
|
|
610 | %userRoles = ( |
|
|
611 | guest => -5, |
|
|
612 | student => 0, |
|
|
613 | login_proctor => 2, |
|
|
614 | grade_proctor => 3, |
|
|
615 | ta => 5, |
| 192 | my $professor = 10; |
616 | professor => 10, |
|
|
617 | ); |
|
|
618 | |
|
|
619 | # this hash maps operations to the roles that are allowed to perform those |
|
|
620 | # operations. the role listed and any role with a higher permission level (in |
|
|
621 | # the %userRoles hash) will be allowed to perform the operation. If the role |
|
|
622 | # is undefined, no users will be allowed to perform the operation. |
|
|
623 | # |
| 193 | %permissionLevels = ( |
624 | %permissionLevels = ( |
|
|
625 | login => "guest", |
|
|
626 | report_bugs => "student", |
|
|
627 | submit_feedback => "student", |
|
|
628 | change_password => "student", |
|
|
629 | change_email_address => "student", |
|
|
630 | |
|
|
631 | proctor_quiz_login => "login_proctor", |
|
|
632 | proctor_quiz_grade => "grade_proctor", |
|
|
633 | view_proctored_tests => "student", |
|
|
634 | view_hidden_work => "ta", |
|
|
635 | |
|
|
636 | view_multiple_sets => "ta", |
|
|
637 | view_unopened_sets => "ta", |
|
|
638 | view_unpublished_sets => "ta", |
|
|
639 | view_answers => "ta", |
|
|
640 | view_ip_restricted_sets => "ta", |
|
|
641 | |
| 194 | become_student => $professor, |
642 | become_student => "professor", |
| 195 | access_instructor_tools => $ta, |
643 | access_instructor_tools => "ta", |
| 196 | create_and_delete_problem_sets => $professor, |
|
|
| 197 | modify_problem_sets => $professor, |
|
|
| 198 | assign_problem_sets => $professor, |
|
|
| 199 | modify_student_data => $professor, |
|
|
| 200 | score_sets => $professor, |
644 | score_sets => "professor", |
| 201 | send_mail => $professor, |
645 | send_mail => "professor", |
|
|
646 | receive_feedback => "ta", |
|
|
647 | |
|
|
648 | create_and_delete_problem_sets => "professor", |
|
|
649 | assign_problem_sets => "professor", |
|
|
650 | modify_problem_sets => "professor", |
|
|
651 | modify_student_data => "professor", |
| 202 | modify_classlist_files => $professor, |
652 | modify_classlist_files => "professor", |
| 203 | modify_set_def_files => $professor, |
653 | modify_set_def_files => "professor", |
|
|
654 | modify_scoring_files => "professor", |
|
|
655 | modify_problem_template_files => "professor", |
|
|
656 | manage_course_files => "professor", |
|
|
657 | |
|
|
658 | create_and_delete_courses => "professor", |
|
|
659 | fix_course_databases => "professor", |
|
|
660 | |
|
|
661 | ##### Behavior of the interactive problem processor ##### |
|
|
662 | |
|
|
663 | show_correct_answers_before_answer_date => "ta", |
|
|
664 | show_solutions_before_answer_date => "ta", |
|
|
665 | avoid_recording_answers => "ta", |
|
|
666 | # Below this level, old answers are never initially shown |
|
|
667 | can_show_old_answers_by_default => "student", |
|
|
668 | # at this level, we look at showOldAnswers for default value |
|
|
669 | # even after the due date |
|
|
670 | can_always_use_show_old_answers_default => "professor", |
|
|
671 | check_answers_before_open_date => "ta", |
|
|
672 | check_answers_after_open_date_with_attempts => "ta", |
|
|
673 | check_answers_after_open_date_without_attempts => "guest", |
|
|
674 | check_answers_after_due_date => "guest", |
|
|
675 | check_answers_after_answer_date => "guest", |
|
|
676 | record_answers_when_acting_as_student => undef, |
|
|
677 | # "record_answers_when_acting_as_student" takes precedence |
|
|
678 | # over the following for professors acting as students: |
|
|
679 | record_answers_before_open_date => undef, |
|
|
680 | record_answers_after_open_date_with_attempts => "student", |
|
|
681 | record_answers_after_open_date_without_attempts => undef, |
|
|
682 | record_answers_after_due_date => undef, |
|
|
683 | record_answers_after_answer_date => undef, |
|
|
684 | dont_log_past_answers => "professor", |
|
|
685 | # does the user get to see a dump of the problem? |
|
|
686 | view_problem_debugging_info => "ta", |
|
|
687 | |
|
|
688 | ##### Behavior of the Hardcopy Processor ##### |
|
|
689 | |
|
|
690 | download_hardcopy_multiuser => "ta", |
|
|
691 | download_hardcopy_multiset => "ta", |
|
|
692 | download_hardcopy_format_pdf => "guest", |
|
|
693 | download_hardcopy_format_tex => "ta", |
| 204 | ); |
694 | ); |
|
|
695 | |
|
|
696 | # This is the default permission level given to new students and students with |
|
|
697 | # invalid or missing permission levels. |
|
|
698 | $default_permission_level = $userRoles{student}; |
| 205 | |
699 | |
| 206 | ################################################################################ |
700 | ################################################################################ |
| 207 | # Session options |
701 | # Session options |
| 208 | ################################################################################ |
702 | ################################################################################ |
| 209 | |
703 | |
| 210 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
704 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 211 | $sessionKeyTimeout = 60*30; |
705 | $sessionKeyTimeout = 60*30; |
| 212 | |
706 | |
| 213 | # $sessionKeyLength defines the length (in characters) of the session key |
707 | # $sessionKeyLength defines the length (in characters) of the session key |
| 214 | $sessionKeyLength = 40; |
708 | $sessionKeyLength = 32; |
| 215 | |
709 | |
| 216 | # @sessionKeyChars lists the legal session key characters |
710 | # @sessionKeyChars lists the legal session key characters |
| 217 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); |
711 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); |
| 218 | |
712 | |
| 219 | # Practice users are users who's names start with $practiceUser |
713 | # Practice users are users who's names start with $practiceUser |
| 220 | # (you can comment this out to remove practice user support) |
714 | # (you can comment this out to remove practice user support) |
| 221 | $practiceUserPrefix = "practice"; |
715 | $practiceUserPrefix = "practice"; |
| 222 | |
716 | |
| … | |
… | |
| 224 | # commented out by default, though, so you don't hurt yourself. It is |
718 | # commented out by default, though, so you don't hurt yourself. It is |
| 225 | # kindof a backdoor to the practice user system, since he doesn't have a |
719 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 226 | # password. Come to think of it, why do we even have this?! |
720 | # password. Come to think of it, why do we even have this?! |
| 227 | #$debugPracticeUser = "practice666"; |
721 | #$debugPracticeUser = "practice666"; |
| 228 | |
722 | |
| 229 | ################################################################################ |
723 | # Option for gateway tests; $gatewayGracePeriod is the time in seconds |
| 230 | # PG translation options |
724 | # after the official due date during which we'll still grade the test |
| 231 | ################################################################################ |
725 | $gatewayGracePeriod = 120; |
| 232 | |
726 | |
| 233 | %pg = ( |
727 | ################################################################################ |
| 234 | # options for various renderers |
728 | # PG subsystem options |
| 235 | renderers => { |
729 | ################################################################################ |
| 236 | "WeBWorK::PG::Remote" => { |
730 | |
|
|
731 | # List of enabled display modes. Comment out any modes you don't wish to make |
|
|
732 | # available for use. |
|
|
733 | $pg{displayModes} = [ |
|
|
734 | "plainText", # display raw TeX for math expressions |
|
|
735 | "formattedText", # format math expressions using TtH |
|
|
736 | "images", # display math expressions as images generated by dvipng |
|
|
737 | "jsMath", # render TeX math expressions on the client side using jsMath |
|
|
738 | "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
|
|
739 | "LaTeXMathML", # render TeX math expressions on the client side using LaTeXMathML |
|
|
740 | ]; |
|
|
741 | |
|
|
742 | #### Default settings for the PG translator |
|
|
743 | |
|
|
744 | # Default display mode. Should be listed above. |
|
|
745 | $pg{options}{displayMode} = "images"; |
|
|
746 | |
|
|
747 | # The default grader to use, if a problem doesn't specify. |
|
|
748 | $pg{options}{grader} = "avg_problem_grader"; |
|
|
749 | |
|
|
750 | # Fill in answer blanks with the student's last answer by default? |
|
|
751 | $pg{options}{showOldAnswers} = 1; |
|
|
752 | |
|
|
753 | # Show correct answers (when allowed) by default? |
|
|
754 | $pg{options}{showCorrectAnswers} = 0; |
|
|
755 | |
|
|
756 | # Show hints (when allowed) by default? |
|
|
757 | $pg{options}{showHints} = 0; |
|
|
758 | |
|
|
759 | # Show solutions (when allowed) by default? |
|
|
760 | $pg{options}{showSolutions} = 0; |
|
|
761 | |
|
|
762 | # Catch translation warnings internally by default? (We no longer need to do |
|
|
763 | # this, since there is a global warnings handler. So this should be off.) |
|
|
764 | $pg{options}{catchWarnings} = 0; |
|
|
765 | |
|
|
766 | ##### Currently-selected renderer |
|
|
767 | |
|
|
768 | # Only the local renderer is supported in this version. |
|
|
769 | $pg{renderer} = "WeBWorK::PG::Local"; |
|
|
770 | |
|
|
771 | # The remote renderer connects to an XML-RPC PG rendering server. |
|
|
772 | #$pg{renderer} = "WeBWorK::PG::Remote"; |
|
|
773 | |
|
|
774 | ##### Renderer-dependent options |
|
|
775 | |
|
|
776 | # The remote renderer has one option: |
|
|
777 | $pg{renderers}{"WeBWorK::PG::Remote"} = { |
|
|
778 | # The "proxy" server to connect to for remote rendering. |
| 237 | proxy => "http://localhost:21000/RenderD" |
779 | proxy => "http://localhost:21000/RenderD", |
| 238 | } |
780 | }; |
|
|
781 | |
|
|
782 | ##### Settings for various display modes |
|
|
783 | |
|
|
784 | # "images" mode has several settings: |
|
|
785 | $pg{displayModeOptions}{images} = { |
|
|
786 | # Determines the method used to align images in output. Can be |
|
|
787 | # "baseline", "absmiddle", or "mysql". |
|
|
788 | dvipng_align => 'mysql', |
|
|
789 | |
|
|
790 | # If mysql is chosen, this information indicates which database contains the |
|
|
791 | # 'depths' table. Since 2.3.0, the depths table is kept in the main webwork |
|
|
792 | # database. (If you are upgrading from an earlier version of webwork, and |
|
|
793 | # used the mysql method in the past, you should move your existing 'depths' |
|
|
794 | # table to the main database.) |
|
|
795 | dvipng_depth_db => { |
|
|
796 | dbsource => $database_dsn, |
|
|
797 | user => $database_username, |
|
|
798 | passwd => $database_password, |
| 239 | }, |
799 | }, |
| 240 | # currently selected renderer |
800 | }; |
| 241 | renderer => "WeBWorK::PG::Local", |
801 | |
| 242 | #renderer => "WeBWorK::PG::Remote", |
802 | $pg{displayModeOptions}{jsMath} = { |
|
|
803 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
|
|
804 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
|
|
805 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
|
|
806 | processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source |
|
|
807 | }; |
|
|
808 | |
| 243 | # directories used by PG |
809 | ##### Directories used by PG |
| 244 | directories => { |
810 | |
| 245 | # directories used only by PG |
811 | # The root of the PG directory tree (from pg_root in Apache config). |
| 246 | lib => "$pgRoot/lib", |
812 | $pg{directories}{root} = "$pg_dir"; |
| 247 | macros => "$pgRoot/macros", |
813 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 248 | }, |
814 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
| 249 | options => { |
815 | |
| 250 | # default translation options |
816 | # |
| 251 | displayMode => "images", |
817 | # The macro file search path. Each directory in this list is seached |
| 252 | showOldAnswers => 1, |
818 | # (in this order) by loadMacros() when it looks for a .pl file. |
| 253 | showCorrectAnswers => 0, |
819 | # |
| 254 | showHints => 0, |
820 | $pg{directories}{macrosPath} = [ |
| 255 | showSolutions => 0, |
821 | ".", # search the problem file's directory |
| 256 | catchWarnings => 0, # there's a global warning catcher now |
822 | $courseDirs{macros}, |
| 257 | # default grader |
823 | $pg{directories}{macros}, |
| 258 | grader => "avg_problem_grader", |
824 | ]; |
| 259 | }, |
825 | |
| 260 | # this will be customized in the course.conf file |
826 | # The applet search path. If a full URL is given, it is used unmodified. If an |
| 261 | specialPGEnvironmentVars => { |
827 | # absolute path is given, the URL of the local server is prepended to it. |
| 262 | PRINT_FILE_NAMES_FOR => [ qw(professor) ], |
828 | # |
|
|
829 | # For example, if an item is "/math/applets", |
|
|
830 | # and the local server is "https://math.yourschool.edu", |
|
|
831 | # then the URL "https://math.yourschool.edu/math/applets" will be used. |
|
|
832 | # |
|
|
833 | $pg{directories}{appletPath} = [ # paths to search for applets (requires full url) |
|
|
834 | "$webworkURLs{htdocs}/applets", |
|
|
835 | "$courseURLs{html}/applets", |
|
|
836 | ]; |
|
|
837 | |
|
|
838 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
|
|
839 | |
|
|
840 | # Users for whom to print the file name of the PG file being processed. |
|
|
841 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
|
|
842 | |
|
|
843 | # Locations of CAPA resources. (Only necessary if you need to use converted CAPA |
|
|
844 | # problems.) |
| 263 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
845 | $pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", |
| 264 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
846 | $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", |
| 265 | CAPA_Graphics_URL => "$courseDirs{html}/CAPA_Graphics/", |
|
|
| 266 | CAPA_GraphicsDirectory => "$courseDirs{html}CAPA_Graphics/", |
847 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
| 267 | }, |
848 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
| 268 | # modules lists module names and the packages each contains |
849 | |
| 269 | modules => [ |
850 | # Size in pixels of dynamically-generated images, i.e. graphs. |
|
|
851 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
|
|
852 | |
|
|
853 | # To disable the Parser-based versions of num_cmp and fun_cmp, and use the |
|
|
854 | # original versions instead, set this value to 1. |
|
|
855 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; |
|
|
856 | |
|
|
857 | # Strings to insert at the start and end of the body of a problem |
|
|
858 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
|
|
859 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
|
|
860 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
|
|
861 | |
|
|
862 | $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; |
|
|
863 | $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; |
|
|
864 | |
|
|
865 | # To have the problem body indented and boxed, uncomment: |
|
|
866 | |
|
|
867 | # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE> |
|
|
868 | # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; |
|
|
869 | # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE> |
|
|
870 | # </BLOCKQUOTE>'; |
|
|
871 | |
|
|
872 | ##### PG modules to load |
|
|
873 | |
|
|
874 | # The first item of each list is the module to load. The remaining items are |
|
|
875 | # additional packages to import. |
|
|
876 | |
|
|
877 | ${pg}{modules} = [ |
| 270 | [qw(DynaLoader)], |
878 | [qw(DynaLoader)], |
| 271 | [qw(Exporter)], |
879 | [qw(Exporter)], |
| 272 | [qw(GD)], |
880 | [qw(GD)], |
| 273 | |
881 | |
| 274 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], |
882 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)], |
| 275 | [qw(AnswerHash AnswerEvaluator)], |
883 | [qw(AnswerHash AnswerEvaluator)], |
| 276 | [qw(WWPlot)], # required by Circle (and others) |
884 | [qw(WWPlot)], # required by Circle (and others) |
| 277 | [qw(Circle)], |
885 | [qw(Circle)], |
| 278 | [qw(Complex)], |
886 | [qw(Complex)], |
| 279 | [qw(Complex1)], |
887 | [qw(Complex1)], |
| 280 | [qw(Distributions)], |
888 | [qw(Distributions)], |
| 281 | [qw(Fraction)], |
889 | [qw(Fraction)], |
| 282 | [qw(Fun)], |
890 | [qw(Fun)], |
| 283 | [qw(Hermite)], |
891 | [qw(Hermite)], |
| 284 | [qw(Label)], |
892 | [qw(Label)], |
| 285 | [qw(List)], |
893 | [qw(List)], |
| 286 | [qw(Match)], |
894 | [qw(Match)], |
| 287 | [qw(MatrixReal1)], # required by Matrix |
895 | [qw(MatrixReal1)], # required by Matrix |
| 288 | [qw(Matrix)], |
896 | [qw(Matrix)], |
| 289 | [qw(Multiple)], |
897 | [qw(Multiple)], |
| 290 | [qw(PGrandom)], |
898 | [qw(PGrandom)], |
| 291 | [qw(Regression)], |
899 | [qw(Regression)], |
| 292 | [qw(Select)], |
900 | [qw(Select)], |
| 293 | [qw(Units)], |
901 | [qw(Units)], |
| 294 | [qw(VectorField)], |
902 | [qw(VectorField)], |
| 295 | ], |
903 | [qw(Parser Value)], |
| 296 | # defaults used by answer evaluators |
904 | [qw(Parser::Legacy)], |
|
|
905 | # [qw(SaveFile)], |
|
|
906 | # [qw(Applet FlashApplet)], |
|
|
907 | ]; |
|
|
908 | |
|
|
909 | ##### Answer evaluatior defaults |
|
|
910 | |
| 297 | ansEvalDefaults => { |
911 | $pg{ansEvalDefaults} = { |
| 298 | functAbsTolDefault => .001, |
912 | functAbsTolDefault => .001, |
| 299 | functLLimitDefault => .0000001, |
913 | functLLimitDefault => .0000001, |
| 300 | functMaxConstantOfIntegration => 1E8, |
914 | functMaxConstantOfIntegration => 1E8, |
| 301 | functNumOfPoints => 3, |
915 | functNumOfPoints => 3, |
| 302 | functRelPercentTolDefault => .1, |
916 | functRelPercentTolDefault => .1, |
| 303 | functULimitDefault => .9999999, |
917 | functULimitDefault => .9999999, |
| 304 | functVarDefault => "x", |
918 | functVarDefault => "x", |
| 305 | functZeroLevelDefault => 1E-14, |
919 | functZeroLevelDefault => 1E-14, |
| 306 | functZeroLevelTolDefault => 1E-12, |
920 | functZeroLevelTolDefault => 1E-12, |
| 307 | numAbsTolDefault => .001, |
921 | numAbsTolDefault => .001, |
| 308 | numFormatDefault => "", |
922 | numFormatDefault => "", |
| 309 | numRelPercentTolDefault => .1, |
923 | numRelPercentTolDefault => .1, |
| 310 | numZeroLevelDefault => 1E-14, |
924 | numZeroLevelDefault => 1E-14, |
| 311 | numZeroLevelTolDefault => 1E-12, |
925 | numZeroLevelTolDefault => 1E-12, |
| 312 | }, |
926 | useBaseTenLog => 0, |
| 313 | ); |
927 | defaultDisplayMatrixStyle => "[s]", |
|
|
928 | }; |
|
|
929 | |
|
|
930 | ################################################################################ |
|
|
931 | # Compatibility |
|
|
932 | ################################################################################ |
|
|
933 | |
|
|
934 | # Define the old names for the various "root" variables. |
|
|
935 | $webworkRoot = $webworkDirs{root}; |
|
|
936 | $webworkURLRoot = $webworkURLs{root}; |
|
|
937 | $pgRoot = $pg{directories}{root}; |
|
|
938 | |