| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK Online Homework Delivery System |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.63 2004/05/21 23:41:49 jj Exp $ |
5 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.139 2005/09/21 20:26:29 apizer Exp $ |
| 6 | # |
6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify it under |
7 | # This program is free software; you can redistribute it and/or modify it under |
| 8 | # the terms of either: (a) the GNU General Public License as published by the |
8 | # the terms of either: (a) the GNU General Public License as published by the |
| 9 | # Free Software Foundation; either version 2, or (at your option) any later |
9 | # Free Software Foundation; either version 2, or (at your option) any later |
| 10 | # version, or (b) the "Artistic License" which comes with this package. |
10 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 17 | |
17 | |
| 18 | # This file is used to set up the default WeBWorK course environment for all |
18 | # This file is used to set up the default WeBWorK course environment for all |
| 19 | # requests. Values may be overwritten by the course.conf for a specific course. |
19 | # requests. Values may be overwritten by the course.conf for a specific course. |
| 20 | # All package variables set in this file are added to the course environment. |
20 | # All package variables set in this file are added to the course environment. |
| 21 | # If you wish to set a variable here but omit it from the course environment, |
21 | # If you wish to set a variable here but omit it from the course environment, |
| 22 | # use the "my" keyword. The following variables are available to this file: |
22 | # use the "my" keyword. The $webwork_dir variable is set in the WeBWorK Apache |
| 23 | # |
23 | # configuration file (webwork.apache-config) and is available for use here. In |
| 24 | # $webworkRoot directory that contains the WeBWorK distribution |
24 | # addition, the $courseName variable holds the name of the current course. |
| 25 | # $webworkURL base URL handled by Apache::WeBWorK |
|
|
| 26 | # $pgRoot directory that contains the PG distribution |
|
|
| 27 | # $courseName name of the course being used |
|
|
| 28 | |
25 | |
| 29 | ################################################################################ |
26 | ################################################################################ |
| 30 | # WeBWorK settings |
27 | # Seed variables |
| 31 | ################################################################################ |
28 | ################################################################################ |
| 32 | |
29 | |
| 33 | %webworkDirs = ( |
30 | # Set these variables to correspond to your configuration and preferences. You |
| 34 | root => "$webworkRoot", |
31 | # will need to restart the webserver to reset the variables in this section. |
| 35 | DATA => "$webworkRoot/DATA", |
|
|
| 36 | uploadCache => "$webworkRoot/DATA/uploads", |
|
|
| 37 | bin => "$webworkRoot/bin", |
|
|
| 38 | conf => "$webworkRoot/conf", |
|
|
| 39 | courses => "$webworkRoot/courses", |
|
|
| 40 | htdocs => "$webworkRoot/htdocs", |
|
|
| 41 | htdocs_temp => "$webworkRoot/htdocs/tmp", |
|
|
| 42 | equationCache => "$webworkRoot/htdocs/tmp/equations", |
|
|
| 43 | lib => "$webworkRoot/lib", |
|
|
| 44 | logs => "$webworkRoot/logs", |
|
|
| 45 | macros => "$pgRoot/macros", |
|
|
| 46 | tmp => "$webworkRoot/tmp", |
|
|
| 47 | ); |
|
|
| 48 | |
32 | |
| 49 | %webworkFiles = ( |
33 | # URL of WeBWorK handler. |
| 50 | environment => "$webworkDirs{conf}/global.conf", |
34 | $webwork_url = "/webwork2"; |
| 51 | hardcopySnippets => { |
|
|
| 52 | preamble => "$webworkDirs{conf}/snippets/hardcopyPreamble.tex", |
|
|
| 53 | setHeader => "$webworkDirs{conf}/snippets/hardcopySetHeader.pg", |
|
|
| 54 | problemDivider => "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex", |
|
|
| 55 | setFooter => "$webworkDirs{conf}/snippets/hardcopySetFooter.pg", |
|
|
| 56 | setDivider => "$webworkDirs{conf}/snippets/hardcopySetDivider.tex", |
|
|
| 57 | userDivider => "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex", |
|
|
| 58 | postamble => "$webworkDirs{conf}/snippets/hardcopyPostamble.tex", |
|
|
| 59 | }, |
|
|
| 60 | screenSnippets => { |
|
|
| 61 | setHeader => "$webworkDirs{conf}/snippets/setHeader.pg", |
|
|
| 62 | }, |
|
|
| 63 | logs => { |
|
|
| 64 | timing => "$webworkDirs{logs}/timing.log", |
|
|
| 65 | }, |
|
|
| 66 | equationCacheDB => "$webworkDirs{DATA}/equationcache", |
|
|
| 67 | ); |
|
|
| 68 | |
35 | |
| 69 | %webworkURLs = ( |
36 | # Root directory of PG. |
| 70 | root => "$webworkURLRoot", |
37 | $pg_dir = "/opt/pg"; |
| 71 | home => "/webwork2_files/index.html", |
|
|
| 72 | htdocs => "/webwork2_files", |
|
|
| 73 | htdocs_temp => "/webwork2_files/tmp", |
|
|
| 74 | equationCache => "/webwork2_files/tmp/equations", |
|
|
| 75 | docs => "http://webhost.math.rochester.edu/webworkdocs/docs", |
|
|
| 76 | oldProf => "/webwork1/profLogin.pl", |
|
|
| 77 | ); |
|
|
| 78 | |
38 | |
| 79 | ################################################################################ |
39 | # URL and path to htdocs directory. |
| 80 | # Default course-specific settings |
40 | $webwork_htdocs_url = "/webwork2_files"; |
| 81 | ################################################################################ |
41 | $webwork_htdocs_dir = "$webwork_dir/htdocs"; |
| 82 | |
42 | |
| 83 | my $courseRoot = "$webworkDirs{courses}/$courseName"; |
43 | # URL and path to courses directory. |
| 84 | %courseDirs = ( |
44 | $webwork_courses_url = "/webwork2_course_files"; |
| 85 | root => "$courseRoot", |
45 | $webwork_courses_dir = "$webwork_dir/courses"; |
| 86 | DATA => "$courseRoot/DATA", |
|
|
| 87 | auth_DATA => "$courseRoot/DATA/.auth", |
|
|
| 88 | html => "$courseRoot/html", |
|
|
| 89 | html_images => "$courseRoot/html/images", |
|
|
| 90 | html_temp => "$courseRoot/html/tmp", |
|
|
| 91 | logs => "$courseRoot/logs", |
|
|
| 92 | scoring => "$courseRoot/scoring", |
|
|
| 93 | templates => "$courseRoot/templates", |
|
|
| 94 | macros => "$courseRoot/templates/macros", |
|
|
| 95 | email => "$courseRoot/templates/email", |
|
|
| 96 | ); |
|
|
| 97 | |
46 | |
| 98 | %courseFiles = ( |
|
|
| 99 | environment => "$courseDirs{root}/course.conf", |
|
|
| 100 | motd => "$courseDirs{templates}/motd.txt", |
|
|
| 101 | logs => { |
|
|
| 102 | answer_log => "$courseDirs{logs}/answer_log", |
|
|
| 103 | }, |
|
|
| 104 | course_info => "course_info.txt", # path relative to templates directory |
|
|
| 105 | login_info => "login_info.txt", # path relative to templates directory |
|
|
| 106 | ); |
|
|
| 107 | |
|
|
| 108 | # quick hack to fix transaction logging. blah. |
|
|
| 109 | $webworkFiles{logs}->{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
| 110 | $webworkFiles{logs}->{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; |
|
|
| 111 | |
|
|
| 112 | my $courseURLRoot = "/webwork2_course_files/$courseName"; |
|
|
| 113 | %courseURLs = ( |
|
|
| 114 | root => "$courseURLRoot", |
|
|
| 115 | html => "$courseURLRoot", |
|
|
| 116 | html_temp => "$courseURLRoot/tmp", |
|
|
| 117 | ); |
|
|
| 118 | |
|
|
| 119 | ################################################################################ |
47 | ################################################################################ |
| 120 | # Other site-specific options |
48 | # Paths to external programs |
| 121 | ################################################################################ |
49 | ################################################################################ |
| 122 | |
50 | |
| 123 | %mail = ( |
51 | # system utilties |
| 124 | smtpServer => "mail.math.rochester.edu", |
52 | $externalPrograms{mkdir} = "/bin/mkdir"; |
| 125 | smtpSender => "webwork\@math.rochester.edu", |
53 | $externalPrograms{mv} = "/bin/mv"; |
| 126 | |
54 | $externalPrograms{mysql} = "/usr/bin/mysql"; |
|
|
55 | $externalPrograms{tar} = "/usr/bin/tar"; |
|
|
56 | |
|
|
57 | # equation rendering/hardcopy utiltiies |
|
|
58 | $externalPrograms{latex} = "/usr/bin/latex"; |
|
|
59 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; # --shell-escape allows pdflatex to handle .eps files |
|
|
60 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
|
|
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 | # image conversions utiltiies |
|
|
73 | # the source file is given on stdin, and the output expected on stdout. |
|
|
74 | # |
|
|
75 | # Note on conversions pipelines: |
|
|
76 | # we used to use `pnmdepth 1' instead of ppmtopgm as it creates a |
|
|
77 | # monochrome image (1 bit) rather than a greyscale image (8 bits). |
|
|
78 | # However, this was causing improper display of some sort in PDFs. |
|
|
79 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
80 | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
|
|
81 | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; |
|
|
82 | |
|
|
83 | ################################################################################ |
|
|
84 | # Mail settings |
|
|
85 | ################################################################################ |
|
|
86 | |
|
|
87 | # Mail sent by the PG system and the mail merge and feedback modules will be |
|
|
88 | # sent via this SMTP server. |
|
|
89 | $mail{smtpServer} = 'mail.yourschool.edu'; |
|
|
90 | |
|
|
91 | # When connecting to the above server, WeBWorK will send this address in the |
|
|
92 | # MAIL FROM command. This has nothing to do with the "From" address on the mail |
|
|
93 | # message. It can really be anything, but some mail servers require it contain |
|
|
94 | # a valid mail domain, or at least be well-formed. |
|
|
95 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
|
|
96 | |
| 127 | # allowedRecipients defines addresses that the PG system is allowed to |
97 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
| 128 | # send mail to. this prevents subtle PG exploits. This should be set |
98 | # to. this prevents subtle PG exploits. This should be set in course.conf to the |
| 129 | # in course.conf to the addresses of professors of each course. Sending |
99 | # addresses of professors of each course. Sending mail from the PG system (i.e. |
| 130 | # mail from the PG system (i.e. questionaires, essay questions) will |
100 | # questionaires, essay questions) will fail if this is not set somewhere (either |
| 131 | # fail if this is not set somewhere (either here or in course.conf). |
101 | # here or in course.conf). |
| 132 | #allowedRecipients => [ |
102 | $mail{allowedRecipients} = [ |
| 133 | # 'prof1@host.yourdomain.edu', |
103 | #'prof1@yourserver.yourdomain.edu', |
| 134 | # 'prof2@host.yourdomain.edu', |
104 | #'prof2@yourserver.yourdomain.edu', |
| 135 | #], |
105 | ]; |
| 136 | |
106 | |
| 137 | # if defined, feedbackRecipients overrides the list of recipients for |
107 | # By default, feeback is sent to all users who have permission to |
| 138 | # feedback email. It's appropriate to set this in the course.conf for |
108 | # receive_feedback. If this list is non-empty, feedback is also sent to the |
| 139 | # specific courses, but probably not in global.conf. if not defined, |
109 | # addresses specified here. |
| 140 | # mail is sent to all professors and TAs for a given course |
110 | # |
|
|
111 | # * If you want to disable feedback altogether, leave this empty and set |
|
|
112 | # submit_feeback => $nobody in %permissionLevels below. This will cause the |
|
|
113 | # feedback button to go away as well. |
|
|
114 | # |
|
|
115 | # * If you want to send email ONLY to addresses in this list, set |
|
|
116 | # receive_feedback => $nobody in %permissionLevels below. |
|
|
117 | # |
|
|
118 | # It's often useful to set this in the course.conf to change the behavior of |
|
|
119 | # feedback for a specific course. |
|
|
120 | # |
| 141 | #feedbackRecipients => [ |
121 | $mail{feedbackRecipients} = [ |
| 142 | # 'prof1@host.yourdomain.edu', |
122 | #'prof1@yourserver.yourdomain.edu', |
| 143 | # 'prof2@host.yourdomain.edu', |
123 | #'prof2@yourserver.yourdomain.edu', |
| 144 | #], |
124 | ]; |
| 145 | |
125 | |
|
|
126 | # Feedback subject line -- the following escape sequences are recognized: |
|
|
127 | # |
|
|
128 | # %c = course ID |
|
|
129 | # %u = user ID |
|
|
130 | # %s = set ID |
|
|
131 | # %p = problem ID |
|
|
132 | # %x = section |
|
|
133 | # %r = recitation |
|
|
134 | # %% = literal percent sign |
|
|
135 | # |
|
|
136 | $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c %% user:%u set:%s prob:%p sec:%x rec:%r"; |
|
|
137 | |
| 146 | # feedbackVerbosity: |
138 | # feedbackVerbosity: |
| 147 | # 0: send only the feedback comment and context link |
139 | # 0: send only the feedback comment and context link |
| 148 | # 1: as in 0, plus user, set, problem, and PG data |
140 | # 1: as in 0, plus user, set, problem, and PG data |
| 149 | # 2: as in 1, plus the problem environment (debugging data) |
141 | # 2: as in 1, plus the problem environment (debugging data) |
| 150 | feedbackVerbosity => 1, |
142 | $mail{feedbackVerbosity} = 1; |
| 151 | |
143 | |
| 152 | # defines the size of the Mail Merge editor window |
144 | # Defines the size of the Mail Merge editor window |
| 153 | # FIXME: should this be here? it's UI, not mail |
145 | # FIXME: should this be here? it's UI, not mail |
| 154 | # FIXME: replace this with the auto-size method that TWiki uses |
146 | # FIXME: replace this with the auto-size method that TWiki uses |
| 155 | editor_window_rows => 15, |
147 | $mail{editor_window_rows} = 15; |
| 156 | editor_window_columns => 100, |
148 | $mail{editor_window_columns} = 100; |
| 157 | ); |
|
|
| 158 | |
149 | |
| 159 | %externalPrograms = ( |
|
|
| 160 | mkdir => "/bin/mkdir", |
|
|
| 161 | tth => "/usr/local/bin/tth", |
|
|
| 162 | pdflatex => "/usr/local/bin/pdflatex", |
|
|
| 163 | latex => "/usr/local/bin/latex", |
|
|
| 164 | dvipng => "/usr/local/bin/dvipng", |
|
|
| 165 | gif2eps => "$webworkDirs{bin}/gif2eps", |
|
|
| 166 | png2eps => "$webworkDirs{bin}/png2eps", |
|
|
| 167 | gif2png => "$webworkDirs{bin}/gif2png", |
|
|
| 168 | mysql => "/usr/local/bin/mysql", |
|
|
| 169 | ); |
|
|
| 170 | |
|
|
| 171 | %siteDefaults = ( |
|
|
| 172 | status => { |
|
|
| 173 | audit => "Audit", |
|
|
| 174 | A => "Audit", |
|
|
| 175 | drop => "Drop", |
|
|
| 176 | D => "Drop", |
|
|
| 177 | withdraw => "Drop", |
|
|
| 178 | current => "Enrolled", |
|
|
| 179 | C => "Enrolled", |
|
|
| 180 | enrolled => "Enrolled", |
|
|
| 181 | }, |
|
|
| 182 | ); |
|
|
| 183 | |
|
|
| 184 | ################################################################################ |
150 | ################################################################################ |
| 185 | # Frontend options |
151 | # System-wide locations (directories and URLs) |
| 186 | ################################################################################ |
152 | ################################################################################ |
| 187 | |
153 | |
| 188 | %templates = ( |
154 | # The root directory, set by webwork_root variable in Apache configuration. |
| 189 | system => "$webworkDirs{conf}/templates/ur.template", |
155 | $webworkDirs{root} = "$webwork_dir"; |
| 190 | ); |
156 | |
|
|
157 | # Location of system-wide data files. |
|
|
158 | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; |
|
|
159 | |
|
|
160 | # Used for temporary storage of uploaded files. |
|
|
161 | $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads"; |
|
|
162 | |
|
|
163 | # Location of utility programs. |
|
|
164 | $webworkDirs{bin} = "$webworkDirs{root}/bin"; |
|
|
165 | |
|
|
166 | # Location of configuration files, templates, snippets, etc. |
|
|
167 | $webworkDirs{conf} = "$webworkDirs{root}/conf"; |
|
|
168 | |
|
|
169 | # Location of course directories. |
|
|
170 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
|
|
171 | |
|
|
172 | # Contains log files. |
|
|
173 | $webworkDirs{logs} = "$webworkDirs{root}/logs"; |
|
|
174 | |
|
|
175 | # Contains non-web-accessible temporary files, such as TeX working directories. |
|
|
176 | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; |
|
|
177 | |
|
|
178 | # The (absolute) destinations of symbolic links that are OK for the FileManager to follow. |
|
|
179 | # (any subdirectory of these is a valid target for a symbolic link.) |
|
|
180 | # For example: |
|
|
181 | # $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"]; |
|
|
182 | $webworkDirs{valid_symlinks} = []; |
|
|
183 | |
|
|
184 | ##### The following locations are web-accessible. |
|
|
185 | |
|
|
186 | # The root URL (usually /webwork2), set by <Location> in Apache configuration. |
|
|
187 | $webworkURLs{root} = "$webwork_url"; |
|
|
188 | |
|
|
189 | # Location of system-wide web-accessible files, such as equation images, and |
|
|
190 | # help files. |
|
|
191 | $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs"; |
|
|
192 | $webworkURLs{htdocs} = "$webwork_htdocs_url"; |
|
|
193 | |
|
|
194 | # Location of web-accessible temporary files, such as equation images. |
|
|
195 | $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; |
|
|
196 | $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; |
|
|
197 | |
|
|
198 | # Location of cached equation images. |
|
|
199 | $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; |
|
|
200 | $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; |
|
|
201 | |
|
|
202 | # Contains context-sensitive help files. |
|
|
203 | $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles"; |
|
|
204 | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; |
|
|
205 | |
|
|
206 | # URL of general WeBWorK documentation. |
|
|
207 | $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; |
|
|
208 | |
|
|
209 | # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages. |
|
|
210 | # Note that both systems must share a single "courses" directory for this to be |
|
|
211 | # useful. Leave this blank to disable |
|
|
212 | $webworkURLs{oldProf} = "/webwork1/profLogin.pl"; |
|
|
213 | |
|
|
214 | # URL of WeBWorK Bugzilla database. |
|
|
215 | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; |
|
|
216 | |
|
|
217 | # Location of CSS |
|
|
218 | $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/ur.css"; |
|
|
219 | |
|
|
220 | # Location of jsMath script, used for the jsMath display mode. |
|
|
221 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
|
|
222 | |
|
|
223 | # Location of ASCIIMathML script, used for the asciimath display mode. |
|
|
224 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
|
|
225 | |
|
|
226 | ################################################################################ |
|
|
227 | # Defaults for course-specific locations (directories and URLs) |
|
|
228 | ################################################################################ |
|
|
229 | |
|
|
230 | # The root directory of the current course. (The ID of the current course is |
|
|
231 | # available in $courseName.) |
|
|
232 | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; |
|
|
233 | |
|
|
234 | # Location of course-specific data files, such as WW1 (GDBM) database files. |
|
|
235 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
|
|
236 | |
|
|
237 | # Location of authentication data files when using a WW1 (GDBM) database. |
|
|
238 | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; |
|
|
239 | |
|
|
240 | # Location of course HTML files, passed to PG. |
|
|
241 | $courseDirs{html} = "$courseDirs{root}/html"; |
|
|
242 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
|
|
243 | |
|
|
244 | # Location of course image files, passed to PG. |
|
|
245 | $courseDirs{html_images} = "$courseDirs{html}/images"; |
|
|
246 | |
|
|
247 | # Location of web-accessible, course-specific temporary files, like static and |
|
|
248 | # dynamically-generated PG graphics. |
|
|
249 | $courseDirs{html_temp} = "$courseDirs{html}/tmp"; |
|
|
250 | $courseURLs{html_temp} = "$courseURLs{html}/tmp"; |
|
|
251 | |
|
|
252 | # Location of course-specific logs, like the transaction log. |
|
|
253 | $courseDirs{logs} = "$courseDirs{root}/logs"; |
|
|
254 | |
|
|
255 | # Location of scoring files. |
|
|
256 | $courseDirs{scoring} = "$courseDirs{root}/scoring"; |
|
|
257 | |
|
|
258 | # Location of PG templates and set definition files. |
|
|
259 | $courseDirs{templates} = "$courseDirs{root}/templates"; |
|
|
260 | |
|
|
261 | # Location of course-specific macro files. |
|
|
262 | $courseDirs{macros} = "$courseDirs{templates}/macros"; |
|
|
263 | |
|
|
264 | # Location of mail-merge templates. |
|
|
265 | $courseDirs{email} = "$courseDirs{templates}/email"; |
|
|
266 | |
|
|
267 | ################################################################################ |
|
|
268 | # System-wide files |
|
|
269 | ################################################################################ |
|
|
270 | |
|
|
271 | # Location of this file. |
|
|
272 | $webworkFiles{environment} = "$webworkDirs{conf}/global.conf"; |
|
|
273 | |
|
|
274 | # Flat-file database used to protect against MD5 hash collisions. TeX equations |
|
|
275 | # are hashed to determine the name of the image file. There is a tiny chance of |
|
|
276 | # a collision between two TeX strings. This file allows for that. However, this |
|
|
277 | # is slow, so most people chose not to worry about it. Set this to "" if you |
|
|
278 | # don't want to use the equation cache file. |
|
|
279 | $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache"; |
|
|
280 | |
|
|
281 | ##### Hardcopy snippets are used in constructing a TeX file for hardcopy output. |
|
|
282 | ##### They should contain TeX code unless otherwise noted. |
|
|
283 | |
|
|
284 | # The preamble is the first thing in the TeX file. |
|
|
285 | $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; |
|
|
286 | |
|
|
287 | # The setHeader preceeds each set. It is a PG file. |
|
|
288 | $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg", |
|
|
289 | |
|
|
290 | # The problem divider goes between problems. |
|
|
291 | $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; |
|
|
292 | |
|
|
293 | # The set footer goes after each set. Is is a PG file. |
|
|
294 | $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg"; |
|
|
295 | |
|
|
296 | # The set divider goes between sets (in multiset output). |
|
|
297 | $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex"; |
|
|
298 | |
|
|
299 | # The user divider does between users (in multiuser output). |
|
|
300 | $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex"; |
|
|
301 | |
|
|
302 | # The postabmle is the last thing in the TeX file. |
|
|
303 | $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; |
|
|
304 | |
|
|
305 | ##### Screen snippets are used when displaying problem sets on the screen. |
|
|
306 | |
|
|
307 | # The set header is displayed on the problem set page. It is a PG file. |
|
|
308 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
|
|
309 | |
|
|
310 | # A PG template for creation of new problems. |
|
|
311 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem.pg"; # screenSetHeader.pg" |
|
|
312 | |
|
|
313 | # A site info "message of the day" file |
|
|
314 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
|
|
315 | ################################################################################ |
|
|
316 | # Course-specific files |
|
|
317 | ################################################################################ |
|
|
318 | |
|
|
319 | # The course configuration file. |
|
|
320 | $courseFiles{environment} = "$courseDirs{root}/course.conf"; |
|
|
321 | |
|
|
322 | # File contents are displayed after login, on the problem sets page. Path given |
|
|
323 | # here is relative to the templates directory. |
|
|
324 | $courseFiles{course_info} = "course_info.txt"; |
|
|
325 | |
|
|
326 | # File contents are displayed on the login page. Path given here is relative to |
|
|
327 | # the templates directory. |
|
|
328 | $courseFiles{login_info} = "login_info.txt"; |
|
|
329 | |
|
|
330 | # Additional library buttons can be added to the Library Browser (SetMaker.pm) |
|
|
331 | # by adding the libraries you want to the following line. For each key=>value |
|
|
332 | # in the list, if a directory (or link to a directory) with name 'key' appears |
|
|
333 | # in the templates directory, then a button with name 'value' will be placed at |
|
|
334 | # the top of the problem browser. (No button will appear if there is no |
|
|
335 | # directory or link with the given name in the templates directory.) For |
|
|
336 | # example, |
|
|
337 | # |
|
|
338 | # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; |
|
|
339 | # |
|
|
340 | # would add two buttons, one for the Rochester library and one for the ASU |
|
|
341 | # library, provided templates/rochester and templates/asu exists either as |
|
|
342 | # subdirectories or links to other directories. |
|
|
343 | # |
|
|
344 | $courseFiles{problibs} = { |
|
|
345 | # rochesterLibrary => "Rochester", |
|
|
346 | # asuLibrary => "Arizona State", |
|
|
347 | # dcdsLibrary => "Detroit CDS", |
|
|
348 | # dartmouthLibrary => "Dartmouth", |
|
|
349 | # indianaLibrary => "Indiana", |
|
|
350 | # osuLibrary => "Ohio State", |
|
|
351 | # capaLibrary => "CAPA", |
|
|
352 | }; |
| 191 | |
353 | |
| 192 | ################################################################################ |
354 | ################################################################################ |
| 193 | # Database options |
355 | # Database options |
| 194 | ################################################################################ |
356 | ################################################################################ |
| 195 | |
357 | |
| 196 | # Several database are defined in the file conf/database.conf and stored in the |
358 | # Several database are defined in the file conf/database.conf and stored in the |
| 197 | # hash %dbLayouts. |
359 | # hash %dbLayouts. |
| 198 | include "conf/database.conf"; |
360 | include "conf/database.conf"; |
| 199 | |
361 | |
| 200 | # Select the default database layout. This can be overridden in the course.conf |
362 | # Select the default database layout. This can be overridden in the course.conf |
| 201 | # file of a particular course. |
363 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
| 202 | #$dbLayoutName = "sql"; |
364 | # use courses from WeBWorK 1 without first adding course.conf files to them. |
| 203 | $dbLayoutName = "gdbm"; |
365 | # However, the recommended database layout for new courses is "sql_single". This |
|
|
366 | # can be set when creating a course. |
|
|
367 | $dbLayoutName = "sql_single"; # or "gdbm" or "sql" |
| 204 | |
368 | |
|
|
369 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 205 | *dbLayout = $dbLayouts{$dbLayoutName}; |
370 | *dbLayout = $dbLayouts{$dbLayoutName}; |
| 206 | |
371 | |
| 207 | ################################################################################ |
372 | ################################################################################ |
| 208 | # Problem library options |
373 | # Problem library options |
| 209 | ################################################################################ |
374 | ################################################################################ |
| 210 | |
375 | |
| 211 | %problemLibrary = ( |
376 | # The directory containing the problem library files. Set to "" if no problem |
| 212 | root => "", # set to the top of the problem library, if its installed |
377 | # library is installed. |
| 213 | sourceSQL => "ProblemLibrary", |
378 | $problemLibrary{root} = ""; |
| 214 | userSQL => "webworkRead", |
379 | |
| 215 | passwordSQL => "", |
380 | # Problem Library version |
|
|
381 | # Version 1 is in use. Version 2 will be released soon. |
|
|
382 | $problemLibrary{version} = "1"; |
|
|
383 | |
|
|
384 | # The name of the SQL database containing problem metadata |
|
|
385 | $problemLibrary{sourceSQL} = "ProblemLibrary"; |
|
|
386 | |
|
|
387 | # The user name to use when connecting to the problem library database |
|
|
388 | $problemLibrary{userSQL} = "webworkRead"; |
|
|
389 | |
|
|
390 | # The password to use when connecting to the problem library database |
|
|
391 | $problemLibrary{passwordSQL} = ""; |
|
|
392 | |
|
|
393 | ################################################################################ |
|
|
394 | # Logs |
|
|
395 | ################################################################################ |
|
|
396 | |
|
|
397 | # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own |
|
|
398 | # top-level hash. |
|
|
399 | |
|
|
400 | # Logs data about how long it takes to process problems. (Do not confuse this |
|
|
401 | # with the /other/ timing log which can be set by WeBWorK::Timing and is used |
|
|
402 | # for benchmarking system performance in general. At some point, this timing |
|
|
403 | # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) |
|
|
404 | $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; |
|
|
405 | |
|
|
406 | # Logs courses created via the web-based Course Administration module. |
|
|
407 | $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; |
|
|
408 | |
|
|
409 | # The transaction log contains data from each recorded answer submission. This |
|
|
410 | # is useful if the database becomes corrupted. |
|
|
411 | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; |
|
|
412 | |
|
|
413 | # The answer log stores a history of all users' submitted answers. |
|
|
414 | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; |
|
|
415 | |
|
|
416 | # Log logins. |
|
|
417 | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; |
|
|
418 | |
|
|
419 | # Log for almost every click. By default it is the empty string, which |
|
|
420 | # turns this log off. If you want it turned on, we suggest |
|
|
421 | # "$courseDirs{logs}/activity.log" |
|
|
422 | # When turned on, this log can get quite large. |
|
|
423 | $courseFiles{logs}{activity_log} = ''; |
|
|
424 | |
|
|
425 | ################################################################################ |
|
|
426 | # Site defaults (FIXME: what other things could be "site defaults"?) |
|
|
427 | ################################################################################ |
|
|
428 | |
|
|
429 | # Status strings -- lists valid status values and their names. If your site uses |
|
|
430 | # additional values, add them here. |
|
|
431 | $siteDefaults{status} = { |
|
|
432 | A => "Audit", |
|
|
433 | a => "Audit", |
|
|
434 | audit => "Audit", |
|
|
435 | D => "Drop", |
|
|
436 | d => "Drop", |
|
|
437 | drop => "Drop", |
|
|
438 | withdraw => "Drop", |
|
|
439 | C => "Enrolled", |
|
|
440 | c => "Enrolled", |
|
|
441 | current => "Enrolled", |
|
|
442 | enrolled => "Enrolled", |
|
|
443 | }; |
|
|
444 | |
|
|
445 | # Set the default timezone of courses on this server. To get a list of valid |
|
|
446 | # timezones, run: |
|
|
447 | # |
|
|
448 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
|
|
449 | # |
|
|
450 | # To get a list of valid timezone "links" (deprecated names), run: |
|
|
451 | # |
|
|
452 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' |
|
|
453 | # |
|
|
454 | # If left blank, the system timezone will be used. This is usually what you |
|
|
455 | # want. You might want to set this if your server is NOT in the same timezone as |
|
|
456 | # your school. If just a few courses are in a different timezone, set this in |
|
|
457 | # course.conf for the affected courses instead. |
|
|
458 | # |
|
|
459 | $siteDefaults{timezone} = ""; |
|
|
460 | |
|
|
461 | # The default_templates_course is used by default to create a new course. |
|
|
462 | # The contents of the templates directory are copied from this course |
|
|
463 | # to the new course being created. |
|
|
464 | $siteDefaults{default_templates_course} ="modelCourse"; |
|
|
465 | |
|
|
466 | ################################################################################ |
|
|
467 | # Frontend options |
|
|
468 | ################################################################################ |
|
|
469 | |
|
|
470 | %templates = ( |
|
|
471 | system => "$webworkDirs{conf}/templates/ur.template", |
|
|
472 | gateway => "$webworkDirs{conf}/templates/gw.template", |
| 216 | ); |
473 | ); |
| 217 | |
474 | |
| 218 | ################################################################################ |
475 | ################################################################################ |
| 219 | # Authorization system |
476 | # Authorization system |
| 220 | ################################################################################ |
477 | ################################################################################ |
| 221 | |
478 | |
| 222 | # This lets you specify a minimum permission level needed to perform certain |
479 | # This lets you specify a minimum permission level needed to perform certain |
| 223 | # actions. In the current system, >=10 will allow a professor to perform the |
480 | # actions. For each pair in the hash below, in order to perform the action |
| 224 | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an |
481 | # described by the key, the user must have a permission level greater than or |
| 225 | # action (almost never what you want). |
482 | # equal to the value. |
|
|
483 | |
|
|
484 | my $guest = -1; |
|
|
485 | my $student = 0; |
|
|
486 | my $proctor = 2; |
| 226 | my $ta = 5; |
487 | my $ta = 5; |
| 227 | my $professor = 10; |
488 | my $professor = 10; |
|
|
489 | my $nobody = undef; |
|
|
490 | |
| 228 | %permissionLevels = ( |
491 | %permissionLevels = ( |
|
|
492 | login => $guest, |
|
|
493 | report_bugs => $student, |
|
|
494 | submit_feedback => $student, |
|
|
495 | change_password => $student, |
|
|
496 | change_email_address => $student, |
|
|
497 | |
|
|
498 | proctor_quiz => $proctor, |
|
|
499 | |
|
|
500 | view_multiple_sets => $ta, |
|
|
501 | view_unopened_sets => $ta, |
|
|
502 | view_unpublished_sets => $ta, |
|
|
503 | view_answers => $ta, |
|
|
504 | |
| 229 | become_student => $professor, |
505 | become_student => $professor, |
| 230 | access_instructor_tools => $ta, |
506 | access_instructor_tools => $ta, |
|
|
507 | score_sets => $professor, |
|
|
508 | send_mail => $professor, |
|
|
509 | receive_feedback => $ta, |
|
|
510 | |
| 231 | create_and_delete_problem_sets => $professor, |
511 | create_and_delete_problem_sets => $professor, |
|
|
512 | assign_problem_sets => $professor, |
| 232 | modify_problem_sets => $professor, |
513 | modify_problem_sets => $professor, |
| 233 | assign_problem_sets => $professor, |
|
|
| 234 | modify_student_data => $professor, |
514 | modify_student_data => $professor, |
| 235 | score_sets => $professor, |
|
|
| 236 | send_mail => $professor, |
|
|
| 237 | modify_classlist_files => $professor, |
515 | modify_classlist_files => $professor, |
| 238 | modify_set_def_files => $professor, |
516 | modify_set_def_files => $professor, |
| 239 | modify_scoring_files => $professor, |
517 | modify_scoring_files => $professor, |
|
|
518 | modify_problem_template_files => $professor, |
|
|
519 | |
| 240 | create_and_delete_courses => $professor, |
520 | create_and_delete_courses => $professor, |
|
|
521 | fix_course_databases => $professor, |
|
|
522 | |
|
|
523 | ##### Behavior of the interactive problem processor ##### |
|
|
524 | |
|
|
525 | show_correct_answers_before_answer_date => $ta, |
|
|
526 | show_solutions_before_answer_date => $ta, |
|
|
527 | avoid_recording_answers => $ta, |
|
|
528 | # Below this level, old answers are never initially shown |
|
|
529 | can_show_old_answers_by_default => $student, |
|
|
530 | # at this level, we look at showOldAnswers for default value |
|
|
531 | # even after the due date |
|
|
532 | can_always_use_show_old_answers_default => $professor, |
|
|
533 | check_answers_before_open_date => $ta, |
|
|
534 | check_answers_after_open_date_with_attempts => $ta, |
|
|
535 | check_answers_after_open_date_without_attempts => $guest, |
|
|
536 | check_answers_after_due_date => $guest, |
|
|
537 | check_answers_after_answer_date => $guest, |
|
|
538 | record_answers_when_acting_as_student => $nobody, |
|
|
539 | # "record_answers_when_acting_as_student" takes precedence |
|
|
540 | # over the following for professors acting as students: |
|
|
541 | record_answers_before_open_date => $nobody, |
|
|
542 | record_answers_after_open_date_with_attempts => $student, |
|
|
543 | record_answers_after_open_date_without_attempts => $nobody, |
|
|
544 | record_answers_after_due_date => $nobody, |
|
|
545 | record_answers_after_answer_date => $nobody, |
|
|
546 | dont_log_past_answers => $professor, |
|
|
547 | |
|
|
548 | ##### Behavior of the Hardcopy Processor ##### |
|
|
549 | |
|
|
550 | download_hardcopy_multiuser => $ta, |
|
|
551 | download_hardcopy_multiset => $ta, |
|
|
552 | download_hardcopy_format_tex => $ta, |
| 241 | ); |
553 | ); |
| 242 | |
554 | |
| 243 | ################################################################################ |
555 | ################################################################################ |
| 244 | # Session options |
556 | # Session options |
| 245 | ################################################################################ |
557 | ################################################################################ |
| … | |
… | |
| 262 | # kindof a backdoor to the practice user system, since he doesn't have a |
574 | # kindof a backdoor to the practice user system, since he doesn't have a |
| 263 | # password. Come to think of it, why do we even have this?! |
575 | # password. Come to think of it, why do we even have this?! |
| 264 | #$debugPracticeUser = "practice666"; |
576 | #$debugPracticeUser = "practice666"; |
| 265 | |
577 | |
| 266 | ################################################################################ |
578 | ################################################################################ |
| 267 | # PG translation options |
579 | # PG subsystem options |
| 268 | ################################################################################ |
580 | ################################################################################ |
| 269 | |
581 | |
| 270 | %pg = ( |
582 | # List of enabled display modes. Comment out any modes you don't wish to make |
| 271 | # options for various renderers |
583 | # available for use. |
| 272 | renderers => { |
584 | $pg{displayModes} = [ |
| 273 | "WeBWorK::PG::Remote" => { |
585 | "plainText", # display raw TeX for math expressions |
|
|
586 | "formattedText", # format math expressions using TtH |
|
|
587 | "images", # display math expressions as images generated by dvipng |
|
|
588 | "jsMath", # render TeX math expressions on the client side using jsMath |
|
|
589 | "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
|
|
590 | ]; |
|
|
591 | |
|
|
592 | #### Default settings for the PG translator |
|
|
593 | |
|
|
594 | # Default display mode. Should be listed above. |
|
|
595 | $pg{options}{displayMode} = "images"; |
|
|
596 | |
|
|
597 | # The default grader to use, if a problem doesn't specify. |
|
|
598 | $pg{options}{grader} = "avg_problem_grader"; |
|
|
599 | |
|
|
600 | # Fill in answer blanks with the student's last answer by default? |
|
|
601 | $pg{options}{showOldAnswers} = 1; |
|
|
602 | |
|
|
603 | # Show correct answers (when allowed) by default? |
|
|
604 | $pg{options}{showCorrectAnswers} = 0; |
|
|
605 | |
|
|
606 | # Show hints (when allowed) by default? |
|
|
607 | $pg{options}{showHints} = 0; |
|
|
608 | |
|
|
609 | # Show solutions (when allowed) by default? |
|
|
610 | $pg{options}{showSolutions} = 0; |
|
|
611 | |
|
|
612 | # Catch translation warnings internally by default? (We no longer need to do |
|
|
613 | # this, since there is a global warnings handler. So this should be off.) |
|
|
614 | $pg{options}{catchWarnings} = 0; |
|
|
615 | |
|
|
616 | ##### Currently-selected renderer |
|
|
617 | |
|
|
618 | # Only the local renderer is supported in this version. |
|
|
619 | $pg{renderer} = "WeBWorK::PG::Local"; |
|
|
620 | |
|
|
621 | # The remote renderer connects to an XML-RPC PG rendering server. |
|
|
622 | #$pg{renderer} = "WeBWorK::PG::Remote"; |
|
|
623 | |
|
|
624 | ##### Renderer-dependent options |
|
|
625 | |
|
|
626 | # The remote renderer has one option: |
|
|
627 | $pg{renderers}{"WeBWorK::PG::Remote"} = { |
|
|
628 | # The "proxy" server to connect to for remote rendering. |
| 274 | proxy => "http://localhost:21000/RenderD" |
629 | proxy => "http://localhost:21000/RenderD", |
| 275 | } |
630 | }; |
|
|
631 | |
|
|
632 | ##### Settings for various display modes |
|
|
633 | |
|
|
634 | # "images" mode has several settings: |
|
|
635 | $pg{displayModeOptions}{images} = { |
|
|
636 | # Determines the method used to align images in output. Can be |
|
|
637 | # "baseline", "absmiddle", or "mysql". |
|
|
638 | dvipng_align => 'baseline', |
|
|
639 | |
|
|
640 | # If we choose mysql, we need information on connecting to the |
|
|
641 | # database. Whatever you use here, you have to create the database |
|
|
642 | # and grant read/write priveleges to the user listed here. To create |
|
|
643 | # the database in mysql, as root use: |
|
|
644 | # |
|
|
645 | # CREATE DATABASE DvipngDepths; |
|
|
646 | # USE DvipngDepths; |
|
|
647 | # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); |
|
|
648 | # GRANT ALL ON DvipngDepths.* TO webworkWrite; |
|
|
649 | # |
|
|
650 | # In the last statement, "webworkWrite" should match the user below. |
|
|
651 | # FIXME: this database can become a table in the 'webwork' database |
|
|
652 | dvipng_depth_db => { |
|
|
653 | dbsource => 'dbi:mysql:DvipngDepths', |
|
|
654 | user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, |
|
|
655 | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, |
| 276 | }, |
656 | }, |
| 277 | # currently selected renderer |
657 | }; |
| 278 | renderer => "WeBWorK::PG::Local", |
658 | |
| 279 | #renderer => "WeBWorK::PG::Remote", |
659 | $pg{displayModeOptions}{jsMath} = { |
|
|
660 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
|
|
661 | missingFontMessage => undef, # set to an HTML string to replace the missing font message |
|
|
662 | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts |
|
|
663 | }; |
|
|
664 | |
| 280 | # directories used by PG |
665 | ##### Directories used by PG |
| 281 | directories => { |
666 | |
| 282 | # directories used only by PG |
667 | # The root of the PG directory tree (from pg_root in Apache config). |
| 283 | root => "$pgRoot", |
668 | $pg{directories}{root} = "$pg_dir"; |
| 284 | lib => "$pgRoot/lib", |
669 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 285 | macros => "$pgRoot/macros", |
670 | $pg{directories}{macros} = "$pg{directories}{root}/macros"; |
| 286 | }, |
671 | |
| 287 | options => { |
672 | # |
| 288 | # default translation options |
673 | # The macro file search path. Each directory in this list is seached |
| 289 | displayMode => "images", |
674 | # (in this order) by loadMacros() when it looks for a .pl file. |
| 290 | showOldAnswers => 1, |
675 | # |
| 291 | showCorrectAnswers => 0, |
676 | $pg{directories}{macrosPath} = [ |
| 292 | showHints => 0, |
677 | ".", # search the problem file's directory |
| 293 | showSolutions => 0, |
678 | $courseDirs{macros}, |
| 294 | catchWarnings => 0, # there's a global warning catcher now |
679 | $pg{directories}{macros}, |
| 295 | # default grader |
680 | ]; |
| 296 | grader => "avg_problem_grader", |
681 | |
| 297 | }, |
682 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 298 | # this will be customized in the course.conf file |
683 | |
| 299 | specialPGEnvironmentVars => { |
684 | # Users for whom to print the file name of the PG file being processed. |
| 300 | PRINT_FILE_NAMES_FOR => [ qw(professor) ], |
685 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
|
|
686 | |
|
|
687 | # Locations of CAPA resources. (Only necessary if you need to use converted CAPA |
|
|
688 | # problems.) |
| 301 | CAPA_Tools => "$courseDirs{macros}/CAPA_Tools/", |
689 | $pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", |
| 302 | CAPA_MCTools => "$courseDirs{macros}/CAPA_MCTools/", |
690 | $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", |
|
|
691 | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", |
| 303 | CAPA_Graphics_URL => "$courseURLs{html}/CAPA_Graphics/", |
692 | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", |
| 304 | CAPA_GraphicsDirectory => "$courseDirs{html}/CAPA_Graphics/", |
693 | |
| 305 | }, |
694 | # Size in pixels of dynamically-generated images, i.e. graphs. |
| 306 | # modules lists module names and the packages each contains |
695 | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
| 307 | modules => [ |
696 | |
|
|
697 | # To activate Parser-based versions of num_cmp and fun_cmp, change this |
|
|
698 | # value to 0. |
|
|
699 | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 1; |
|
|
700 | |
|
|
701 | # Strings to insert at the start and end of the body of a problem |
|
|
702 | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes |
|
|
703 | # can be added if different behaviours are desired (e.g., HTML_dpng, |
|
|
704 | # HTML_asciimath, etc.). These parts are not used in the Library browser. |
|
|
705 | |
|
|
706 | $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; |
|
|
707 | $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; |
|
|
708 | |
|
|
709 | # To have the problem body indented and boxed, uncomment: |
|
|
710 | |
|
|
711 | # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE> |
|
|
712 | # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; |
|
|
713 | # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE> |
|
|
714 | # </BLOCKQUOTE>'; |
|
|
715 | |
|
|
716 | ##### PG modules to load |
|
|
717 | |
|
|
718 | # The first item of each list is the module to load. The remaining items are |
|
|
719 | # additional packages to import. |
|
|
720 | |
|
|
721 | ${pg}{modules} = [ |
| 308 | [qw(DynaLoader)], |
722 | [qw(DynaLoader)], |
| 309 | [qw(Exporter)], |
723 | [qw(Exporter)], |
| 310 | [qw(GD)], |
724 | [qw(GD)], |
| 311 | |
725 | |
| 312 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], |
726 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)], |
| 313 | [qw(AnswerHash AnswerEvaluator)], |
727 | [qw(AnswerHash AnswerEvaluator)], |
| 314 | [qw(WWPlot)], # required by Circle (and others) |
728 | [qw(WWPlot)], # required by Circle (and others) |
| 315 | [qw(Circle)], |
729 | [qw(Circle)], |
| 316 | [qw(Complex)], |
730 | [qw(Complex)], |
| 317 | [qw(Complex1)], |
731 | [qw(Complex1)], |
| 318 | [qw(Distributions)], |
732 | [qw(Distributions)], |
| 319 | [qw(Fraction)], |
733 | [qw(Fraction)], |
| 320 | [qw(Fun)], |
734 | [qw(Fun)], |
| 321 | [qw(Hermite)], |
735 | [qw(Hermite)], |
| 322 | [qw(Label)], |
736 | [qw(Label)], |
| 323 | [qw(List)], |
737 | [qw(List)], |
| 324 | [qw(Match)], |
738 | [qw(Match)], |
| 325 | [qw(MatrixReal1)], # required by Matrix |
739 | [qw(MatrixReal1)], # required by Matrix |
| 326 | [qw(Matrix)], |
740 | [qw(Matrix)], |
| 327 | [qw(Multiple)], |
741 | [qw(Multiple)], |
| 328 | [qw(PGrandom)], |
742 | [qw(PGrandom)], |
| 329 | [qw(Regression)], |
743 | [qw(Regression)], |
| 330 | [qw(Select)], |
744 | [qw(Select)], |
| 331 | [qw(Units)], |
745 | [qw(Units)], |
| 332 | [qw(VectorField)], |
746 | [qw(VectorField)], |
| 333 | ], |
747 | [qw(Parser Value)], |
| 334 | # defaults used by answer evaluators |
748 | [qw(Parser::Legacy)], |
|
|
749 | [qw(Apache::Log)], |
|
|
750 | ]; |
|
|
751 | |
|
|
752 | ##### Answer evaluatior defaults |
|
|
753 | |
| 335 | ansEvalDefaults => { |
754 | $pg{ansEvalDefaults} = { |
| 336 | functAbsTolDefault => .001, |
755 | functAbsTolDefault => .001, |
| 337 | functLLimitDefault => .0000001, |
756 | functLLimitDefault => .0000001, |
| 338 | functMaxConstantOfIntegration => 1E8, |
757 | functMaxConstantOfIntegration => 1E8, |
| 339 | functNumOfPoints => 3, |
758 | functNumOfPoints => 3, |
| 340 | functRelPercentTolDefault => .1, |
759 | functRelPercentTolDefault => .1, |
| 341 | functULimitDefault => .9999999, |
760 | functULimitDefault => .9999999, |
| 342 | functVarDefault => "x", |
761 | functVarDefault => "x", |
| 343 | functZeroLevelDefault => 1E-14, |
762 | functZeroLevelDefault => 1E-14, |
| 344 | functZeroLevelTolDefault => 1E-12, |
763 | functZeroLevelTolDefault => 1E-12, |
| 345 | numAbsTolDefault => .001, |
764 | numAbsTolDefault => .001, |
| 346 | numFormatDefault => "", |
765 | numFormatDefault => "", |
| 347 | numRelPercentTolDefault => .1, |
766 | numRelPercentTolDefault => .1, |
| 348 | numZeroLevelDefault => 1E-14, |
767 | numZeroLevelDefault => 1E-14, |
| 349 | numZeroLevelTolDefault => 1E-12, |
768 | numZeroLevelTolDefault => 1E-12, |
| 350 | useBaseTenLog => 0, |
769 | useBaseTenLog => 0, |
| 351 | defaultDisplayMatrixStyle => "[s]", |
770 | defaultDisplayMatrixStyle => "[s]", |
| 352 | }, |
771 | }; |
| 353 | ); |
772 | |
|
|
773 | ################################################################################ |
|
|
774 | # Compatibility |
|
|
775 | ################################################################################ |
|
|
776 | |
|
|
777 | # Define the old names for the various "root" variables. |
|
|
778 | $webworkRoot = $webworkDirs{root}; |
|
|
779 | $webworkURLRoot = $webworkURLs{root}; |
|
|
780 | $pgRoot = $pg{directories}{root}; |