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