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