Parent Directory
|
Revision Log
Revision 2439 - (view) (download)
| 1 : | sh002i | 1801 | #!perl |
| 2 : | sh002i | 654 | ################################################################################ |
| 3 : | sh002i | 1663 | # WeBWorK Online Homework Delivery System |
| 4 : | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ | ||
| 5 : | sh002i | 2439 | # $CVSHeader: webwork-modperl/conf/global.conf.dist,v 1.82 2004/07/03 17:21:27 sh002i Exp $ |
| 6 : | sh002i | 1663 | # |
| 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 | ||
| 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. | ||
| 11 : | # | ||
| 12 : | # This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 13 : | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 14 : | # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the | ||
| 15 : | # Artistic License for more details. | ||
| 16 : | sh002i | 654 | ################################################################################ |
| 17 : | |||
| 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. | ||
| 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, | ||
| 22 : | # use the "my" keyword. The following variables are available to this file: | ||
| 23 : | # | ||
| 24 : | # $webworkRoot directory that contains the WeBWorK distribution | ||
| 25 : | sh002i | 2315 | # $webworkURLRoot base URL handled by Apache::WeBWorK |
| 26 : | sh002i | 1051 | # $pgRoot directory that contains the PG distribution |
| 27 : | sh002i | 654 | # $courseName name of the course being used |
| 28 : | |||
| 29 : | ################################################################################ | ||
| 30 : | sh002i | 2438 | # System-wide locations (directories and URLs) |
| 31 : | sh002i | 663 | ################################################################################ |
| 32 : | sh002i | 654 | |
| 33 : | sh002i | 2438 | # The root directory, set by webwork_root variable in Apache configuration. |
| 34 : | $webworkDirs{root} = "$webworkRoot"; | ||
| 35 : | sh002i | 654 | |
| 36 : | sh002i | 2438 | # Location of system-wide data files. |
| 37 : | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; | ||
| 38 : | sh002i | 654 | |
| 39 : | sh002i | 2438 | # Used for temporary storage of uploaded files. |
| 40 : | $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads"; | ||
| 41 : | sh002i | 654 | |
| 42 : | sh002i | 2438 | # Location of utility programs. |
| 43 : | $webworkDirs{bin} = "$webworkDirs{root}/bin"; | ||
| 44 : | |||
| 45 : | # Location of configuration files, templates, snippets, etc. | ||
| 46 : | $webworkDirs{conf} = "$webworkDirs{root}/conf"; | ||
| 47 : | |||
| 48 : | # Location of course directories. | ||
| 49 : | $webworkDirs{courses} = "$webworkDirs{root}/courses"; | ||
| 50 : | |||
| 51 : | # Contains the WeBWorK libraries. (FIXME: not used) | ||
| 52 : | #$webworkDirs{lib} = "$webworkDirs{root}/lib"; | ||
| 53 : | |||
| 54 : | # Contains log files. | ||
| 55 : | $webworkDirs{logs} = "$webworkDirs{root}/logs"; | ||
| 56 : | |||
| 57 : | # Location of PG macros. (FIXME: not used) | ||
| 58 : | #$webworkDirs{macros} = "$pgRoot/macros"; | ||
| 59 : | |||
| 60 : | # Contains non-web-accessible temporary files, such as TeX working directories. | ||
| 61 : | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; | ||
| 62 : | |||
| 63 : | ##### The following locations are web-accessible. | ||
| 64 : | |||
| 65 : | # The root URL (usually /webwork2), set by <Location> in Apache configuration. | ||
| 66 : | $webworkURLs{root} = "$webworkURLRoot"; | ||
| 67 : | |||
| 68 : | # Location of system-wide web-accessible files, such as equation images, and | ||
| 69 : | # help files. | ||
| 70 : | $webworkDirs{htdocs} = "$webworkDirs{root}/htdocs"; | ||
| 71 : | $webworkURLs{htdocs} = "/webwork2_files"; | ||
| 72 : | |||
| 73 : | # The URL of the static WeBWorK home page (FIXME: not used) | ||
| 74 : | #$webworkURLs{home} = "$webworkURLs{htdocs}/index.html"; | ||
| 75 : | |||
| 76 : | # Location of web-accessible temporary files, such as equation images. | ||
| 77 : | $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; | ||
| 78 : | $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; | ||
| 79 : | |||
| 80 : | # Location of cached equation images. | ||
| 81 : | $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; | ||
| 82 : | $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; | ||
| 83 : | |||
| 84 : | # Contains context-sensitive help files. | ||
| 85 : | $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles"; | ||
| 86 : | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; | ||
| 87 : | |||
| 88 : | # URL of general WeBWorK documentation. | ||
| 89 : | $webworkURLs{docs} = "http://webhost.math.rochester.edu/webworkdocs/docs"; | ||
| 90 : | |||
| 91 : | # URL of WeBWorK 1.x profLogin.pl script, for access to old professor pages. | ||
| 92 : | # Note that both systems must share a single "courses" directory for this to be | ||
| 93 : | # useful. Leave this blank to disable | ||
| 94 : | $webworkURLs{oldProf} = "/webwork1/profLogin.pl"; | ||
| 95 : | |||
| 96 : | # URL of WeBWorK Bugzilla database. | ||
| 97 : | $webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=WeBWorK%20mod_perl"; | ||
| 98 : | |||
| 99 : | # Location of jsMath script, used for the jsMath display mode. | ||
| 100 : | $webworkURLs{jsMath} = "$webworkURLs{root}/jsMath/jsMath.js"; | ||
| 101 : | |||
| 102 : | # Location of ASCIIMathML script, used for the asciimath display mode. | ||
| 103 : | $webworkURLs{asciimath} = "$webworkURLs{root}/ASCIIMathML/ASCIIMathML.js"; | ||
| 104 : | |||
| 105 : | sh002i | 663 | ################################################################################ |
| 106 : | sh002i | 2438 | # Defaults for course-specific locations (directories and URLs) |
| 107 : | sh002i | 663 | ################################################################################ |
| 108 : | |||
| 109 : | sh002i | 2438 | # The root directory of the current course. (The ID of the current course is |
| 110 : | # available in $courseName.) | ||
| 111 : | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; | ||
| 112 : | sh002i | 663 | |
| 113 : | sh002i | 2438 | # Location of course-specific data files, such as WW1 (GDBM) database files. |
| 114 : | $courseDirs{DATA} = "$courseDirs{root}/DATA"; | ||
| 115 : | sh002i | 663 | |
| 116 : | sh002i | 2438 | # Location of authentication data files when using a WW1 (GDBM) database. |
| 117 : | $courseDirs{auth_DATA} = "$courseDirs{DATA}/.auth"; | ||
| 118 : | |||
| 119 : | # Location of course HTML files, passed to PG. | ||
| 120 : | $courseDirs{html} = "$courseDirs{root}/html"; | ||
| 121 : | $courseURLs{html} = "/webwork2_course_files/$courseName"; | ||
| 122 : | #$courseURLs{root} = $courseURLs{html}; # FIXME: not used | ||
| 123 : | |||
| 124 : | # Location of course image files, passed to PG. | ||
| 125 : | $courseDirs{html_images} = "$courseDirs{html}/images"; | ||
| 126 : | |||
| 127 : | # Location of web-accessible, course-specific temporary files, like static and | ||
| 128 : | # dynamically-generated PG graphics. | ||
| 129 : | $courseDirs{html_temp} = "$courseDirs{html}/tmp"; | ||
| 130 : | $courseURLs{html_temp} = "$courseURLs{html}/tmp"; | ||
| 131 : | |||
| 132 : | # Location of course-specific logs, like the transaction log. | ||
| 133 : | $courseDirs{logs} = "$courseDirs{root}/logs"; | ||
| 134 : | |||
| 135 : | # Location of scoring files. | ||
| 136 : | $courseDirs{scoring} = "$courseDirs{root}/scoring"; | ||
| 137 : | |||
| 138 : | # Location of PG templates and set definition files. | ||
| 139 : | $courseDirs{templates} = "$courseDirs{root}/templates"; | ||
| 140 : | |||
| 141 : | # Location of course-specific macro files. | ||
| 142 : | $courseDirs{macros} = "$courseDirs{templates}/macros"; | ||
| 143 : | |||
| 144 : | # Location of mail-merge templates. | ||
| 145 : | $courseDirs{email} = "$courseDirs{templates}/email"; | ||
| 146 : | |||
| 147 : | ################################################################################ | ||
| 148 : | # System-wide files | ||
| 149 : | ################################################################################ | ||
| 150 : | |||
| 151 : | # Location of this file. | ||
| 152 : | $webworkFiles{environment} = "$webworkDirs{conf}/global.conf"; | ||
| 153 : | |||
| 154 : | # Flat-file database used to protect against MD5 hash collisions. TeX equations | ||
| 155 : | # are hashed to determine the name of the image file. There is a tiny chance of | ||
| 156 : | # a collision between two TeX strings. This file allows for that. However, this | ||
| 157 : | # is slow, so most people chose not to worry about it. Set this to "" if you | ||
| 158 : | # don't want to use the equation cache file. | ||
| 159 : | $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache"; | ||
| 160 : | |||
| 161 : | ##### Hardcopy snippets are used in constructing a TeX file for hardcopy output. | ||
| 162 : | ##### They should contain TeX code unless otherwise noted. | ||
| 163 : | |||
| 164 : | # The preamble is the first thing in the TeX file. | ||
| 165 : | $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; | ||
| 166 : | |||
| 167 : | # The setHeader preceeds each set. It is a PG file. | ||
| 168 : | $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; | ||
| 169 : | |||
| 170 : | # The problem divider goes between problems. | ||
| 171 : | $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; | ||
| 172 : | |||
| 173 : | # The set footer goes after each set. Is is a PG file. | ||
| 174 : | $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg"; | ||
| 175 : | |||
| 176 : | # The set divider goes between sets (in multiset output). | ||
| 177 : | $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex"; | ||
| 178 : | |||
| 179 : | # The user divider does between users (in multiuser output). | ||
| 180 : | $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex"; | ||
| 181 : | |||
| 182 : | # The postabmle is the last thing in the TeX file. | ||
| 183 : | $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; | ||
| 184 : | |||
| 185 : | ##### Screen snippets are used when displaying problem sets on the screen. | ||
| 186 : | |||
| 187 : | # The set header is displayed on the problem set page. It is a PG file. | ||
| 188 : | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; | ||
| 189 : | |||
| 190 : | ################################################################################ | ||
| 191 : | # Course-specific files | ||
| 192 : | ################################################################################ | ||
| 193 : | |||
| 194 : | # The course configuration file. | ||
| 195 : | $courseFiles{environment} = "$courseDirs{root}/course.conf"; | ||
| 196 : | |||
| 197 : | # The message of the day, displayed after login. (FIXME: not used) | ||
| 198 : | #$courseFiles{motd} = "$courseDirs{templates}/motd.txt"; | ||
| 199 : | |||
| 200 : | # File contents are displayed after login, on the problem sets page. Path given | ||
| 201 : | # here is relative to the templates directory. | ||
| 202 : | $courseFiles{course_info} = "course_info.txt"; | ||
| 203 : | |||
| 204 : | # File contents are displayed on the login page. Path given here is relative to | ||
| 205 : | # the templates directory. | ||
| 206 : | $courseFiles{login_info} = "login_info.txt"; | ||
| 207 : | |||
| 208 : | # Additional library buttons can be added to the Library Browser (SetMaker.pm) | ||
| 209 : | # by adding the libraries you want to the following line. For each key=>value | ||
| 210 : | # in the list, if a directory (or link to a directory) with name 'key' appears | ||
| 211 : | # in the templates directory, then a button with name 'value' will be placed at | ||
| 212 : | # the top of the problem browser. (No button will appear if there is no | ||
| 213 : | # directory or link with the given name in the templates directory.) For | ||
| 214 : | # example, | ||
| 215 : | # | ||
| 216 : | # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; | ||
| 217 : | # | ||
| 218 : | # would add two buttons, one for the Rochester library and one for the ASU | ||
| 219 : | # library, provided templates/rochester and templates/asu exists. | ||
| 220 : | # | ||
| 221 : | sh002i | 2439 | $courseFiles{problibs} = {}; |
| 222 : | dpvc | 2431 | |
| 223 : | sh002i | 2438 | ################################################################################ |
| 224 : | # Logs | ||
| 225 : | ################################################################################ | ||
| 226 : | dpvc | 2431 | |
| 227 : | sh002i | 2438 | # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own |
| 228 : | # top-level hash. | ||
| 229 : | sh002i | 705 | |
| 230 : | sh002i | 2438 | # Logs data about how long it takes to process problems. (Do not confuse this |
| 231 : | # with the /other/ timing log which can be set by WeBWorK::Timing and is used | ||
| 232 : | # for benchmarking system performance in general. At some point, this timing | ||
| 233 : | # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) | ||
| 234 : | $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; | ||
| 235 : | sh002i | 654 | |
| 236 : | sh002i | 2438 | # The transaction log contains data from each recorded answer submission. This |
| 237 : | # is useful if the database becomes corrupted. | ||
| 238 : | $webworkFiles{logs}{transaction} = "$courseDirs{logs}/transaction.log"; | ||
| 239 : | |||
| 240 : | # The past answer list stores a history of all users' submitted answers. (FIXME: not used) | ||
| 241 : | $webworkFiles{logs}{pastAnswerList} = "$courseDirs{logs}/past_answers.log"; | ||
| 242 : | |||
| 243 : | # The answer log stores a history of all users' submitted answers. | ||
| 244 : | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; | ||
| 245 : | |||
| 246 : | sh002i | 654 | ################################################################################ |
| 247 : | sh002i | 2438 | # Mail settings |
| 248 : | sh002i | 663 | ################################################################################ |
| 249 : | sh002i | 654 | |
| 250 : | sh002i | 2438 | # Mail sent by the PG system and the mail merge and feedback modules will be |
| 251 : | # sent via this SMTP server. | ||
| 252 : | sh002i | 2439 | $mail{smtpServer} = 'mail.yourschool.edu'; |
| 253 : | sh002i | 2438 | |
| 254 : | # When connecting to the above server, WeBWorK will send this address in the | ||
| 255 : | # MAIL FROM command. This has nothing to do with the "From" address on the mail | ||
| 256 : | # message. It can really be anything, but some mail servers require it contain | ||
| 257 : | # a valid mail domain, or at least be well-formed. | ||
| 258 : | sh002i | 2439 | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; |
| 259 : | sh002i | 1801 | |
| 260 : | sh002i | 2438 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
| 261 : | # to. this prevents subtle PG exploits. This should be set in course.conf to the | ||
| 262 : | # addresses of professors of each course. Sending mail from the PG system (i.e. | ||
| 263 : | # questionaires, essay questions) will fail if this is not set somewhere (either | ||
| 264 : | # here or in course.conf). | ||
| 265 : | sh002i | 2439 | $mail{allowedRecipients} = [ |
| 266 : | sh002i | 2438 | #'prof1@yourserver.yourdomain.edu', |
| 267 : | #'prof2@yourserver.yourdomain.edu', | ||
| 268 : | ]; | ||
| 269 : | sh002i | 1801 | |
| 270 : | sh002i | 2438 | # If defined, feedbackRecipients overrides the list of recipients for feedback |
| 271 : | # email. It's appropriate to set this in the course.conf for specific courses, | ||
| 272 : | # but probably not in global.conf. if not defined, mail is sent to all | ||
| 273 : | # professors and TAs for a given course | ||
| 274 : | sh002i | 2439 | $mail{feedbackRecipients} = [ |
| 275 : | sh002i | 2438 | #'prof1@yourserver.yourdomain.edu', |
| 276 : | #'prof2@yourserver.yourdomain.edu', | ||
| 277 : | ]; | ||
| 278 : | sh002i | 1801 | |
| 279 : | sh002i | 2438 | # feedbackVerbosity: |
| 280 : | # 0: send only the feedback comment and context link | ||
| 281 : | # 1: as in 0, plus user, set, problem, and PG data | ||
| 282 : | # 2: as in 1, plus the problem environment (debugging data) | ||
| 283 : | sh002i | 2439 | $mail{feedbackVerbosity} = 1; |
| 284 : | sh002i | 1801 | |
| 285 : | sh002i | 2438 | # Defines the size of the Mail Merge editor window |
| 286 : | # FIXME: should this be here? it's UI, not mail | ||
| 287 : | # FIXME: replace this with the auto-size method that TWiki uses | ||
| 288 : | $mail{editor_window_rows} = 15; | ||
| 289 : | $mail{editor_window_columns} = 100; | ||
| 290 : | sh002i | 654 | |
| 291 : | sh002i | 2438 | ################################################################################ |
| 292 : | # Paths to external programs | ||
| 293 : | ################################################################################ | ||
| 294 : | sh002i | 663 | |
| 295 : | sh002i | 2438 | $externalPrograms{mkdir} = "/bin/mkdir"; |
| 296 : | $externalPrograms{mysql} = "/usr/local/bin/mysql"; | ||
| 297 : | toenail | 2111 | |
| 298 : | sh002i | 2438 | $externalPrograms{latex} = "/usr/local/bin/latex"; |
| 299 : | $externalPrograms{pdflatex} = "/usr/local/bin/pdflatex"; | ||
| 300 : | $externalPrograms{dvipng} = "/usr/local/bin/dvipng"; | ||
| 301 : | $externalPrograms{tth} = "/usr/local/bin/tth"; | ||
| 302 : | |||
| 303 : | # These image conversion utilities are included in the WeBWorK distribution. | ||
| 304 : | $externalPrograms{gif2eps} = "$webworkDirs{bin}/gif2eps"; | ||
| 305 : | $externalPrograms{png2eps} = "$webworkDirs{bin}/png2eps"; | ||
| 306 : | $externalPrograms{gif2png} = "$webworkDirs{bin}/gif2png"; | ||
| 307 : | |||
| 308 : | sh002i | 663 | ################################################################################ |
| 309 : | sh002i | 2438 | # Site defaults (FIXME: what other things could be "site defaults"?) |
| 310 : | ################################################################################ | ||
| 311 : | |||
| 312 : | # Status strings -- lists valid status values and their names. If your site uses | ||
| 313 : | # additional values, add them here. | ||
| 314 : | $siteDefaults{status} = { | ||
| 315 : | A => "Audit", | ||
| 316 : | audit => "Audit", | ||
| 317 : | D => "Drop", | ||
| 318 : | drop => "Drop", | ||
| 319 : | withdraw => "Drop", | ||
| 320 : | C => "Enrolled", | ||
| 321 : | current => "Enrolled", | ||
| 322 : | enrolled => "Enrolled", | ||
| 323 : | }; | ||
| 324 : | |||
| 325 : | ################################################################################ | ||
| 326 : | sh002i | 663 | # Frontend options |
| 327 : | ################################################################################ | ||
| 328 : | |||
| 329 : | sh002i | 654 | %templates = ( |
| 330 : | sh002i | 1100 | system => "$webworkDirs{conf}/templates/ur.template", |
| 331 : | sh002i | 654 | ); |
| 332 : | |||
| 333 : | sh002i | 663 | ################################################################################ |
| 334 : | sh002i | 1108 | # Database options |
| 335 : | sh002i | 663 | ################################################################################ |
| 336 : | |||
| 337 : | sh002i | 1696 | # Several database are defined in the file conf/database.conf and stored in the |
| 338 : | # hash %dbLayouts. | ||
| 339 : | include "conf/database.conf"; | ||
| 340 : | sh002i | 768 | |
| 341 : | sh002i | 1696 | # Select the default database layout. This can be overridden in the course.conf |
| 342 : | sh002i | 2438 | # file of a particular course. If you choose "gdbm", WeBWorK will be able to |
| 343 : | # use courses from WeBWorK 1 without first adding course.conf files to them. | ||
| 344 : | # However, the recommended database layout for new courses is "sql". This can | ||
| 345 : | # be set when creating a course. | ||
| 346 : | $dbLayoutName = "sql"; # or: "gdbm" | ||
| 347 : | gage | 1099 | |
| 348 : | sh002i | 2438 | # This sets the symbol "dbLayout" as an alias for the selected database layout. |
| 349 : | sh002i | 2439 | *dbLayout = $dbLayouts{$dbLayoutName}; |
| 350 : | sh002i | 1801 | |
| 351 : | sh002i | 1108 | ################################################################################ |
| 352 : | sh002i | 2146 | # Problem library options |
| 353 : | ################################################################################ | ||
| 354 : | |||
| 355 : | sh002i | 2438 | # The directory containing the problem library files. Set to "" if no problem |
| 356 : | # library is installed. | ||
| 357 : | $problemLibrary{root} = ""; | ||
| 358 : | sh002i | 2146 | |
| 359 : | sh002i | 2438 | # The name of the SQL database containing problem metadata |
| 360 : | $problemLibrary{sourceSQL} = "ProblemLibrary"; | ||
| 361 : | |||
| 362 : | # The user name to use when connecting to the problem library database | ||
| 363 : | sh002i | 2439 | $problemLibrary{userSQL} = "webworkRead"; |
| 364 : | sh002i | 2438 | |
| 365 : | # The password to use when connecting to the problem library database | ||
| 366 : | $problemLibrary{passwordSQL} = ""; | ||
| 367 : | |||
| 368 : | sh002i | 2146 | ################################################################################ |
| 369 : | sh002i | 1108 | # Authorization system |
| 370 : | ################################################################################ | ||
| 371 : | |||
| 372 : | # This lets you specify a minimum permission level needed to perform certain | ||
| 373 : | # actions. In the current system, >=10 will allow a professor to perform the | ||
| 374 : | # action, >=5 will allow a TA to, and >=0 will allow a student to perform an | ||
| 375 : | # action (almost never what you want). | ||
| 376 : | sh002i | 2438 | |
| 377 : | sh002i | 2439 | my $student = 0; |
| 378 : | my $ta = 5; | ||
| 379 : | gage | 1021 | my $professor = 10; |
| 380 : | sh002i | 2438 | |
| 381 : | sh002i | 654 | %permissionLevels = ( |
| 382 : | sh002i | 2381 | report_bugs => $student, |
| 383 : | toenail | 2376 | view_multiple_sets => $ta, |
| 384 : | view_unopened_sets => $ta, | ||
| 385 : | view_unpublished_sets => $ta, | ||
| 386 : | view_answers => $ta, | ||
| 387 : | sh002i | 1108 | become_student => $professor, |
| 388 : | access_instructor_tools => $ta, | ||
| 389 : | create_and_delete_problem_sets => $professor, | ||
| 390 : | modify_problem_sets => $professor, | ||
| 391 : | assign_problem_sets => $professor, | ||
| 392 : | malsyned | 1210 | modify_student_data => $professor, |
| 393 : | malsyned | 1446 | score_sets => $professor, |
| 394 : | toenail | 2376 | send_mail => $professor, |
| 395 : | sh002i | 1617 | modify_classlist_files => $professor, |
| 396 : | modify_set_def_files => $professor, | ||
| 397 : | sh002i | 2000 | modify_scoring_files => $professor, |
| 398 : | gage | 2027 | create_and_delete_courses => $professor, |
| 399 : | sh002i | 2309 | fix_course_databases => $professor, |
| 400 : | sh002i | 654 | ); |
| 401 : | |||
| 402 : | sh002i | 1108 | ################################################################################ |
| 403 : | # Session options | ||
| 404 : | ################################################################################ | ||
| 405 : | |||
| 406 : | sh002i | 768 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 407 : | $sessionKeyTimeout = 60*30; | ||
| 408 : | |||
| 409 : | sh002i | 811 | # $sessionKeyLength defines the length (in characters) of the session key |
| 410 : | $sessionKeyLength = 40; | ||
| 411 : | |||
| 412 : | # @sessionKeyChars lists the legal session key characters | ||
| 413 : | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9', '.', '^', '/', '!', '*'); | ||
| 414 : | |||
| 415 : | sh002i | 768 | # Practice users are users who's names start with $practiceUser |
| 416 : | # (you can comment this out to remove practice user support) | ||
| 417 : | $practiceUserPrefix = "practice"; | ||
| 418 : | |||
| 419 : | # There is a practice user who can be logged in multiple times. He's | ||
| 420 : | # commented out by default, though, so you don't hurt yourself. It is | ||
| 421 : | # kindof a backdoor to the practice user system, since he doesn't have a | ||
| 422 : | # password. Come to think of it, why do we even have this?! | ||
| 423 : | #$debugPracticeUser = "practice666"; | ||
| 424 : | |||
| 425 : | sh002i | 663 | ################################################################################ |
| 426 : | sh002i | 2438 | # PG subsystem options |
| 427 : | sh002i | 663 | ################################################################################ |
| 428 : | sh002i | 654 | |
| 429 : | sh002i | 2438 | # List of enabled display modes. Comment out any modes you don't wish to make |
| 430 : | # available for use. | ||
| 431 : | $pg{displayModes} = [ | ||
| 432 : | "plainText", # display raw TeX for math expressions | ||
| 433 : | "formattedText", # format math expressions using TtH | ||
| 434 : | "images", # display math expressions as images generated by dvipng | ||
| 435 : | "jsMath", # render TeX math expressions on the client side using jsMath | ||
| 436 : | "asciimath", # render TeX math expressions on the client side using ASCIIMathML | ||
| 437 : | ]; | ||
| 438 : | |||
| 439 : | #### Default settings for the PG translator | ||
| 440 : | |||
| 441 : | # Default display mode. Should be listed above. | ||
| 442 : | $pg{options}{displayMode} = "images"; | ||
| 443 : | |||
| 444 : | # The default grader to use, if a problem doesn't specify. | ||
| 445 : | $pg{options}{grader} = "avg_problem_grader"; | ||
| 446 : | |||
| 447 : | # Fill in answer blanks with the student's last answer by default? | ||
| 448 : | $pg{options}{showOldAnswers} = 1; | ||
| 449 : | |||
| 450 : | # Show correct answers (when allowed) by default? | ||
| 451 : | $pg{options}{showCorrectAnswers} = 0; | ||
| 452 : | |||
| 453 : | # Show hints (when allowed) by default? | ||
| 454 : | $pg{options}{showHints} = 0; | ||
| 455 : | |||
| 456 : | # Show solutions (when allowed) by default? | ||
| 457 : | $pg{options}{showSolutions} = 0; | ||
| 458 : | |||
| 459 : | # Catch translation warnings internally by default? (We no longer need to do | ||
| 460 : | # this, since there is a global warnings handler. So this should be off.) | ||
| 461 : | $pg{options}{catchWarnings} = 0; | ||
| 462 : | |||
| 463 : | ##### Currently-selected renderer | ||
| 464 : | |||
| 465 : | # Only the local renderer is supported in this version. | ||
| 466 : | $pg{renderer} = "WeBWorK::PG::Local"; | ||
| 467 : | |||
| 468 : | # The remote renderer connects to an XML-RPC PG rendering server. | ||
| 469 : | #$pg{renderer} = "WeBWorK::PG::Remote"' | ||
| 470 : | |||
| 471 : | ##### Renderer-dependent options | ||
| 472 : | |||
| 473 : | # The remote renderer has one option: | ||
| 474 : | $pg{renderers}{"WeBWorK::PG::Remote"} = { | ||
| 475 : | # The "proxy" server to connect to for remote rendering. | ||
| 476 : | proxy => "http://localhost:21000/RenderD", | ||
| 477 : | }; | ||
| 478 : | |||
| 479 : | ##### Settings for various display modes | ||
| 480 : | |||
| 481 : | # "images" mode has several settings: | ||
| 482 : | $pg{displayModeOptions}{images} = { | ||
| 483 : | # Determines the method used to align images in output. Can be | ||
| 484 : | # "baseline", "absmiddle", or "mysql". | ||
| 485 : | dvipng_align => 'baseline', | ||
| 486 : | |||
| 487 : | # If we choose mysql, we need information on connecting to the | ||
| 488 : | # database. Whatever you use here, you have to create the database | ||
| 489 : | # and grant read/write priveleges to the user listed here. To create | ||
| 490 : | # the database in mysql, as root use: | ||
| 491 : | # | ||
| 492 : | # CREATE DATABASE DvipngDepths; | ||
| 493 : | # USE DvipngDepths; | ||
| 494 : | # CREATE TABLE depths (md5 CHAR(33) NOT NULL, depth SMALLINT, PRIMARY KEY (md5)); | ||
| 495 : | # GRANT ALL ON DvipngDepths.* TO webworkWrite; | ||
| 496 : | # | ||
| 497 : | # In the last statement, "webworkWrite" should match the user below. | ||
| 498 : | dvipng_depth_db => { | ||
| 499 : | dbsource => 'dbi:mysql:DvipngDepths', | ||
| 500 : | user => $dbLayouts{sql}->{password}->{params}->{usernameRW}, | ||
| 501 : | passwd => $dbLayouts{sql}->{password}->{params}->{passwordRW}, | ||
| 502 : | sh002i | 2192 | }, |
| 503 : | sh002i | 2438 | }; |
| 504 : | jj | 2413 | |
| 505 : | sh002i | 2438 | ##### Directories used by PG |
| 506 : | jj | 2413 | |
| 507 : | sh002i | 2438 | # The root of the PG directory tree (from pg_root in Apache config). |
| 508 : | $pg{directories}{root} = "$pgRoot"; | ||
| 509 : | $pg{directories}{lib} = "$pg{directories}{root}/lib"; | ||
| 510 : | $pg{directories}{macros} = "$pg{directories}{root}/macros"; | ||
| 511 : | jj | 2417 | |
| 512 : | sh002i | 2438 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 513 : | jj | 2417 | |
| 514 : | sh002i | 2438 | # Users for whom to print the file name of the PG file being processed. |
| 515 : | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; | ||
| 516 : | jj | 2417 | |
| 517 : | sh002i | 2438 | # Locations of CAPA resources. (Only necessary if you need to use converted CAPA |
| 518 : | # problems.) | ||
| 519 : | $pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", | ||
| 520 : | $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", | ||
| 521 : | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", | ||
| 522 : | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", | ||
| 523 : | |||
| 524 : | # Size in pixels of dynamically-generated images, i.e. graphs. | ||
| 525 : | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, | ||
| 526 : | |||
| 527 : | ##### PG modules to load | ||
| 528 : | |||
| 529 : | # The first item of each list is the module to load. The remaining items are | ||
| 530 : | # additional packages to import. | ||
| 531 : | |||
| 532 : | ${pg}{modules} = [ | ||
| 533 : | [qw(DynaLoader)], | ||
| 534 : | [qw(Exporter)], | ||
| 535 : | [qw(GD)], | ||
| 536 : | |||
| 537 : | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand)], | ||
| 538 : | [qw(AnswerHash AnswerEvaluator)], | ||
| 539 : | [qw(WWPlot)], # required by Circle (and others) | ||
| 540 : | [qw(Circle)], | ||
| 541 : | [qw(Complex)], | ||
| 542 : | [qw(Complex1)], | ||
| 543 : | [qw(Distributions)], | ||
| 544 : | [qw(Fraction)], | ||
| 545 : | [qw(Fun)], | ||
| 546 : | [qw(Hermite)], | ||
| 547 : | [qw(Label)], | ||
| 548 : | [qw(List)], | ||
| 549 : | [qw(Match)], | ||
| 550 : | [qw(MatrixReal1)], # required by Matrix | ||
| 551 : | [qw(Matrix)], | ||
| 552 : | [qw(Multiple)], | ||
| 553 : | [qw(PGrandom)], | ||
| 554 : | [qw(Regression)], | ||
| 555 : | [qw(Select)], | ||
| 556 : | [qw(Units)], | ||
| 557 : | [qw(VectorField)], | ||
| 558 : | ]; | ||
| 559 : | |||
| 560 : | ##### Answer evaluatior defaults | ||
| 561 : | |||
| 562 : | $pg{ansEvalDefaults} = { | ||
| 563 : | functAbsTolDefault => .001, | ||
| 564 : | functLLimitDefault => .0000001, | ||
| 565 : | functMaxConstantOfIntegration => 1E8, | ||
| 566 : | functNumOfPoints => 3, | ||
| 567 : | functRelPercentTolDefault => .1, | ||
| 568 : | functULimitDefault => .9999999, | ||
| 569 : | functVarDefault => "x", | ||
| 570 : | functZeroLevelDefault => 1E-14, | ||
| 571 : | functZeroLevelTolDefault => 1E-12, | ||
| 572 : | numAbsTolDefault => .001, | ||
| 573 : | numFormatDefault => "", | ||
| 574 : | numRelPercentTolDefault => .1, | ||
| 575 : | numZeroLevelDefault => 1E-14, | ||
| 576 : | numZeroLevelTolDefault => 1E-12, | ||
| 577 : | useBaseTenLog => 0, | ||
| 578 : | defaultDisplayMatrixStyle => "[s]", | ||
| 579 : | }; |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |