| 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.127 2005/08/21 00:03:38 dpvc Exp $ |
5 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.188 2007/03/27 17:04:01 glarose 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. |
| … | |
… | |
| 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. If WeBWorK is to be on the web server root, use "". |
| 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 |
|
|
52 | $externalPrograms{mv} = "/bin/mv"; |
|
|
53 | $externalPrograms{cp} = "/bin/cp"; |
|
|
54 | $externalPrograms{rm} = "/bin/rm"; |
| 51 | $externalPrograms{mkdir} = "/bin/mkdir"; |
55 | $externalPrograms{mkdir} = "/bin/mkdir"; |
| 52 | $externalPrograms{mv} = "/bin/mv"; |
|
|
| 53 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
56 | $externalPrograms{tar} = "/usr/bin/tar"; |
|
|
57 | $externalPrograms{gzip} = "/usr/bin/gzip"; |
| 54 | |
58 | |
|
|
59 | # equation rendering/hardcopy utiltiies |
| 55 | $externalPrograms{latex} = "/usr/bin/latex"; |
60 | $externalPrograms{latex} = "/usr/bin/latex"; |
| 56 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # allows pdflatex to handle .eps files |
61 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; |
| 57 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
62 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
| 58 | $externalPrograms{tth} = "/usr/bin/tth"; |
63 | $externalPrograms{tth} = "/usr/bin/tth"; |
| 59 | |
64 | |
| 60 | $externalPrograms{tar} = "/usr/bin/tar"; |
|
|
| 61 | |
|
|
| 62 | # Basic image manipulation utilities |
65 | # NetPBM - basic image manipulation utilities |
| 63 | # Most sites only need to configure the first line |
66 | # Most sites only need to configure $netpbm_prefix. |
| 64 | $externalPrograms{netpbm} = "/usr/bin/"; # Really a prefix, rather than a program |
67 | my $netpbm_prefix = "/usr/bin"; |
| 65 | $externalPrograms{giftopnm} = $externalPrograms{netpbm}.'giftopnm'; |
68 | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; |
| 66 | $externalPrograms{ppmtopgm} = $externalPrograms{netpbm}.'ppmtopgm'; |
69 | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; |
| 67 | $externalPrograms{pnmtops} = $externalPrograms{netpbm}.'pnmtops'; |
70 | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; |
| 68 | $externalPrograms{pnmtopng} = $externalPrograms{netpbm}.'pnmtopng'; |
71 | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; |
| 69 | $externalPrograms{pngtopnm} = $externalPrograms{netpbm}.'pngtopnm'; |
72 | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; |
| 70 | |
73 | |
| 71 | # The following lines are the external scripts gif2eps, etc. |
74 | # url checker |
| 72 | # The source file is input with cat, and the output is redirected to |
75 | $externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head " |
| 73 | # the desired file. |
|
|
| 74 | |
76 | |
|
|
77 | # image conversions utiltiies |
|
|
78 | # the source file is given on stdin, and the output expected on stdout. |
| 75 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm}| $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
79 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
| 76 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
80 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
| 77 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
81 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
| 78 | |
82 | |
| 79 | # Note on these conversions: |
83 | # mysql clients |
| 80 | # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
84 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
| 81 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
85 | $externalPrograms{mysqldump} = "/usr/bin/mysqldump"; |
| 82 | # However, this was causing improper display of some sort in PDFs. |
|
|
| 83 | |
|
|
| 84 | |
86 | |
| 85 | ################################################################################ |
87 | ################################################################################ |
| 86 | # Mail settings |
88 | # Mail settings |
| 87 | ################################################################################ |
89 | ################################################################################ |
| 88 | |
90 | |
| … | |
… | |
| 93 | # When connecting to the above server, WeBWorK will send this address in the |
95 | # When connecting to the above server, WeBWorK will send this address in the |
| 94 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
96 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
| 95 | # message. It can really be anything, but some mail servers require it contain |
97 | # message. It can really be anything, but some mail servers require it contain |
| 96 | # a valid mail domain, or at least be well-formed. |
98 | # a valid mail domain, or at least be well-formed. |
| 97 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
99 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
| 98 | |
100 | |
| 99 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
101 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
| 100 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
102 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
| 101 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
103 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
| 102 | # questionaires, essay questions) will fail if this is not set somewhere (either |
104 | # questionaires, essay questions) will fail if this is not set somewhere (either |
| 103 | # here or in course.conf). |
105 | # here or in course.conf). |
| 104 | $mail{allowedRecipients} = [ |
106 | $mail{allowedRecipients} = [ |
| 105 | #'prof1@yourserver.yourdomain.edu', |
107 | #'prof1@yourserver.yourdomain.edu', |
| 106 | #'prof2@yourserver.yourdomain.edu', |
108 | #'prof2@yourserver.yourdomain.edu', |
| 107 | ]; |
109 | ]; |
| 108 | |
110 | |
| 109 | # If defined, feedbackRecipients overrides the list of recipients for feedback |
111 | # By default, feeback is sent to all users who have permission to |
| 110 | # email. It's appropriate to set this in the course.conf for specific courses, |
112 | # receive_feedback. If this list is non-empty, feedback is also sent to the |
| 111 | # but probably not in global.conf. if not defined, mail is sent to all |
113 | # addresses specified here. |
| 112 | # professors and TAs for a given course |
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 | # |
| 113 | #$mail{feedbackRecipients} = [ |
130 | $mail{feedbackRecipients} = [ |
| 114 | # 'prof1@yourserver.yourdomain.edu', |
131 | #'prof1@yourserver.yourdomain.edu', |
| 115 | # 'prof2@yourserver.yourdomain.edu', |
132 | #'prof2@yourserver.yourdomain.edu', |
| 116 | #]; |
133 | ]; |
| 117 | |
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 | |
| 118 | # feedbackVerbosity: |
147 | # feedbackVerbosity: |
| 119 | # 0: send only the feedback comment and context link |
148 | # 0: send only the feedback comment and context link |
| 120 | # 1: as in 0, plus user, set, problem, and PG data |
149 | # 1: as in 0, plus user, set, problem, and PG data |
| 121 | # 2: as in 1, plus the problem environment (debugging data) |
150 | # 2: as in 1, plus the problem environment (debugging data) |
| 122 | $mail{feedbackVerbosity} = 1; |
151 | $mail{feedbackVerbosity} = 1; |
| 123 | |
152 | |
| 124 | # Defines the size of the Mail Merge editor window |
153 | # Defines the size of the Mail Merge editor window |
| 125 | # FIXME: should this be here? it's UI, not mail |
154 | # FIXME: should this be here? it's UI, not mail |
| 126 | # FIXME: replace this with the auto-size method that TWiki uses |
155 | # FIXME: replace this with the auto-size method that TWiki uses |
| 127 | $mail{editor_window_rows} = 15; |
156 | $mail{editor_window_rows} = 15; |
| 128 | $mail{editor_window_columns} = 100; |
157 | $mail{editor_window_columns} = 100; |
| 129 | |
158 | |
|
|
159 | # Use this to customize the text of the feedback button. |
|
|
160 | $feedback_button_name = "Email instructor"; |
|
|
161 | |
| 130 | ################################################################################ |
162 | ################################################################################ |
| 131 | # System-wide locations (directories and URLs) |
163 | # System-wide locations (directories and URLs) |
| 132 | ################################################################################ |
164 | ################################################################################ |
| 133 | |
165 | |
| 134 | # The root directory, set by webwork_root variable in Apache configuration. |
166 | # The root directory, set by webwork_root variable in Apache configuration. |
| … | |
… | |
| 143 | # Location of utility programs. |
175 | # Location of utility programs. |
| 144 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
176 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
| 145 | |
177 | |
| 146 | # Location of configuration files, templates, snippets, etc. |
178 | # Location of configuration files, templates, snippets, etc. |
| 147 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
179 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
|
|
180 | |
|
|
181 | # Location of theme templates. |
|
|
182 | $webworkDirs{templates} = "$webworkDirs{conf}/templates"; |
| 148 | |
183 | |
| 149 | # Location of course directories. |
184 | # Location of course directories. |
| 150 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
185 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
| 151 | |
186 | |
| 152 | # Contains log files. |
187 | # Contains log files. |
| … | |
… | |
| 184 | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; |
219 | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; |
| 185 | |
220 | |
| 186 | # URL of general WeBWorK documentation. |
221 | # URL of general WeBWorK documentation. |
| 187 | $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; |
222 | $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; |
| 188 | |
223 | |
| 189 | # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages. |
|
|
| 190 | # Note that both systems must share a single "courses" directory for this to be |
|
|
| 191 | # useful. Leave this blank to disable |
|
|
| 192 | $webworkURLs{oldProf} = "/webwork1/profLogin.pl"; |
|
|
| 193 | |
|
|
| 194 | # URL of WeBWorK Bugzilla database. |
224 | # URL of WeBWorK Bugzilla database. |
| 195 | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; |
225 | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; |
| 196 | |
226 | |
| 197 | # Location of CSS |
227 | # Location of CSS |
| 198 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; |
228 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; |
| … | |
… | |
| 200 | # Location of jsMath script, used for the jsMath display mode. |
230 | # Location of jsMath script, used for the jsMath display mode. |
| 201 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
231 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
| 202 | |
232 | |
| 203 | # Location of ASCIIMathML script, used for the asciimath display mode. |
233 | # Location of ASCIIMathML script, used for the asciimath display mode. |
| 204 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
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"; |
| 205 | |
238 | |
| 206 | ################################################################################ |
239 | ################################################################################ |
| 207 | # Defaults for course-specific locations (directories and URLs) |
240 | # Defaults for course-specific locations (directories and URLs) |
| 208 | ################################################################################ |
241 | ################################################################################ |
| 209 | |
242 | |
| 210 | # The root directory of the current course. (The ID of the current course is |
243 | # The root directory of the current course. (The ID of the current course is |
| 211 | # available in $courseName.) |
244 | # available in $courseName.) |
| 212 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
245 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
| 213 | |
246 | |
| 214 | # Location of course-specific data files, such as WW1 (GDBM) database files. |
247 | # Location of course-specific data files. |
| 215 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
248 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
| 216 | |
|
|
| 217 | # Location of authentication data files when using a WW1 (GDBM) database. |
|
|
| 218 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
|
|
| 219 | |
249 | |
| 220 | # Location of course HTML files, passed to PG. |
250 | # Location of course HTML files, passed to PG. |
| 221 | $courseDirs{html} = "$courseDirs{root}/html"; |
251 | $courseDirs{html} = "$courseDirs{root}/html"; |
| 222 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
252 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
| 223 | |
253 | |
| … | |
… | |
| 241 | # Location of course-specific macro files. |
271 | # Location of course-specific macro files. |
| 242 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
272 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
| 243 | |
273 | |
| 244 | # Location of mail-merge templates. |
274 | # Location of mail-merge templates. |
| 245 | $courseDirs{email} = "$courseDirs{templates}/email"; |
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"; |
| 246 | |
287 | |
| 247 | ################################################################################ |
288 | ################################################################################ |
| 248 | # System-wide files |
289 | # System-wide files |
| 249 | ################################################################################ |
290 | ################################################################################ |
| 250 | |
291 | |
| … | |
… | |
| 290 | # A PG template for creation of new problems. |
331 | # A PG template for creation of new problems. |
| 291 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
332 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
| 292 | |
333 | |
| 293 | # A site info "message of the day" file |
334 | # A site info "message of the day" file |
| 294 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
335 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
|
|
336 | |
| 295 | ################################################################################ |
337 | ################################################################################ |
| 296 | # Course-specific files |
338 | # Course-specific files |
| 297 | ################################################################################ |
339 | ################################################################################ |
| 298 | |
340 | |
| 299 | # The course configuration file. |
341 | # The course configuration file. |
| 300 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
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"; |
| 301 | |
346 | |
| 302 | # File contents are displayed after login, on the problem sets page. Path given |
347 | # File contents are displayed after login, on the problem sets page. Path given |
| 303 | # here is relative to the templates directory. |
348 | # here is relative to the templates directory. |
| 304 | $courseFiles{course_info} = "course_info.txt"; |
349 | $courseFiles{course_info} = "course_info.txt"; |
| 305 | |
350 | |
| … | |
… | |
| 330 | # osuLibrary => "Ohio State", |
375 | # osuLibrary => "Ohio State", |
| 331 | # capaLibrary => "CAPA", |
376 | # capaLibrary => "CAPA", |
| 332 | }; |
377 | }; |
| 333 | |
378 | |
| 334 | ################################################################################ |
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 /], |
|
|
404 | }, |
|
|
405 | Audit => { |
|
|
406 | abbrevs => [qw/ A a audit /], |
|
|
407 | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /], |
|
|
408 | }, |
|
|
409 | Drop => { |
|
|
410 | abbrevs => [qw/ D d drop withdraw /], |
|
|
411 | behaviors => [qw/ /], |
|
|
412 | }, |
|
|
413 | Proctor => { |
|
|
414 | abbrevs => [qw/ P p proctor /], |
|
|
415 | behaviors => [qw/ /], |
|
|
416 | }, |
|
|
417 | ); |
|
|
418 | |
|
|
419 | ################################################################################ |
| 335 | # Database options (WWDBv3) |
420 | # Database options |
| 336 | ################################################################################ |
421 | ################################################################################ |
| 337 | |
422 | |
| 338 | # The four arguments passed to the DBI::connect() method. See the DBI manual for |
423 | # these variables are used by database.conf. we define them here so that editing |
| 339 | # more information. |
424 | # database.conf isn't necessary. |
| 340 | $wwdbv3_settings{dsn} = "dbi:mysql:wwdbv3"; |
425 | $database_dsn = "dbi:mysql:webwork"; |
| 341 | $wwdbv3_settings{user} = "wwdbv3"; |
426 | $database_username = "webworkWrite"; |
| 342 | $wwdbv3_settings{pass} = "xyzzy"; |
427 | $database_password = ""; |
| 343 | $wwdbv3_settings{attr} = {}; |
428 | $database_debug = 0; |
| 344 | |
429 | |
| 345 | # WWDBv3 needs a lock file to prevent concurrent database upgrades. The file |
430 | # Variables for sql_moodle database layout. |
| 346 | # will be locked with flock(). |
431 | $moodle_dsn = "dbi:mysql:moodle"; |
| 347 | $wwdbv3_settings{upgrade_lock} = "$webworkDirs{tmp}/wwdbv3_upgrade.lock"; |
432 | $moodle_username = $database_username; |
| 348 | |
433 | $moodle_password = $database_password; |
| 349 | ################################################################################ |
434 | $moodle_table_prefix = "mdl_"; |
| 350 | # Database options (WWDBv2) |
435 | $moodle17 = 0; |
| 351 | ################################################################################ |
|
|
| 352 | |
436 | |
| 353 | # Several database are defined in the file conf/database.conf and stored in the |
437 | # Several database are defined in the file conf/database.conf and stored in the |
| 354 | # hash %dbLayouts. |
438 | # hash %dbLayouts. |
| 355 | include "conf/database.conf"; |
439 | include "conf/database.conf"; |
| 356 | |
440 | |
| 357 | # Select the default database layout. This can be overridden in the course.conf |
441 | # Select the default database layout. This can be overridden in the course.conf |
| 358 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
442 | # file of a particular course. The only database layout supported in WW 2.1.4 |
| 359 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
443 | # and up is "sql_single". |
| 360 | # However, the recommended database layout for new courses is "sql_single". This |
444 | $dbLayoutName = "sql_single"; |
| 361 | # can be set when creating a course. |
|
|
| 362 | $dbLayoutName = "sql_single"; # or "gdbm" or "sql" |
|
|
| 363 | |
445 | |
| 364 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
446 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 365 | *dbLayout = $dbLayouts{$dbLayoutName}; |
447 | *dbLayout = $dbLayouts{$dbLayoutName}; |
| 366 | |
448 | |
| 367 | ################################################################################ |
449 | ################################################################################ |
| 368 | # Problem library options |
450 | # Problem library options |
| 369 | ################################################################################ |
451 | ################################################################################ |
|
|
452 | |
|
|
453 | # For configuration instructions, see: |
|
|
454 | # http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/DatabaseProblemLibrary |
| 370 | |
455 | |
| 371 | # The directory containing the problem library files. Set to "" if no problem |
456 | # The directory containing the problem library files. Set to "" if no problem |
| 372 | # library is installed. |
457 | # library is installed. |
| 373 | $problemLibrary{root} = ""; |
458 | $problemLibrary{root} = ""; |
| 374 | |
459 | |
| 375 | # Problem Library version |
460 | # Problem Library version |
| 376 | # Version 1 is in use. Version 2 will be released soon. |
461 | # Version 1 is in use. Version 2 will be released soon. |
| 377 | $problemLibrary{version} = "1"; |
462 | $problemLibrary{version} = "2"; |
| 378 | |
463 | |
| 379 | # The name of the SQL database containing problem metadata |
464 | # The name of the SQL database containing problem metadata |
| 380 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
465 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
| 381 | |
466 | |
| 382 | # The user name to use when connecting to the problem library database |
467 | # The user name to use when connecting to the problem library database |
| 383 | $problemLibrary{userSQL} = "webworkRead"; |
468 | $problemLibrary{userSQL} = $database_username; |
| 384 | |
469 | |
| 385 | # The password to use when connecting to the problem library database |
470 | # The password to use when connecting to the problem library database |
| 386 | $problemLibrary{passwordSQL} = ""; |
471 | $problemLibrary{passwordSQL} = $database_password; |
| 387 | |
472 | |
| 388 | ################################################################################ |
473 | ################################################################################ |
| 389 | # Logs |
474 | # Logs |
| 390 | ################################################################################ |
475 | ################################################################################ |
| 391 | |
476 | |
| … | |
… | |
| 401 | # Logs courses created via the web-based Course Administration module. |
486 | # Logs courses created via the web-based Course Administration module. |
| 402 | $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; |
487 | $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; |
| 403 | |
488 | |
| 404 | # The transaction log contains data from each recorded answer submission. This |
489 | # The transaction log contains data from each recorded answer submission. This |
| 405 | # is useful if the database becomes corrupted. |
490 | # is useful if the database becomes corrupted. |
| 406 | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; |
491 | $webworkFiles{logs}{transaction} = "$webworkDirs{logs}/$coursename_transaction.log"; |
| 407 | |
492 | |
| 408 | # The answer log stores a history of all users' submitted answers. |
493 | # The answer log stores a history of all users' submitted answers. |
| 409 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
494 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
| 410 | |
495 | |
| 411 | # Log logins. |
496 | # Log logins. |
| 412 | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; |
497 | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; |
| 413 | |
498 | |
|
|
499 | # Log for almost every click. By default it is the empty string, which |
|
|
500 | # turns this log off. If you want it turned on, we suggest |
|
|
501 | # "$courseDirs{logs}/activity.log" |
|
|
502 | # When turned on, this log can get quite large. |
|
|
503 | $courseFiles{logs}{activity_log} = ''; |
|
|
504 | |
| 414 | ################################################################################ |
505 | ################################################################################ |
| 415 | # Site defaults (FIXME: what other things could be "site defaults"?) |
506 | # Site defaults (FIXME: what other things could be "site defaults"?) |
| 416 | ################################################################################ |
507 | ################################################################################ |
| 417 | |
|
|
| 418 | # Status strings -- lists valid status values and their names. If your site uses |
|
|
| 419 | # additional values, add them here. |
|
|
| 420 | $siteDefaults{status} = { |
|
|
| 421 | A => "Audit", |
|
|
| 422 | a => "Audit", |
|
|
| 423 | audit => "Audit", |
|
|
| 424 | D => "Drop", |
|
|
| 425 | d => "Drop", |
|
|
| 426 | drop => "Drop", |
|
|
| 427 | withdraw => "Drop", |
|
|
| 428 | C => "Enrolled", |
|
|
| 429 | c => "Enrolled", |
|
|
| 430 | current => "Enrolled", |
|
|
| 431 | enrolled => "Enrolled", |
|
|
| 432 | }; |
|
|
| 433 | |
508 | |
| 434 | # Set the default timezone of courses on this server. To get a list of valid |
509 | # Set the default timezone of courses on this server. To get a list of valid |
| 435 | # timezones, run: |
510 | # timezones, run: |
| 436 | # |
511 | # |
| 437 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
512 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
| … | |
… | |
| 451 | # The contents of the templates directory are copied from this course |
526 | # The contents of the templates directory are copied from this course |
| 452 | # to the new course being created. |
527 | # to the new course being created. |
| 453 | $siteDefaults{default_templates_course} ="modelCourse"; |
528 | $siteDefaults{default_templates_course} ="modelCourse"; |
| 454 | |
529 | |
| 455 | ################################################################################ |
530 | ################################################################################ |
| 456 | # Frontend options |
531 | # Theme |
| 457 | ################################################################################ |
532 | ################################################################################ |
| 458 | |
533 | |
| 459 | %templates = ( |
534 | $defaultTheme = "math"; |
| 460 | system => "$webworkDirs{conf}/templates/ur.template", |
535 | $defaultThemeTemplate = "system"; |
| 461 | gateway => "$webworkDirs{conf}/templates/gw.template", |
536 | |
|
|
537 | ################################################################################ |
|
|
538 | # Authentication system |
|
|
539 | ################################################################################ |
|
|
540 | |
|
|
541 | # FIXME This mechanism is a little awkward and probably should be merged with |
|
|
542 | # the dblayout selection system somehow. |
|
|
543 | |
|
|
544 | # Select the authentication module to use for normal logins. |
|
|
545 | # |
|
|
546 | # If this value is a string, the given authentication module will be used |
|
|
547 | # regardless of the database layout. If it is a hash, the database layout name |
|
|
548 | # will be looked up in the hash and the resulting value will be used as the |
|
|
549 | # authentication module. The special hash key "*" is used if no entry for the |
|
|
550 | # current database layout is found. |
|
|
551 | # |
|
|
552 | $authen{user_module} = { |
|
|
553 | sql_moodle => "WeBWorK::Authen::Moodle", |
|
|
554 | "*" => "WeBWorK::Authen", |
|
|
555 | }; |
|
|
556 | |
|
|
557 | # Select the authentication module to use for proctor logins. |
|
|
558 | # |
|
|
559 | # A string or a hash is accepted, as above. |
|
|
560 | # |
|
|
561 | $authen{proctor_module} = "WeBWorK::Authen::Proctor"; |
|
|
562 | |
|
|
563 | # Options for particular authentication modules |
|
|
564 | |
|
|
565 | $authen{moodle_options} = { |
|
|
566 | dsn => $moodle_dsn, |
|
|
567 | username => $moodle_username, |
|
|
568 | password => $moodle_password, |
|
|
569 | table_prefix => $moodle_table_prefix, |
|
|
570 | moodle17 => $moodle17, |
|
|
571 | }; |
|
|
572 | |
|
|
573 | $authen{ldap_options} = { |
|
|
574 | # hosts to attempt to connect to, in order. for example: |
|
|
575 | # auth.myschool.edu -- uses LDAP scheme and port 389 |
|
|
576 | # ldap://auth.myschool.edu:666 -- non-standard port |
|
|
577 | # ldaps://auth.myschool.edu -- uses LDAPS scheme and port 636 |
|
|
578 | # ldaps://auth.myschool.edu:389 -- SSL on non-SSL port |
|
|
579 | net_ldap_hosts => [ |
|
|
580 | "ldaps://corona-dmc.its.rochester.edu", |
|
|
581 | "ldaps://corona-dmb.acs.rochester.edu", |
|
|
582 | ], |
|
|
583 | # connection options |
|
|
584 | net_ldap_options => { |
|
|
585 | timeout => 30, |
|
|
586 | version => 3, |
|
|
587 | }, |
|
|
588 | # base to use when searching for user's DN |
|
|
589 | net_ldap_base => "ou=people,dc=rochester,dc=edu", |
|
|
590 | # If LDAP rejects password, check it against the WeBWorK password database |
|
|
591 | failover => 1, |
|
|
592 | }; |
|
|
593 | |
|
|
594 | ################################################################################ |
|
|
595 | # Authorization system |
|
|
596 | ################################################################################ |
|
|
597 | |
|
|
598 | # this section lets you define which groups of users can perform which actions. |
|
|
599 | |
|
|
600 | # this hash maps a numeric permission level to the name of a role. the number |
|
|
601 | # assigned to a role is significant -- roles with higher numbers are considered |
|
|
602 | # "more privileged", and are included when that role is listed for a privilege |
|
|
603 | # below. |
|
|
604 | # |
|
|
605 | %userRoles = ( |
|
|
606 | guest => -5, |
|
|
607 | student => 0, |
|
|
608 | login_proctor => 2, |
|
|
609 | grade_proctor => 3, |
|
|
610 | ta => 5, |
|
|
611 | professor => 10, |
| 462 | ); |
612 | ); |
| 463 | |
613 | |
| 464 | ################################################################################ |
614 | # this hash maps operations to the roles that are allowed to perform those |
| 465 | # Authorization system |
615 | # operations. the role listed and any role with a higher permission level (in |
| 466 | ################################################################################ |
616 | # the %userRoles hash) will be allowed to perform the operation. If the role |
| 467 | |
617 | # is undefined, no users will be allowed to perform the operation. |
| 468 | # This lets you specify a minimum permission level needed to perform certain |
618 | # |
| 469 | # actions. For each pair in the hash below, in order to perform the action |
|
|
| 470 | # described by the key, the user must have a permission level greater than or |
|
|
| 471 | # equal to the value. |
|
|
| 472 | |
|
|
| 473 | my $guest = -1; |
|
|
| 474 | my $student = 0; |
|
|
| 475 | my $proctor = 2; |
|
|
| 476 | my $ta = 5; |
|
|
| 477 | my $professor = 10; |
|
|
| 478 | my $nobody = undef; |
|
|
| 479 | |
|
|
| 480 | %permissionLevels = ( |
619 | %permissionLevels = ( |
| 481 | login => $guest, |
620 | login => "guest", |
| 482 | report_bugs => $student, |
621 | report_bugs => "student", |
| 483 | submit_feedback => $student, |
622 | submit_feedback => "student", |
| 484 | change_password => $student, |
623 | change_password => "student", |
| 485 | change_email_address => $student, |
624 | change_email_address => "student", |
| 486 | |
|
|
| 487 | proctor_quiz => $proctor, |
|
|
| 488 | |
625 | |
| 489 | view_multiple_sets => $ta, |
626 | proctor_quiz_login => "login_proctor", |
|
|
627 | proctor_quiz_grade => "grade_proctor", |
| 490 | view_unopened_sets => $ta, |
628 | view_proctored_tests => "ta", |
| 491 | view_unpublished_sets => $ta, |
|
|
| 492 | view_answers => $ta, |
629 | view_hidden_work => "ta", |
| 493 | |
630 | |
| 494 | become_student => $professor, |
631 | view_multiple_sets => "ta", |
| 495 | access_instructor_tools => $ta, |
632 | view_unopened_sets => "ta", |
| 496 | score_sets => $professor, |
633 | view_unpublished_sets => "ta", |
| 497 | send_mail => $professor, |
634 | view_answers => "ta", |
| 498 | receive_feedback => $ta, |
635 | view_ip_restricted_sets => "ta", |
| 499 | |
636 | |
| 500 | create_and_delete_problem_sets => $professor, |
|
|
| 501 | assign_problem_sets => $professor, |
|
|
| 502 | modify_problem_sets => $professor, |
|
|
| 503 | modify_student_data => $professor, |
637 | become_student => "professor", |
| 504 | modify_classlist_files => $professor, |
638 | access_instructor_tools => "ta", |
| 505 | modify_set_def_files => $professor, |
639 | score_sets => "professor", |
| 506 | modify_scoring_files => $professor, |
640 | send_mail => "professor", |
| 507 | modify_problem_template_files => $professor, |
641 | receive_feedback => "ta", |
| 508 | |
642 | |
|
|
643 | create_and_delete_problem_sets => "professor", |
|
|
644 | assign_problem_sets => "professor", |
|
|
645 | modify_problem_sets => "professor", |
|
|
646 | modify_student_data => "professor", |
|
|
647 | modify_classlist_files => "professor", |
|
|
648 | modify_set_def_files => "professor", |
|
|
649 | modify_scoring_files => "professor", |
|
|
650 | modify_problem_template_files => "professor", |
|
|
651 | manage_course_files => "professor", |
|
|
652 | |
| 509 | create_and_delete_courses => $professor, |
653 | create_and_delete_courses => "professor", |
| 510 | fix_course_databases => $professor, |
654 | fix_course_databases => "professor", |
| 511 | |
655 | |
| 512 | ##### Behavior of the interactive problem processor ##### |
656 | ##### Behavior of the interactive problem processor ##### |
| 513 | |
657 | |
| 514 | show_correct_answers_before_answer_date => $ta, |
658 | show_correct_answers_before_answer_date => "ta", |
| 515 | show_solutions_before_answer_date => $ta, |
659 | show_solutions_before_answer_date => "ta", |
| 516 | avoid_recording_answers => $ta, |
660 | avoid_recording_answers => "ta", |
|
|
661 | # Below this level, old answers are never initially shown |
|
|
662 | can_show_old_answers_by_default => "student", |
|
|
663 | # at this level, we look at showOldAnswers for default value |
|
|
664 | # even after the due date |
|
|
665 | can_always_use_show_old_answers_default => "professor", |
| 517 | check_answers_before_open_date => $ta, |
666 | check_answers_before_open_date => "ta", |
| 518 | check_answers_after_open_date_with_attempts => $ta, |
667 | check_answers_after_open_date_with_attempts => "ta", |
| 519 | check_answers_after_open_date_without_attempts => $guest, |
668 | check_answers_after_open_date_without_attempts => "guest", |
| 520 | check_answers_after_due_date => $guest, |
669 | check_answers_after_due_date => "guest", |
| 521 | check_answers_after_answer_date => $guest, |
670 | check_answers_after_answer_date => "guest", |
| 522 | record_answers_when_acting_as_student => $nobody, |
671 | record_answers_when_acting_as_student => undef, |
| 523 | # "record_answers_when_acting_as_student" takes precedence |
672 | # "record_answers_when_acting_as_student" takes precedence |
| 524 | # over the following for professors acting as students: |
673 | # over the following for professors acting as students: |
| 525 | record_answers_before_open_date => $nobody, |
674 | record_answers_before_open_date => undef, |
| 526 | record_answers_after_open_date_with_attempts => $student, |
675 | record_answers_after_open_date_with_attempts => "student", |
| 527 | record_answers_after_open_date_without_attempts => $nobody, |
676 | record_answers_after_open_date_without_attempts => undef, |
| 528 | record_answers_after_due_date => $nobody, |
677 | record_answers_after_due_date => undef, |
| 529 | record_answers_after_answer_date => $nobody, |
678 | record_answers_after_answer_date => undef, |
| 530 | dont_log_past_answers => $professor, |
679 | dont_log_past_answers => "professor", |
|
|
680 | # does the user get to see a dump of the problem? |
|
|
681 | view_problem_debugging_info => "ta", |
| 531 | |
682 | |
| 532 | ##### Behavior of the Hardcopy Processor ##### |
683 | ##### Behavior of the Hardcopy Processor ##### |
| 533 | |
684 | |
| 534 | download_hardcopy_multiuser => $ta, |
685 | download_hardcopy_multiuser => "ta", |
| 535 | download_hardcopy_multiset => $ta, |
686 | download_hardcopy_multiset => "ta", |
|
|
687 | download_hardcopy_format_pdf => "guest", |
| 536 | download_hardcopy_format_tex => $ta, |
688 | download_hardcopy_format_tex => "ta", |
| 537 | ); |
689 | ); |
|
|
690 | |
|
|
691 | # This is the default permission level given to new students and students with |
|
|
692 | # invalid or missing permission levels. |
|
|
693 | $default_permission_level = $userRoles{student}; |
| 538 | |
694 | |
| 539 | ################################################################################ |
695 | ################################################################################ |
| 540 | # Session options |
696 | # Session options |
| 541 | ################################################################################ |
697 | ################################################################################ |
| 542 | |
698 | |
| 543 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
699 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 544 | $sessionKeyTimeout = 60*30; |
700 | $sessionKeyTimeout = 60*30; |
| 545 | |
701 | |
| 546 | # $sessionKeyLength defines the length (in characters) of the session key |
702 | # $sessionKeyLength defines the length (in characters) of the session key |
| 547 | $sessionKeyLength = 40; |
703 | $sessionKeyLength = 32; |
| 548 | |
704 | |
| 549 | # @sessionKeyChars lists the legal session key characters |
705 | # @sessionKeyChars lists the legal session key characters |
| 550 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); |
706 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); |
| 551 | |
707 | |
| 552 | # Practice users are users who's names start with $practiceUser |
708 | # Practice users are users who's names start with $practiceUser |
| 553 | # (you can comment this out to remove practice user support) |
709 | # (you can comment this out to remove practice user support) |
| 554 | $practiceUserPrefix = "practice"; |
710 | $practiceUserPrefix = "practice"; |
| 555 | |
711 | |
| 556 | # There is a practice user who can be logged in multiple times. He's |
712 | # There is a practice user who can be logged in multiple times. He's |
| 557 | # commented out by default, though, so you don't hurt yourself. It is |
713 | # commented out by default, though, so you don't hurt yourself. It is |
| 558 | # kindof a backdoor to the practice user system, since he doesn't have a |
714 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 559 | # password. Come to think of it, why do we even have this?! |
715 | # password. Come to think of it, why do we even have this?! |
| 560 | #$debugPracticeUser = "practice666"; |
716 | #$debugPracticeUser = "practice666"; |
|
|
717 | |
|
|
718 | # Option for gateway tests; $gatewayGracePeriod is the time in seconds |
|
|
719 | # after the official due date during which we'll still grade the test |
|
|
720 | $gatewayGracePeriod = 120; |
| 561 | |
721 | |
| 562 | ################################################################################ |
722 | ################################################################################ |
| 563 | # PG subsystem options |
723 | # PG subsystem options |
| 564 | ################################################################################ |
724 | ################################################################################ |
| 565 | |
725 | |
| … | |
… | |
| 569 | "plainText", # display raw TeX for math expressions |
729 | "plainText", # display raw TeX for math expressions |
| 570 | "formattedText", # format math expressions using TtH |
730 | "formattedText", # format math expressions using TtH |
| 571 | "images", # display math expressions as images generated by dvipng |
731 | "images", # display math expressions as images generated by dvipng |
| 572 | "jsMath", # render TeX math expressions on the client side using jsMath |
732 | "jsMath", # render TeX math expressions on the client side using jsMath |
| 573 | "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
733 | "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
|
|
734 | "LaTeXMathML", # render TeX math expressions on the client side using LaTeXMathML |
| 574 | ]; |
735 | ]; |
| 575 | |
736 | |
| 576 | #### Default settings for the PG translator |
737 | #### Default settings for the PG translator |
| 577 | |
738 | |
| 578 | # Default display mode. Should be listed above. |
739 | # Default display mode. Should be listed above. |
| … | |
… | |
| 617 | |
778 | |
| 618 | # "images" mode has several settings: |
779 | # "images" mode has several settings: |
| 619 | $pg{displayModeOptions}{images} = { |
780 | $pg{displayModeOptions}{images} = { |
| 620 | # Determines the method used to align images in output. Can be |
781 | # Determines the method used to align images in output. Can be |
| 621 | # "baseline", "absmiddle", or "mysql". |
782 | # "baseline", "absmiddle", or "mysql". |
| 622 | dvipng_align => 'baseline', |
783 | dvipng_align => 'mysql', |
| 623 | |
784 | |
| 624 | # If we choose mysql, we need information on connecting to the |
785 | # If mysql is chosen, this information indicates which database contains the |
| 625 | # database. Whatever you use here, you have to create the database |
786 | # 'depths' table. Since 2.3.0, the depths table is kept in the main webwork |
| 626 | # and grant read/write priveleges to the user listed here. To create |
787 | # database. (If you are upgrading from an earlier version of webwork, and |
| 627 | # the database in mysql, as root use: |
788 | # used the mysql method in the past, you should move your existing 'depths' |
| 628 | # |
789 | # table to the main database.) |
| 629 | # CREATE DATABASE DvipngDepths; |
|
|
| 630 | # USE DvipngDepths; |
|
|
| 631 | # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); |
|
|
| 632 | # GRANT ALL ON DvipngDepths.* TO webworkWrite; |
|
|
| 633 | # |
|
|
| 634 | # In the last statement, "webworkWrite" should match the user below. |
|
|
| 635 | # FIXME: this database can become a table in the 'webwork' database |
|
|
| 636 | dvipng_depth_db => { |
790 | dvipng_depth_db => { |
| 637 | dbsource => 'dbi:mysql:DvipngDepths', |
791 | dbsource => $database_dsn, |
| 638 | user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, |
792 | user => $database_username, |
| 639 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
793 | passwd => $database_password, |
| 640 | }, |
794 | }, |
| 641 | }; |
795 | }; |
| 642 | |
796 | |
| 643 | $pg{displayModeOptions}{jsMath} = { |
797 | $pg{displayModeOptions}{jsMath} = { |
| 644 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
798 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
| 645 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
799 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
| 646 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
800 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
|
|
801 | processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source |
| 647 | }; |
802 | }; |
| 648 | |
803 | |
| 649 | ##### Directories used by PG |
804 | ##### Directories used by PG |
| 650 | |
805 | |
| 651 | # The root of the PG directory tree (from pg_root in Apache config). |
806 | # The root of the PG directory tree (from pg_root in Apache config). |
| … | |
… | |
| 661 | ".", # search the problem file's directory |
816 | ".", # search the problem file's directory |
| 662 | $courseDirs{macros}, |
817 | $courseDirs{macros}, |
| 663 | $pg{directories}{macros}, |
818 | $pg{directories}{macros}, |
| 664 | ]; |
819 | ]; |
| 665 | |
820 | |
|
|
821 | # The applet search path. If a full URL is given, it is used unmodified. If an |
|
|
822 | # absolute path is given, the URL of the local server is prepended to it. |
|
|
823 | # |
|
|
824 | # For example, if an item is "/math/applets", |
|
|
825 | # and the local server is "https://math.yourschool.edu", |
|
|
826 | # then the URL "https://math.yourschool.edu/math/applets" will be used. |
|
|
827 | # |
|
|
828 | $pg{directories}{appletPath} = [ # paths to search for applets (requires full url) |
|
|
829 | "$webworkURLs{htdocs}/applets", |
|
|
830 | "$courseURLs{html}/applets", |
|
|
831 | ]; |
|
|
832 | |
| 666 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
833 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 667 | |
834 | |
| 668 | # Users for whom to print the file name of the PG file being processed. |
835 | # Users for whom to print the file name of the PG file being processed. |
| 669 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
836 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
| 670 | |
837 | |
| … | |
… | |
| 675 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
842 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
| 676 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
843 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
| 677 | |
844 | |
| 678 | # Size in pixels of dynamically-generated images, i.e. graphs. |
845 | # Size in pixels of dynamically-generated images, i.e. graphs. |
| 679 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
846 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
|
|
847 | |
|
|
848 | # To disable the Parser-based versions of num_cmp and fun_cmp, and use the |
|
|
849 | # original versions instead, set this value to 1. |
|
|
850 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; |
|
|
851 | |
|
|
852 | # Strings to insert at the start and end of the body of a problem |
|
|
853 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
|
|
854 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
|
|
855 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
|
|
856 | |
|
|
857 | $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; |
|
|
858 | $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; |
|
|
859 | |
|
|
860 | # To have the problem body indented and boxed, uncomment: |
|
|
861 | |
|
|
862 | # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE> |
|
|
863 | # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; |
|
|
864 | # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE> |
|
|
865 | # </BLOCKQUOTE>'; |
| 680 | |
866 | |
| 681 | ##### PG modules to load |
867 | ##### PG modules to load |
| 682 | |
868 | |
| 683 | # The first item of each list is the module to load. The remaining items are |
869 | # The first item of each list is the module to load. The remaining items are |
| 684 | # additional packages to import. |
870 | # additional packages to import. |
| … | |
… | |
| 708 | [qw(Regression)], |
894 | [qw(Regression)], |
| 709 | [qw(Select)], |
895 | [qw(Select)], |
| 710 | [qw(Units)], |
896 | [qw(Units)], |
| 711 | [qw(VectorField)], |
897 | [qw(VectorField)], |
| 712 | [qw(Parser Value)], |
898 | [qw(Parser Value)], |
| 713 | [qw(Apache::Log)], |
899 | [qw(Parser::Legacy)], |
| 714 | ]; |
900 | ]; |
| 715 | |
901 | |
| 716 | ##### Answer evaluatior defaults |
902 | ##### Answer evaluatior defaults |
| 717 | |
903 | |
| 718 | $pg{ansEvalDefaults} = { |
904 | $pg{ansEvalDefaults} = { |