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