Parent Directory
|
Revision Log
Revision 6349 - (view) (download)
| 1 : | sh002i | 1801 | #!perl |
| 2 : | sh002i | 654 | ################################################################################ |
| 3 : | sh002i | 1663 | # WeBWorK Online Homework Delivery System |
| 4 : | sh002i | 5319 | # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 : | apizer | 6273 | # $CVSHeader: webwork2/conf/global.conf.dist,v 1.225 2010/05/18 18:03:31 apizer 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 | 5277 | # 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 : | sh002i | 2515 | # addition, the $courseName variable holds the name of the current course. |
| 25 : | sh002i | 654 | |
| 26 : | ################################################################################ | ||
| 27 : | sh002i | 5277 | # Seed variables |
| 28 : | ################################################################################ | ||
| 29 : | |||
| 30 : | # Set these variables to correspond to your configuration and preferences. You | ||
| 31 : | # will need to restart the webserver to reset the variables in this section. | ||
| 32 : | |||
| 33 : | apizer | 5838 | # URL of WeBWorK handler. If WeBWorK is to be on the web server root, use "". Note |
| 34 : | # that using "" may not work so we suggest sticking with "/webwork2". | ||
| 35 : | sh002i | 5277 | $webwork_url = "/webwork2"; |
| 36 : | |||
| 37 : | # Root directory of PG. | ||
| 38 : | $pg_dir = "/opt/webwork/pg"; | ||
| 39 : | |||
| 40 : | # URL and path to htdocs directory. | ||
| 41 : | $webwork_htdocs_url = "/webwork2_files"; | ||
| 42 : | $webwork_htdocs_dir = "$webwork_dir/htdocs"; | ||
| 43 : | |||
| 44 : | # URL and path to courses directory. | ||
| 45 : | $webwork_courses_url = "/webwork2_course_files"; | ||
| 46 : | gage | 5771 | $webwork_courses_dir = "/opt/webwork/courses"; #(a typical place to put the course directory |
| 47 : | sh002i | 5277 | |
| 48 : | ################################################################################ | ||
| 49 : | sh002i | 2508 | # Paths to external programs |
| 50 : | ################################################################################ | ||
| 51 : | |||
| 52 : | gage | 6113 | # system utilities |
| 53 : | sh002i | 4843 | $externalPrograms{mv} = "/bin/mv"; |
| 54 : | $externalPrograms{cp} = "/bin/cp"; | ||
| 55 : | $externalPrograms{rm} = "/bin/rm"; | ||
| 56 : | $externalPrograms{mkdir} = "/bin/mkdir"; | ||
| 57 : | apizer | 5008 | $externalPrograms{tar} = "/bin/tar"; |
| 58 : | sh002i | 5019 | $externalPrograms{gzip} = "/bin/gzip"; |
| 59 : | sh002i | 2508 | |
| 60 : | sh002i | 3622 | # equation rendering/hardcopy utiltiies |
| 61 : | sh002i | 3389 | $externalPrograms{latex} = "/usr/bin/latex"; |
| 62 : | sh002i | 4579 | $externalPrograms{pdflatex} = "/usr/bin/pdflatex --shell-escape"; |
| 63 : | sh002i | 3389 | $externalPrograms{dvipng} = "/usr/bin/dvipng"; |
| 64 : | $externalPrograms{tth} = "/usr/bin/tth"; | ||
| 65 : | sh002i | 2508 | |
| 66 : | gage | 6349 | #################################################### |
| 67 : | sh002i | 3622 | # NetPBM - basic image manipulation utilities |
| 68 : | gage | 4769 | # Most sites only need to configure $netpbm_prefix. |
| 69 : | gage | 6349 | #################################################### |
| 70 : | sh002i | 3581 | my $netpbm_prefix = "/usr/bin"; |
| 71 : | $externalPrograms{giftopnm} = "$netpbm_prefix/giftopnm"; | ||
| 72 : | $externalPrograms{ppmtopgm} = "$netpbm_prefix/ppmtopgm"; | ||
| 73 : | $externalPrograms{pnmtops} = "$netpbm_prefix/pnmtops"; | ||
| 74 : | $externalPrograms{pnmtopng} = "$netpbm_prefix/pnmtopng"; | ||
| 75 : | $externalPrograms{pngtopnm} = "$netpbm_prefix/pngtopnm"; | ||
| 76 : | jj | 3546 | |
| 77 : | gage | 4104 | # url checker |
| 78 : | $externalPrograms{checkurl} = "/usr/local/bin/lwp-request -mHEAD "; # or "/usr/local/bin/w3c -head " | ||
| 79 : | |||
| 80 : | sh002i | 3622 | # image conversions utiltiies |
| 81 : | # the source file is given on stdin, and the output expected on stdout. | ||
| 82 : | sh002i | 4843 | $externalPrograms{gif2eps} = "$externalPrograms{giftopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; |
| 83 : | $externalPrograms{png2eps} = "$externalPrograms{pngtopnm} | $externalPrograms{ppmtopgm} | $externalPrograms{pnmtops} -noturn 2>/dev/null"; | ||
| 84 : | $externalPrograms{gif2png} = "$externalPrograms{giftopnm} | $externalPrograms{pnmtopng}"; | ||
| 85 : | gage | 4769 | |
| 86 : | sh002i | 4843 | # mysql clients |
| 87 : | $externalPrograms{mysql} = "/usr/bin/mysql"; | ||
| 88 : | $externalPrograms{mysqldump} = "/usr/bin/mysqldump"; | ||
| 89 : | jj | 3546 | |
| 90 : | sh002i | 2508 | ################################################################################ |
| 91 : | # Mail settings | ||
| 92 : | ################################################################################ | ||
| 93 : | |||
| 94 : | # Mail sent by the PG system and the mail merge and feedback modules will be | ||
| 95 : | # sent via this SMTP server. | ||
| 96 : | apizer | 3617 | $mail{smtpServer} = 'mail.yourschool.edu'; |
| 97 : | sh002i | 2508 | |
| 98 : | # When connecting to the above server, WeBWorK will send this address in the | ||
| 99 : | # MAIL FROM command. This has nothing to do with the "From" address on the mail | ||
| 100 : | # message. It can really be anything, but some mail servers require it contain | ||
| 101 : | # a valid mail domain, or at least be well-formed. | ||
| 102 : | $mail{smtpSender} = 'webwork@yourserver.yourschool.edu'; | ||
| 103 : | sh002i | 3645 | |
| 104 : | sh002i | 5609 | # Seconds to wait before timing out when connecting to the SMTP server. |
| 105 : | $mail{smtpTimeout} = 30; | ||
| 106 : | |||
| 107 : | sh002i | 2508 | # AllowedRecipients defines addresses that the PG system is allowed to send mail |
| 108 : | # to. this prevents subtle PG exploits. This should be set in course.conf to the | ||
| 109 : | # addresses of professors of each course. Sending mail from the PG system (i.e. | ||
| 110 : | # questionaires, essay questions) will fail if this is not set somewhere (either | ||
| 111 : | # here or in course.conf). | ||
| 112 : | $mail{allowedRecipients} = [ | ||
| 113 : | #'prof1@yourserver.yourdomain.edu', | ||
| 114 : | #'prof2@yourserver.yourdomain.edu', | ||
| 115 : | ]; | ||
| 116 : | sh002i | 3627 | |
| 117 : | # By default, feeback is sent to all users who have permission to | ||
| 118 : | # receive_feedback. If this list is non-empty, feedback is also sent to the | ||
| 119 : | # addresses specified here. | ||
| 120 : | # | ||
| 121 : | # * If you want to disable feedback altogether, leave this empty and set | ||
| 122 : | # submit_feeback => $nobody in %permissionLevels below. This will cause the | ||
| 123 : | # feedback button to go away as well. | ||
| 124 : | # | ||
| 125 : | # * If you want to send email ONLY to addresses in this list, set | ||
| 126 : | apizer | 3643 | # receive_feedback => $nobody in %permissionLevels below. |
| 127 : | sh002i | 3627 | # |
| 128 : | # It's often useful to set this in the course.conf to change the behavior of | ||
| 129 : | # feedback for a specific course. | ||
| 130 : | # | ||
| 131 : | sh002i | 3698 | # Items in this list may be bare addresses, or RFC822 mailboxes, like: |
| 132 : | # 'Joe User <joe.user@example.com>' | ||
| 133 : | # The advantage of this form is that the resulting email will include the name | ||
| 134 : | # of the recipient in the "To" field of the email. | ||
| 135 : | # | ||
| 136 : | sh002i | 3627 | $mail{feedbackRecipients} = [ |
| 137 : | #'prof1@yourserver.yourdomain.edu', | ||
| 138 : | #'prof2@yourserver.yourdomain.edu', | ||
| 139 : | ]; | ||
| 140 : | |||
| 141 : | sh002i | 3645 | # Feedback subject line -- the following escape sequences are recognized: |
| 142 : | # | ||
| 143 : | # %c = course ID | ||
| 144 : | # %u = user ID | ||
| 145 : | # %s = set ID | ||
| 146 : | # %p = problem ID | ||
| 147 : | # %x = section | ||
| 148 : | # %r = recitation | ||
| 149 : | # %% = literal percent sign | ||
| 150 : | # | ||
| 151 : | gage | 5572 | |
| 152 : | sh002i | 3656 | $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p sec:%x rec:%r"; |
| 153 : | sh002i | 3645 | |
| 154 : | sh002i | 2508 | # feedbackVerbosity: |
| 155 : | # 0: send only the feedback comment and context link | ||
| 156 : | # 1: as in 0, plus user, set, problem, and PG data | ||
| 157 : | # 2: as in 1, plus the problem environment (debugging data) | ||
| 158 : | $mail{feedbackVerbosity} = 1; | ||
| 159 : | sh002i | 3645 | |
| 160 : | sh002i | 2508 | # Defines the size of the Mail Merge editor window |
| 161 : | # FIXME: should this be here? it's UI, not mail | ||
| 162 : | # FIXME: replace this with the auto-size method that TWiki uses | ||
| 163 : | $mail{editor_window_rows} = 15; | ||
| 164 : | $mail{editor_window_columns} = 100; | ||
| 165 : | |||
| 166 : | gage | 6113 | ################################################### |
| 167 : | # Customizing the action of the "Email your instructor" button | ||
| 168 : | ################################################### | ||
| 169 : | |||
| 170 : | sh002i | 4645 | # Use this to customize the text of the feedback button. |
| 171 : | $feedback_button_name = "Email instructor"; | ||
| 172 : | |||
| 173 : | sh002i | 5617 | # If this value is true, feedback will only be sent to users with the same |
| 174 : | # section as the user initiating the feedback. | ||
| 175 : | $feedback_by_section = 0; | ||
| 176 : | |||
| 177 : | gage | 6113 | # If the variable below is set to a non-empty value (i.e. in course.conf), WeBWorK's usual |
| 178 : | # email feedback mechanism will be replaced with a link to the given URL. | ||
| 179 : | # See also $feedback_button_name, above. | ||
| 180 : | |||
| 181 : | $courseURLs{feedbackURL} = ""; | ||
| 182 : | |||
| 183 : | # If the variable below is set to a non-empty value (i.e. in course.conf), | ||
| 184 : | # WeBWorK's usual email feedback mechanism will be replaced with a link to the given URL and | ||
| 185 : | # a POST request with information about the problem including the HTML rendering | ||
| 186 : | # of the problem will be sent to that URL. | ||
| 187 : | # See also $feedback_button_name, above. | ||
| 188 : | |||
| 189 : | #$courseURLs{feedbackFormURL} = "http://www.mathnerds.com/MathNerds/mmn/SDS/askQuestion.aspx"; #"http://www.tipjar.com/cgi-bin/test"; | ||
| 190 : | $courseURLs{feedbackFormURL} = ""; | ||
| 191 : | |||
| 192 : | sh002i | 2508 | ################################################################################ |
| 193 : | sh002i | 5021 | # Theme |
| 194 : | ################################################################################ | ||
| 195 : | |||
| 196 : | $defaultTheme = "math"; | ||
| 197 : | $defaultThemeTemplate = "system"; | ||
| 198 : | |||
| 199 : | ################################################################################ | ||
| 200 : | sh002i | 2438 | # System-wide locations (directories and URLs) |
| 201 : | sh002i | 663 | ################################################################################ |
| 202 : | sh002i | 654 | |
| 203 : | sh002i | 2438 | # The root directory, set by webwork_root variable in Apache configuration. |
| 204 : | sh002i | 2491 | $webworkDirs{root} = "$webwork_dir"; |
| 205 : | sh002i | 654 | |
| 206 : | sh002i | 2438 | # Location of system-wide data files. |
| 207 : | $webworkDirs{DATA} = "$webworkDirs{root}/DATA"; | ||
| 208 : | sh002i | 654 | |
| 209 : | sh002i | 2438 | # Used for temporary storage of uploaded files. |
| 210 : | $webworkDirs{uploadCache} = "$webworkDirs{DATA}/uploads"; | ||
| 211 : | sh002i | 654 | |
| 212 : | sh002i | 2438 | # Location of utility programs. |
| 213 : | $webworkDirs{bin} = "$webworkDirs{root}/bin"; | ||
| 214 : | |||
| 215 : | # Location of configuration files, templates, snippets, etc. | ||
| 216 : | $webworkDirs{conf} = "$webworkDirs{root}/conf"; | ||
| 217 : | |||
| 218 : | sh002i | 3831 | # Location of theme templates. |
| 219 : | $webworkDirs{templates} = "$webworkDirs{conf}/templates"; | ||
| 220 : | |||
| 221 : | sh002i | 2438 | # Location of course directories. |
| 222 : | sh002i | 2491 | $webworkDirs{courses} = "$webwork_courses_dir" || "$webworkDirs{root}/courses"; |
| 223 : | sh002i | 2438 | |
| 224 : | # Contains log files. | ||
| 225 : | $webworkDirs{logs} = "$webworkDirs{root}/logs"; | ||
| 226 : | |||
| 227 : | # Contains non-web-accessible temporary files, such as TeX working directories. | ||
| 228 : | $webworkDirs{tmp} = "$webworkDirs{root}/tmp"; | ||
| 229 : | |||
| 230 : | dpvc | 3330 | # The (absolute) destinations of symbolic links that are OK for the FileManager to follow. |
| 231 : | # (any subdirectory of these is a valid target for a symbolic link.) | ||
| 232 : | # For example: | ||
| 233 : | # $webworkDirs{valid_symlinks} = ["$webworkDirs{courses}/modelCourse/templates","/ww2/common/sets"]; | ||
| 234 : | $webworkDirs{valid_symlinks} = []; | ||
| 235 : | |||
| 236 : | gage | 5572 | ################################################################################ |
| 237 : | sh002i | 2438 | ##### The following locations are web-accessible. |
| 238 : | gage | 5572 | ################################################################################ |
| 239 : | sh002i | 2438 | |
| 240 : | # The root URL (usually /webwork2), set by <Location> in Apache configuration. | ||
| 241 : | sh002i | 2491 | $webworkURLs{root} = "$webwork_url"; |
| 242 : | sh002i | 2438 | |
| 243 : | # Location of system-wide web-accessible files, such as equation images, and | ||
| 244 : | # help files. | ||
| 245 : | sh002i | 2491 | $webworkDirs{htdocs} = "$webwork_htdocs_dir" || "$webworkDirs{root}/htdocs"; |
| 246 : | $webworkURLs{htdocs} = "$webwork_htdocs_url"; | ||
| 247 : | sh002i | 2438 | |
| 248 : | # Location of web-accessible temporary files, such as equation images. | ||
| 249 : | $webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp"; | ||
| 250 : | $webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp"; | ||
| 251 : | |||
| 252 : | # Location of cached equation images. | ||
| 253 : | $webworkDirs{equationCache} = "$webworkDirs{htdocs_temp}/equations"; | ||
| 254 : | $webworkURLs{equationCache} = "$webworkURLs{htdocs_temp}/equations"; | ||
| 255 : | |||
| 256 : | # Contains context-sensitive help files. | ||
| 257 : | $webworkDirs{local_help} = "$webworkDirs{htdocs}/helpFiles"; | ||
| 258 : | $webworkURLs{local_help} = "$webworkURLs{htdocs}/helpFiles"; | ||
| 259 : | |||
| 260 : | # URL of general WeBWorK documentation. | ||
| 261 : | gage | 5572 | $webworkURLs{docs} = "http://webwork.maa.org"; |
| 262 : | sh002i | 2438 | |
| 263 : | # URL of WeBWorK Bugzilla database. | ||
| 264 : | apizer | 6267 | $webworkURLs{bugReporter} = "http://wwrk.maa.org/bugzilla3/enter_bug.cgi"; |
| 265 : | sh002i | 2438 | |
| 266 : | sh002i | 3124 | # Location of CSS |
| 267 : | gage | 5771 | # $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/${defaultTheme}.css"; |
| 268 : | # this is never used -- changing the theme from the config panel | ||
| 269 : | # doesn't appear to reset the theme in time? | ||
| 270 : | # It's better to refer directly to the .css file in the system.template | ||
| 271 : | # <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> | ||
| 272 : | sh002i | 3124 | |
| 273 : | sh002i | 2438 | # Location of jsMath script, used for the jsMath display mode. |
| 274 : | dpvc | 3538 | $webworkURLs{jsMath} = "$webworkURLs{htdocs}/jsMath/jsMath-ww.js"; |
| 275 : | sh002i | 2438 | |
| 276 : | # Location of ASCIIMathML script, used for the asciimath display mode. | ||
| 277 : | dpvc | 2441 | $webworkURLs{asciimath} = "$webworkURLs{htdocs}/ASCIIMathML/ASCIIMathML.js"; |
| 278 : | sh002i | 2438 | |
| 279 : | dpvc | 4386 | # Location of LaTeXMathML script, used for the LaTeXMathML display mode. |
| 280 : | $webworkURLs{LaTeXMathML} = "$webworkURLs{htdocs}/LaTeXMathML/LaTeXMathML.js"; | ||
| 281 : | |||
| 282 : | sh002i | 663 | ################################################################################ |
| 283 : | sh002i | 2438 | # Defaults for course-specific locations (directories and URLs) |
| 284 : | sh002i | 663 | ################################################################################ |
| 285 : | |||
| 286 : | sh002i | 2438 | # The root directory of the current course. (The ID of the current course is |
| 287 : | # available in $courseName.) | ||
| 288 : | $courseDirs{root} = "$webworkDirs{courses}/$courseName"; | ||
| 289 : | sh002i | 663 | |
| 290 : | sh002i | 4355 | # Location of course-specific data files. |
| 291 : | sh002i | 3967 | $courseDirs{DATA} = "$courseDirs{root}/DATA"; |
| 292 : | sh002i | 3965 | |
| 293 : | sh002i | 2438 | # Location of course HTML files, passed to PG. |
| 294 : | $courseDirs{html} = "$courseDirs{root}/html"; | ||
| 295 : | sh002i | 2491 | $courseURLs{html} = "$webwork_courses_url/$courseName"; |
| 296 : | sh002i | 2438 | |
| 297 : | # Location of course image files, passed to PG. | ||
| 298 : | $courseDirs{html_images} = "$courseDirs{html}/images"; | ||
| 299 : | |||
| 300 : | # Location of web-accessible, course-specific temporary files, like static and | ||
| 301 : | # dynamically-generated PG graphics. | ||
| 302 : | $courseDirs{html_temp} = "$courseDirs{html}/tmp"; | ||
| 303 : | $courseURLs{html_temp} = "$courseURLs{html}/tmp"; | ||
| 304 : | |||
| 305 : | # Location of course-specific logs, like the transaction log. | ||
| 306 : | $courseDirs{logs} = "$courseDirs{root}/logs"; | ||
| 307 : | |||
| 308 : | # Location of scoring files. | ||
| 309 : | $courseDirs{scoring} = "$courseDirs{root}/scoring"; | ||
| 310 : | |||
| 311 : | # Location of PG templates and set definition files. | ||
| 312 : | $courseDirs{templates} = "$courseDirs{root}/templates"; | ||
| 313 : | |||
| 314 : | # Location of course-specific macro files. | ||
| 315 : | $courseDirs{macros} = "$courseDirs{templates}/macros"; | ||
| 316 : | |||
| 317 : | # Location of mail-merge templates. | ||
| 318 : | $courseDirs{email} = "$courseDirs{templates}/email"; | ||
| 319 : | |||
| 320 : | gage | 3717 | # Location of temporary editing files. |
| 321 : | $courseDirs{tmpEditFileDir} = "$courseDirs{templates}/tmpEdit"; | ||
| 322 : | |||
| 323 : | sh002i | 4754 | |
| 324 : | sh002i | 4741 | # mail merge status directory |
| 325 : | $courseDirs{mailmerge} = "$courseDirs{DATA}/mailmerge"; | ||
| 326 : | sh002i | 4645 | |
| 327 : | sh002i | 2438 | ################################################################################ |
| 328 : | # System-wide files | ||
| 329 : | ################################################################################ | ||
| 330 : | |||
| 331 : | # Location of this file. | ||
| 332 : | $webworkFiles{environment} = "$webworkDirs{conf}/global.conf"; | ||
| 333 : | |||
| 334 : | # Flat-file database used to protect against MD5 hash collisions. TeX equations | ||
| 335 : | # are hashed to determine the name of the image file. There is a tiny chance of | ||
| 336 : | # a collision between two TeX strings. This file allows for that. However, this | ||
| 337 : | # is slow, so most people chose not to worry about it. Set this to "" if you | ||
| 338 : | # don't want to use the equation cache file. | ||
| 339 : | $webworkFiles{equationCacheDB} = ""; # "$webworkDirs{DATA}/equationcache"; | ||
| 340 : | |||
| 341 : | gage | 5572 | ################################################################################ |
| 342 : | # Hardcopy snippets are used in constructing a TeX file for hardcopy output. | ||
| 343 : | # They should contain TeX code unless otherwise noted. | ||
| 344 : | ################################################################################ | ||
| 345 : | sh002i | 2438 | # The preamble is the first thing in the TeX file. |
| 346 : | $webworkFiles{hardcopySnippets}{preamble} = "$webworkDirs{conf}/snippets/hardcopyPreamble.tex"; | ||
| 347 : | |||
| 348 : | # The setHeader preceeds each set. It is a PG file. | ||
| 349 : | gage | 2447 | $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg", |
| 350 : | sh002i | 2438 | |
| 351 : | # The problem divider goes between problems. | ||
| 352 : | $webworkFiles{hardcopySnippets}{problemDivider} = "$webworkDirs{conf}/snippets/hardcopyProblemDivider.tex"; | ||
| 353 : | |||
| 354 : | # The set footer goes after each set. Is is a PG file. | ||
| 355 : | $webworkFiles{hardcopySnippets}{setFooter} = "$webworkDirs{conf}/snippets/hardcopySetFooter.pg"; | ||
| 356 : | |||
| 357 : | # The set divider goes between sets (in multiset output). | ||
| 358 : | $webworkFiles{hardcopySnippets}{setDivider} = "$webworkDirs{conf}/snippets/hardcopySetDivider.tex"; | ||
| 359 : | |||
| 360 : | # The user divider does between users (in multiuser output). | ||
| 361 : | $webworkFiles{hardcopySnippets}{userDivider} = "$webworkDirs{conf}/snippets/hardcopyUserDivider.tex"; | ||
| 362 : | |||
| 363 : | # The postabmle is the last thing in the TeX file. | ||
| 364 : | $webworkFiles{hardcopySnippets}{postamble} = "$webworkDirs{conf}/snippets/hardcopyPostamble.tex"; | ||
| 365 : | |||
| 366 : | ##### Screen snippets are used when displaying problem sets on the screen. | ||
| 367 : | |||
| 368 : | # The set header is displayed on the problem set page. It is a PG file. | ||
| 369 : | gage | 2447 | $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" |
| 370 : | sh002i | 2438 | |
| 371 : | sh002i | 3124 | # A PG template for creation of new problems. |
| 372 : | gage | 5572 | $webworkFiles{screenSnippets}{blankProblem} = "$webworkDirs{conf}/snippets/blankProblem2.pg"; # screenSetHeader.pg" |
| 373 : | gage | 3069 | |
| 374 : | gage | 3237 | # A site info "message of the day" file |
| 375 : | sh002i | 3701 | $webworkFiles{site_info} = "$webworkDirs{htdocs}/site_info.txt"; |
| 376 : | sh002i | 3697 | |
| 377 : | sh002i | 2438 | ################################################################################ |
| 378 : | # Course-specific files | ||
| 379 : | ################################################################################ | ||
| 380 : | |||
| 381 : | # The course configuration file. | ||
| 382 : | $courseFiles{environment} = "$courseDirs{root}/course.conf"; | ||
| 383 : | |||
| 384 : | jj | 3681 | # The course simple configuration file (holds web-based configuratoin). |
| 385 : | $courseFiles{simpleConfig} = "$courseDirs{root}/simple.conf"; | ||
| 386 : | |||
| 387 : | sh002i | 2438 | # File contents are displayed after login, on the problem sets page. Path given |
| 388 : | # here is relative to the templates directory. | ||
| 389 : | $courseFiles{course_info} = "course_info.txt"; | ||
| 390 : | |||
| 391 : | # File contents are displayed on the login page. Path given here is relative to | ||
| 392 : | # the templates directory. | ||
| 393 : | $courseFiles{login_info} = "login_info.txt"; | ||
| 394 : | |||
| 395 : | # Additional library buttons can be added to the Library Browser (SetMaker.pm) | ||
| 396 : | # by adding the libraries you want to the following line. For each key=>value | ||
| 397 : | # in the list, if a directory (or link to a directory) with name 'key' appears | ||
| 398 : | # in the templates directory, then a button with name 'value' will be placed at | ||
| 399 : | # the top of the problem browser. (No button will appear if there is no | ||
| 400 : | # directory or link with the given name in the templates directory.) For | ||
| 401 : | # example, | ||
| 402 : | # | ||
| 403 : | # $courseFiles{problibs} = {rochester => "Rochester", asu => "ASU"}; | ||
| 404 : | # | ||
| 405 : | # would add two buttons, one for the Rochester library and one for the ASU | ||
| 406 : | sh002i | 2694 | # library, provided templates/rochester and templates/asu exists either as |
| 407 : | apizer | 5837 | # subdirectories or links to other directories. The "NPL Directory" button |
| 408 : | # activated below gives access to all the directories in the National | ||
| 409 : | # Problem Library. | ||
| 410 : | sh002i | 2438 | # |
| 411 : | sh002i | 2694 | $courseFiles{problibs} = { |
| 412 : | apizer | 5837 | Library => "NPL Directory", |
| 413 : | apizer | 6073 | # rochesterLibrary => "Rochester", |
| 414 : | # unionLibrary =>"Union", | ||
| 415 : | sh002i | 2694 | # asuLibrary => "Arizona State", |
| 416 : | # dcdsLibrary => "Detroit CDS", | ||
| 417 : | # dartmouthLibrary => "Dartmouth", | ||
| 418 : | # indianaLibrary => "Indiana", | ||
| 419 : | # osuLibrary => "Ohio State", | ||
| 420 : | sh002i | 2722 | # capaLibrary => "CAPA", |
| 421 : | sh002i | 2694 | }; |
| 422 : | dpvc | 2431 | |
| 423 : | sh002i | 2438 | ################################################################################ |
| 424 : | sh002i | 4579 | # Status system |
| 425 : | ################################################################################ | ||
| 426 : | |||
| 427 : | # This is the default status given to new students and students with invalid | ||
| 428 : | # or missing statuses. | ||
| 429 : | $default_status = "Enrolled"; | ||
| 430 : | |||
| 431 : | # The first abbreviation in the abbreviations list is the canonical | ||
| 432 : | # abbreviation, and will be used when setting the status value in a user record | ||
| 433 : | # or an exported classlist file. | ||
| 434 : | # | ||
| 435 : | # Results are undefined if more than one status has the same abbreviation. | ||
| 436 : | # | ||
| 437 : | # The four behaviors that are controlled by status are: | ||
| 438 : | # allow_course_access => is this user allowed to log in? | ||
| 439 : | # include_in_assignment => is this user included when assigning as set to "all" users? | ||
| 440 : | # include_in_stats => is this user included in statistical reports? | ||
| 441 : | # include_in_email => is this user included in emails sent to the class? | ||
| 442 : | # include_in_scoring => is this user included in score reports? | ||
| 443 : | |||
| 444 : | %statuses = ( | ||
| 445 : | Enrolled => { | ||
| 446 : | abbrevs => [qw/ C c current enrolled /], | ||
| 447 : | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email include_in_scoring /], | ||
| 448 : | }, | ||
| 449 : | Audit => { | ||
| 450 : | abbrevs => [qw/ A a audit /], | ||
| 451 : | behaviors => [qw/ allow_course_access include_in_assignment include_in_stats include_in_email /], | ||
| 452 : | }, | ||
| 453 : | Drop => { | ||
| 454 : | abbrevs => [qw/ D d drop withdraw /], | ||
| 455 : | behaviors => [qw/ /], | ||
| 456 : | }, | ||
| 457 : | glarose | 4923 | Proctor => { |
| 458 : | abbrevs => [qw/ P p proctor /], | ||
| 459 : | behaviors => [qw/ /], | ||
| 460 : | }, | ||
| 461 : | sh002i | 4579 | ); |
| 462 : | |||
| 463 : | ################################################################################ | ||
| 464 : | sh002i | 3645 | # Database options |
| 465 : | sh002i | 2508 | ################################################################################ |
| 466 : | |||
| 467 : | sh002i | 4072 | # these variables are used by database.conf. we define them here so that editing |
| 468 : | # database.conf isn't necessary. | ||
| 469 : | gage | 5932 | |
| 470 : | # required permissions | ||
| 471 : | # GRANT SELECT ON webwork.* TO webworkRead@localhost IDENTIFIED BY 'passwordRO'; | ||
| 472 : | gage | 6235 | # GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, INDEX, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'passwordRW'; |
| 473 : | gage | 5932 | |
| 474 : | sh002i | 4072 | $database_dsn = "dbi:mysql:webwork"; |
| 475 : | $database_username = "webworkWrite"; | ||
| 476 : | $database_password = ""; | ||
| 477 : | $database_debug = 0; | ||
| 478 : | |||
| 479 : | sh002i | 4075 | # Variables for sql_moodle database layout. |
| 480 : | $moodle_dsn = "dbi:mysql:moodle"; | ||
| 481 : | $moodle_username = $database_username; | ||
| 482 : | $moodle_password = $database_password; | ||
| 483 : | sh002i | 4579 | $moodle_table_prefix = "mdl_"; |
| 484 : | sh002i | 4740 | $moodle17 = 0; |
| 485 : | sh002i | 4075 | |
| 486 : | sh002i | 2508 | # Several database are defined in the file conf/database.conf and stored in the |
| 487 : | # hash %dbLayouts. | ||
| 488 : | include "conf/database.conf"; | ||
| 489 : | |||
| 490 : | # Select the default database layout. This can be overridden in the course.conf | ||
| 491 : | sh002i | 3822 | # file of a particular course. The only database layout supported in WW 2.1.4 |
| 492 : | # and up is "sql_single". | ||
| 493 : | $dbLayoutName = "sql_single"; | ||
| 494 : | sh002i | 2508 | |
| 495 : | # This sets the symbol "dbLayout" as an alias for the selected database layout. | ||
| 496 : | *dbLayout = $dbLayouts{$dbLayoutName}; | ||
| 497 : | |||
| 498 : | ################################################################################ | ||
| 499 : | # Problem library options | ||
| 500 : | ################################################################################ | ||
| 501 : | |||
| 502 : | sh002i | 4460 | # For configuration instructions, see: |
| 503 : | gage | 5932 | # http://webwork.maa.org/wiki/National_Problem_Library |
| 504 : | # The directory containing the natinal problem library files. Set to "" if no problem | ||
| 505 : | sh002i | 2508 | # library is installed. |
| 506 : | $problemLibrary{root} = ""; | ||
| 507 : | |||
| 508 : | jj | 3407 | # Problem Library version |
| 509 : | # Version 1 is in use. Version 2 will be released soon. | ||
| 510 : | sh002i | 4460 | $problemLibrary{version} = "2"; |
| 511 : | jj | 3407 | |
| 512 : | jj | 5235 | # Problem Library SQL database connection information |
| 513 : | $problemLibrary_db = { | ||
| 514 : | dbsource => $database_dsn, | ||
| 515 : | user => $database_username, | ||
| 516 : | passwd => $database_password, | ||
| 517 : | }; | ||
| 518 : | sh002i | 2508 | |
| 519 : | ################################################################################ | ||
| 520 : | sh002i | 2438 | # Logs |
| 521 : | ################################################################################ | ||
| 522 : | dpvc | 2431 | |
| 523 : | sh002i | 2438 | # FIXME: take logs out of %webworkFiles/%courseFiles and give them their own |
| 524 : | # top-level hash. | ||
| 525 : | sh002i | 705 | |
| 526 : | sh002i | 2438 | # Logs data about how long it takes to process problems. (Do not confuse this |
| 527 : | # with the /other/ timing log which can be set by WeBWorK::Timing and is used | ||
| 528 : | # for benchmarking system performance in general. At some point, this timing | ||
| 529 : | # mechanism will be deprecated in favor of the WeBWorK::Timing mechanism.) | ||
| 530 : | $webworkFiles{logs}{timing} = "$webworkDirs{logs}/timing.log"; | ||
| 531 : | sh002i | 654 | |
| 532 : | sh002i | 2831 | # Logs courses created via the web-based Course Administration module. |
| 533 : | $webworkFiles{logs}{hosted_courses} = "$webworkDirs{logs}/hosted_courses.log"; | ||
| 534 : | |||
| 535 : | sh002i | 2438 | # The transaction log contains data from each recorded answer submission. This |
| 536 : | # is useful if the database becomes corrupted. | ||
| 537 : | sh002i | 5615 | $webworkFiles{logs}{transaction} = "$webworkDirs{logs}/${courseName}_transaction.log"; |
| 538 : | sh002i | 2438 | |
| 539 : | # The answer log stores a history of all users' submitted answers. | ||
| 540 : | $courseFiles{logs}{answer_log} = "$courseDirs{logs}/answer_log"; | ||
| 541 : | |||
| 542 : | sh002i | 3365 | # Log logins. |
| 543 : | $courseFiles{logs}{login_log} = "$courseDirs{logs}/login.log"; | ||
| 544 : | |||
| 545 : | jj | 3583 | # Log for almost every click. By default it is the empty string, which |
| 546 : | # turns this log off. If you want it turned on, we suggest | ||
| 547 : | # "$courseDirs{logs}/activity.log" | ||
| 548 : | # When turned on, this log can get quite large. | ||
| 549 : | $courseFiles{logs}{activity_log} = ''; | ||
| 550 : | |||
| 551 : | sh002i | 654 | ################################################################################ |
| 552 : | sh002i | 2438 | # Site defaults (FIXME: what other things could be "site defaults"?) |
| 553 : | ################################################################################ | ||
| 554 : | |||
| 555 : | sh002i | 2857 | # Set the default timezone of courses on this server. To get a list of valid |
| 556 : | # timezones, run: | ||
| 557 : | sh002i | 2770 | # |
| 558 : | sh002i | 2857 | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::all_names' |
| 559 : | # | ||
| 560 : | # To get a list of valid timezone "links" (deprecated names), run: | ||
| 561 : | # | ||
| 562 : | # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' | ||
| 563 : | # | ||
| 564 : | gage | 6349 | # If left blank, the system timezone will be used. This is usually what you |
| 565 : | # want. You might want to set this if your server is NOT in the same timezone as | ||
| 566 : | sh002i | 2770 | # your school. If just a few courses are in a different timezone, set this in |
| 567 : | # course.conf for the affected courses instead. | ||
| 568 : | # | ||
| 569 : | gage | 6165 | $siteDefaults{timezone} = "America/New_York"; |
| 570 : | sh002i | 2770 | |
| 571 : | gage | 3436 | # The default_templates_course is used by default to create a new course. |
| 572 : | # The contents of the templates directory are copied from this course | ||
| 573 : | # to the new course being created. | ||
| 574 : | $siteDefaults{default_templates_course} ="modelCourse"; | ||
| 575 : | |||
| 576 : | sh002i | 2438 | ################################################################################ |
| 577 : | sh002i | 4075 | # Authentication system |
| 578 : | ################################################################################ | ||
| 579 : | |||
| 580 : | # FIXME This mechanism is a little awkward and probably should be merged with | ||
| 581 : | # the dblayout selection system somehow. | ||
| 582 : | |||
| 583 : | # Select the authentication module to use for normal logins. | ||
| 584 : | # | ||
| 585 : | # If this value is a string, the given authentication module will be used | ||
| 586 : | # regardless of the database layout. If it is a hash, the database layout name | ||
| 587 : | # will be looked up in the hash and the resulting value will be used as the | ||
| 588 : | # authentication module. The special hash key "*" is used if no entry for the | ||
| 589 : | # current database layout is found. | ||
| 590 : | # | ||
| 591 : | $authen{user_module} = { | ||
| 592 : | sql_moodle => "WeBWorK::Authen::Moodle", | ||
| 593 : | gage | 6165 | # sql_ldap => "WeBWorK::Authen::LDAP", |
| 594 : | sh002i | 4075 | "*" => "WeBWorK::Authen", |
| 595 : | }; | ||
| 596 : | |||
| 597 : | # Select the authentication module to use for proctor logins. | ||
| 598 : | # | ||
| 599 : | # A string or a hash is accepted, as above. | ||
| 600 : | # | ||
| 601 : | $authen{proctor_module} = "WeBWorK::Authen::Proctor"; | ||
| 602 : | |||
| 603 : | sh002i | 4485 | # Options for particular authentication modules |
| 604 : | |||
| 605 : | gage | 6165 | # $authen{moodle_options} = { |
| 606 : | # dsn => $moodle_dsn, | ||
| 607 : | # username => $moodle_username, | ||
| 608 : | # password => $moodle_password, | ||
| 609 : | # table_prefix => $moodle_table_prefix, | ||
| 610 : | # moodle17 => $moodle17, | ||
| 611 : | # }; | ||
| 612 : | sh002i | 4579 | |
| 613 : | sh002i | 4485 | $authen{ldap_options} = { |
| 614 : | apizer | 6148 | # hosts to attempt to connect to, in order. For example: |
| 615 : | sh002i | 4485 | # auth.myschool.edu -- uses LDAP scheme and port 389 |
| 616 : | # ldap://auth.myschool.edu:666 -- non-standard port | ||
| 617 : | # ldaps://auth.myschool.edu -- uses LDAPS scheme and port 636 | ||
| 618 : | # ldaps://auth.myschool.edu:389 -- SSL on non-SSL port | ||
| 619 : | apizer | 6148 | # Edit the host(s) below: |
| 620 : | sh002i | 4485 | net_ldap_hosts => [ |
| 621 : | apizer | 6148 | "ldaps://auth1.myschool.edu", |
| 622 : | "ldaps://auth2.myschool.edu", | ||
| 623 : | sh002i | 4485 | ], |
| 624 : | # connection options | ||
| 625 : | net_ldap_options => { | ||
| 626 : | timeout => 30, | ||
| 627 : | version => 3, | ||
| 628 : | }, | ||
| 629 : | # base to use when searching for user's DN | ||
| 630 : | apizer | 6148 | # Edit the data below: |
| 631 : | net_ldap_base => "ou=people,dc=myschool,dc=edu", | ||
| 632 : | mmhamric | 6144 | |
| 633 : | # Use a Bind account if set to 1 | ||
| 634 : | bindAccount => 0, | ||
| 635 : | |||
| 636 : | searchDN => "cn=search,DC=youredu,DC=edu", | ||
| 637 : | bindPassword => "password", | ||
| 638 : | |||
| 639 : | sh002i | 4485 | # If LDAP rejects password, check it against the WeBWorK password database |
| 640 : | failover => 1, | ||
| 641 : | }; | ||
| 642 : | |||
| 643 : | sh002i | 4075 | ################################################################################ |
| 644 : | sh002i | 1108 | # Authorization system |
| 645 : | ################################################################################ | ||
| 646 : | |||
| 647 : | sh002i | 3671 | # this section lets you define which groups of users can perform which actions. |
| 648 : | sh002i | 2438 | |
| 649 : | sh002i | 3671 | # this hash maps a numeric permission level to the name of a role. the number |
| 650 : | # assigned to a role is significant -- roles with higher numbers are considered | ||
| 651 : | # "more privileged", and are included when that role is listed for a privilege | ||
| 652 : | # below. | ||
| 653 : | # | ||
| 654 : | %userRoles = ( | ||
| 655 : | guest => -5, | ||
| 656 : | student => 0, | ||
| 657 : | glarose | 4923 | login_proctor => 2, |
| 658 : | grade_proctor => 3, | ||
| 659 : | sh002i | 3671 | ta => 5, |
| 660 : | professor => 10, | ||
| 661 : | ); | ||
| 662 : | sh002i | 2438 | |
| 663 : | sh002i | 3671 | # this hash maps operations to the roles that are allowed to perform those |
| 664 : | # operations. the role listed and any role with a higher permission level (in | ||
| 665 : | # the %userRoles hash) will be allowed to perform the operation. If the role | ||
| 666 : | # is undefined, no users will be allowed to perform the operation. | ||
| 667 : | # | ||
| 668 : | sh002i | 654 | %permissionLevels = ( |
| 669 : | sh002i | 3671 | login => "guest", |
| 670 : | report_bugs => "student", | ||
| 671 : | submit_feedback => "student", | ||
| 672 : | change_password => "student", | ||
| 673 : | change_email_address => "student", | ||
| 674 : | sh002i | 3691 | |
| 675 : | glarose | 4923 | proctor_quiz_login => "login_proctor", |
| 676 : | proctor_quiz_grade => "grade_proctor", | ||
| 677 : | glarose | 5435 | view_proctored_tests => "student", |
| 678 : | glarose | 4870 | view_hidden_work => "ta", |
| 679 : | sh002i | 2505 | |
| 680 : | sh002i | 3671 | view_multiple_sets => "ta", |
| 681 : | view_unopened_sets => "ta", | ||
| 682 : | view_unpublished_sets => "ta", | ||
| 683 : | view_answers => "ta", | ||
| 684 : | glarose | 4904 | view_ip_restricted_sets => "ta", |
| 685 : | sh002i | 2505 | |
| 686 : | sh002i | 3671 | become_student => "professor", |
| 687 : | access_instructor_tools => "ta", | ||
| 688 : | score_sets => "professor", | ||
| 689 : | send_mail => "professor", | ||
| 690 : | receive_feedback => "ta", | ||
| 691 : | sh002i | 2505 | |
| 692 : | sh002i | 3671 | create_and_delete_problem_sets => "professor", |
| 693 : | assign_problem_sets => "professor", | ||
| 694 : | modify_problem_sets => "professor", | ||
| 695 : | modify_student_data => "professor", | ||
| 696 : | modify_classlist_files => "professor", | ||
| 697 : | modify_set_def_files => "professor", | ||
| 698 : | modify_scoring_files => "professor", | ||
| 699 : | modify_problem_template_files => "professor", | ||
| 700 : | sh002i | 3675 | manage_course_files => "professor", |
| 701 : | sh002i | 2505 | |
| 702 : | sh002i | 3671 | create_and_delete_courses => "professor", |
| 703 : | fix_course_databases => "professor", | ||
| 704 : | sh002i | 2505 | |
| 705 : | ##### Behavior of the interactive problem processor ##### | ||
| 706 : | |||
| 707 : | sh002i | 3671 | show_correct_answers_before_answer_date => "ta", |
| 708 : | show_solutions_before_answer_date => "ta", | ||
| 709 : | avoid_recording_answers => "ta", | ||
| 710 : | jj | 3580 | # Below this level, old answers are never initially shown |
| 711 : | sh002i | 3671 | can_show_old_answers_by_default => "student", |
| 712 : | jj | 3580 | # at this level, we look at showOldAnswers for default value |
| 713 : | # even after the due date | ||
| 714 : | sh002i | 3671 | can_always_use_show_old_answers_default => "professor", |
| 715 : | check_answers_before_open_date => "ta", | ||
| 716 : | check_answers_after_open_date_with_attempts => "ta", | ||
| 717 : | check_answers_after_open_date_without_attempts => "guest", | ||
| 718 : | check_answers_after_due_date => "guest", | ||
| 719 : | check_answers_after_answer_date => "guest", | ||
| 720 : | glarose | 5721 | create_new_set_version_when_acting_as_student => undef, |
| 721 : | gage | 5854 | print_path_to_problem => "professor", # see "Special" PG environment variables |
| 722 : | glarose | 5721 | record_set_version_answers_when_acting_as_student => undef, |
| 723 : | sh002i | 3671 | record_answers_when_acting_as_student => undef, |
| 724 : | sh002i | 2505 | # "record_answers_when_acting_as_student" takes precedence |
| 725 : | # over the following for professors acting as students: | ||
| 726 : | sh002i | 3671 | record_answers_before_open_date => undef, |
| 727 : | record_answers_after_open_date_with_attempts => "student", | ||
| 728 : | record_answers_after_open_date_without_attempts => undef, | ||
| 729 : | record_answers_after_due_date => undef, | ||
| 730 : | record_answers_after_answer_date => undef, | ||
| 731 : | dont_log_past_answers => "professor", | ||
| 732 : | sh002i | 3795 | # does the user get to see a dump of the problem? |
| 733 : | view_problem_debugging_info => "ta", | ||
| 734 : | sh002i | 2764 | |
| 735 : | ##### Behavior of the Hardcopy Processor ##### | ||
| 736 : | |||
| 737 : | sh002i | 3671 | download_hardcopy_multiuser => "ta", |
| 738 : | download_hardcopy_multiset => "ta", | ||
| 739 : | gage | 6113 | download_hardcopy_view_errors =>"professor", |
| 740 : | sh002i | 3671 | download_hardcopy_format_pdf => "guest", |
| 741 : | download_hardcopy_format_tex => "ta", | ||
| 742 : | sh002i | 654 | ); |
| 743 : | |||
| 744 : | sh002i | 3707 | # This is the default permission level given to new students and students with |
| 745 : | # invalid or missing permission levels. | ||
| 746 : | $default_permission_level = $userRoles{student}; | ||
| 747 : | |||
| 748 : | sh002i | 1108 | ################################################################################ |
| 749 : | # Session options | ||
| 750 : | ################################################################################ | ||
| 751 : | |||
| 752 : | sh002i | 768 | # $sessionKeyTimeout defines seconds of inactivity before a key expires |
| 753 : | $sessionKeyTimeout = 60*30; | ||
| 754 : | |||
| 755 : | sh002i | 811 | # $sessionKeyLength defines the length (in characters) of the session key |
| 756 : | sh002i | 4073 | $sessionKeyLength = 32; |
| 757 : | sh002i | 811 | |
| 758 : | # @sessionKeyChars lists the legal session key characters | ||
| 759 : | sh002i | 4073 | @sessionKeyChars = ('A'..'Z', 'a'..'z', '0'..'9'); |
| 760 : | sh002i | 811 | |
| 761 : | sh002i | 768 | # Practice users are users who's names start with $practiceUser |
| 762 : | # (you can comment this out to remove practice user support) | ||
| 763 : | $practiceUserPrefix = "practice"; | ||
| 764 : | |||
| 765 : | # There is a practice user who can be logged in multiple times. He's | ||
| 766 : | # commented out by default, though, so you don't hurt yourself. It is | ||
| 767 : | # kindof a backdoor to the practice user system, since he doesn't have a | ||
| 768 : | # password. Come to think of it, why do we even have this?! | ||
| 769 : | #$debugPracticeUser = "practice666"; | ||
| 770 : | |||
| 771 : | glarose | 3839 | # Option for gateway tests; $gatewayGracePeriod is the time in seconds |
| 772 : | # after the official due date during which we'll still grade the test | ||
| 773 : | glarose | 3846 | $gatewayGracePeriod = 120; |
| 774 : | glarose | 3839 | |
| 775 : | sh002i | 663 | ################################################################################ |
| 776 : | sh002i | 2438 | # PG subsystem options |
| 777 : | sh002i | 663 | ################################################################################ |
| 778 : | sh002i | 654 | |
| 779 : | sh002i | 2438 | # List of enabled display modes. Comment out any modes you don't wish to make |
| 780 : | # available for use. | ||
| 781 : | $pg{displayModes} = [ | ||
| 782 : | gage | 6349 | # "plainText", # display raw TeX for math expressions |
| 783 : | sh002i | 2438 | "formattedText", # format math expressions using TtH |
| 784 : | "images", # display math expressions as images generated by dvipng | ||
| 785 : | "jsMath", # render TeX math expressions on the client side using jsMath | ||
| 786 : | gage | 6349 | # "asciimath", # render TeX math expressions on the client side using ASCIIMathML |
| 787 : | dpvc | 4386 | "LaTeXMathML", # render TeX math expressions on the client side using LaTeXMathML |
| 788 : | sh002i | 2438 | ]; |
| 789 : | |||
| 790 : | #### Default settings for the PG translator | ||
| 791 : | |||
| 792 : | # Default display mode. Should be listed above. | ||
| 793 : | $pg{options}{displayMode} = "images"; | ||
| 794 : | gage | 6349 | #$pg{options}{displayMode} = "jsMath"; |
| 795 : | sh002i | 2438 | |
| 796 : | # The default grader to use, if a problem doesn't specify. | ||
| 797 : | $pg{options}{grader} = "avg_problem_grader"; | ||
| 798 : | |||
| 799 : | # Fill in answer blanks with the student's last answer by default? | ||
| 800 : | $pg{options}{showOldAnswers} = 1; | ||
| 801 : | |||
| 802 : | # Show correct answers (when allowed) by default? | ||
| 803 : | $pg{options}{showCorrectAnswers} = 0; | ||
| 804 : | |||
| 805 : | # Show hints (when allowed) by default? | ||
| 806 : | $pg{options}{showHints} = 0; | ||
| 807 : | |||
| 808 : | # Show solutions (when allowed) by default? | ||
| 809 : | $pg{options}{showSolutions} = 0; | ||
| 810 : | |||
| 811 : | # Catch translation warnings internally by default? (We no longer need to do | ||
| 812 : | # this, since there is a global warnings handler. So this should be off.) | ||
| 813 : | $pg{options}{catchWarnings} = 0; | ||
| 814 : | |||
| 815 : | ##### Currently-selected renderer | ||
| 816 : | |||
| 817 : | # Only the local renderer is supported in this version. | ||
| 818 : | $pg{renderer} = "WeBWorK::PG::Local"; | ||
| 819 : | |||
| 820 : | # The remote renderer connects to an XML-RPC PG rendering server. | ||
| 821 : | sh002i | 2940 | #$pg{renderer} = "WeBWorK::PG::Remote"; |
| 822 : | sh002i | 2438 | |
| 823 : | ##### Renderer-dependent options | ||
| 824 : | |||
| 825 : | # The remote renderer has one option: | ||
| 826 : | $pg{renderers}{"WeBWorK::PG::Remote"} = { | ||
| 827 : | # The "proxy" server to connect to for remote rendering. | ||
| 828 : | proxy => "http://localhost:21000/RenderD", | ||
| 829 : | }; | ||
| 830 : | |||
| 831 : | ##### Settings for various display modes | ||
| 832 : | |||
| 833 : | # "images" mode has several settings: | ||
| 834 : | $pg{displayModeOptions}{images} = { | ||
| 835 : | # Determines the method used to align images in output. Can be | ||
| 836 : | # "baseline", "absmiddle", or "mysql". | ||
| 837 : | sh002i | 4368 | dvipng_align => 'mysql', |
| 838 : | sh002i | 2438 | |
| 839 : | sh002i | 4368 | # If mysql is chosen, this information indicates which database contains the |
| 840 : | # 'depths' table. Since 2.3.0, the depths table is kept in the main webwork | ||
| 841 : | # database. (If you are upgrading from an earlier version of webwork, and | ||
| 842 : | # used the mysql method in the past, you should move your existing 'depths' | ||
| 843 : | # table to the main database.) | ||
| 844 : | sh002i | 2438 | dvipng_depth_db => { |
| 845 : | sh002i | 4368 | dbsource => $database_dsn, |
| 846 : | user => $database_username, | ||
| 847 : | passwd => $database_password, | ||
| 848 : | sh002i | 2192 | }, |
| 849 : | sh002i | 2438 | }; |
| 850 : | jj | 2413 | |
| 851 : | dpvc | 2983 | $pg{displayModeOptions}{jsMath} = { |
| 852 : | dpvc | 3538 | reportMissingFonts => 0, # set to 1 to allow the missing font message |
| 853 : | missingFontMessage => undef, # set to an HTML string to replace the missing font message | ||
| 854 : | noImageFonts => 0, # set to 1 if you didn't install the jsMath image fonts | ||
| 855 : | dpvc | 3764 | processDoubleClicks => 1, # set to 0 to disable double-click on math to get TeX source |
| 856 : | dpvc | 2983 | }; |
| 857 : | |||
| 858 : | sh002i | 2438 | ##### Directories used by PG |
| 859 : | jj | 2413 | |
| 860 : | sh002i | 5277 | # The root of the PG directory tree (from pg_root in Apache config). |
| 861 : | $pg{directories}{root} = "$pg_dir"; | ||
| 862 : | sh002i | 2438 | $pg{directories}{lib} = "$pg{directories}{root}/lib"; |
| 863 : | $pg{directories}{macros} = "$pg{directories}{root}/macros"; | ||
| 864 : | jj | 2417 | |
| 865 : | dpvc | 3224 | # |
| 866 : | # The macro file search path. Each directory in this list is seached | ||
| 867 : | # (in this order) by loadMacros() when it looks for a .pl file. | ||
| 868 : | # | ||
| 869 : | $pg{directories}{macrosPath} = [ | ||
| 870 : | ".", # search the problem file's directory | ||
| 871 : | $courseDirs{macros}, | ||
| 872 : | $pg{directories}{macros}, | ||
| 873 : | gage | 5932 | "$courseDirs{templates}/Library/macros/Union", |
| 874 : | apizer | 6142 | "$courseDirs{templates}/Library/macros/Michigan", |
| 875 : | "$courseDirs{templates}/Library/macros/CollegeOfIdaho", | ||
| 876 : | apizer | 6258 | "$courseDirs{templates}/Library/macros/FortLewis", |
| 877 : | apizer | 6142 | "$courseDirs{templates}/Library/macros/TCNJ", |
| 878 : | gage | 5932 | "$courseDirs{templates}/Library/macros/NAU", |
| 879 : | apizer | 6142 | "$courseDirs{templates}/Library/macros/Dartmouth", |
| 880 : | dpvc | 3224 | ]; |
| 881 : | |||
| 882 : | sh002i | 4378 | # The applet search path. If a full URL is given, it is used unmodified. If an |
| 883 : | # absolute path is given, the URL of the local server is prepended to it. | ||
| 884 : | # | ||
| 885 : | # For example, if an item is "/math/applets", | ||
| 886 : | # and the local server is "https://math.yourschool.edu", | ||
| 887 : | # then the URL "https://math.yourschool.edu/math/applets" will be used. | ||
| 888 : | # | ||
| 889 : | gage | 5932 | |
| 890 : | gage | 4104 | $pg{directories}{appletPath} = [ # paths to search for applets (requires full url) |
| 891 : | sh002i | 4378 | "$webworkURLs{htdocs}/applets", |
| 892 : | "$courseURLs{html}/applets", | ||
| 893 : | gage | 4104 | ]; |
| 894 : | |||
| 895 : | sh002i | 2438 | ##### "Special" PG environment variables. (Stuff that doesn't fit in anywhere else.) |
| 896 : | jj | 2417 | |
| 897 : | sh002i | 2438 | # Users for whom to print the file name of the PG file being processed. |
| 898 : | gage | 5854 | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_FOR} = [ "professor", ]; |
| 899 : | # ie file paths are printed for 'gage' | ||
| 900 : | $pg{specialPGEnvironmentVars}{PRINT_FILE_NAMES_PERMISSION_LEVEL} = $userRoles{ $permissionLevels{print_path_to_problem} }; | ||
| 901 : | # (file paths are also printed for anyone with this permission or higher) | ||
| 902 : | jj | 2417 | |
| 903 : | sh002i | 2438 | # Locations of CAPA resources. (Only necessary if you need to use converted CAPA |
| 904 : | # problems.) | ||
| 905 : | apizer | 6265 | $pg{specialPGEnvironmentVars}{CAPA_Tools} = "/opt/webwork/CAPA/CAPA_Tools/", |
| 906 : | $pg{specialPGEnvironmentVars}{CAPA_MCTools} = "/opt/webwork/CAPA/CAPA_MCTools/", | ||
| 907 : | $pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$webworkDirs{htdocs}/CAPA_Graphics/", | ||
| 908 : | $pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$webworkURLs{htdocs}/CAPA_Graphics/", | ||
| 909 : | sh002i | 2438 | |
| 910 : | # Size in pixels of dynamically-generated images, i.e. graphs. | ||
| 911 : | $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, | ||
| 912 : | jj | 3571 | |
| 913 : | sh002i | 3809 | # To disable the Parser-based versions of num_cmp and fun_cmp, and use the |
| 914 : | # original versions instead, set this value to 1. | ||
| 915 : | $pg{specialPGEnvironmentVars}{useOldAnswerMacros} = 0; | ||
| 916 : | sh002i | 2438 | |
| 917 : | jj | 3552 | # Strings to insert at the start and end of the body of a problem |
| 918 : | # (at beginproblem() and ENDDOCUMENT) in various modes. More display modes | ||
| 919 : | # can be added if different behaviours are desired (e.g., HTML_dpng, | ||
| 920 : | # HTML_asciimath, etc.). These parts are not used in the Library browser. | ||
| 921 : | |||
| 922 : | $pg{specialPGEnvironmentVars}{problemPreamble} = { TeX => '', HTML=> '' }; | ||
| 923 : | $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' }; | ||
| 924 : | |||
| 925 : | # To have the problem body indented and boxed, uncomment: | ||
| 926 : | |||
| 927 : | # $pg{specialPGEnvironmentVars}{problemPreamble}{HTML} = '<BLOCKQUOTE> | ||
| 928 : | # <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=15 BGCOLOR=#E8E8E8><TR><TD>'; | ||
| 929 : | # $pg{specialPGEnvironmentVars}{problemPostamble}{HTML} = '</TD></TR></TABLE> | ||
| 930 : | # </BLOCKQUOTE>'; | ||
| 931 : | |||
| 932 : | sh002i | 2438 | ##### PG modules to load |
| 933 : | |||
| 934 : | # The first item of each list is the module to load. The remaining items are | ||
| 935 : | # additional packages to import. | ||
| 936 : | |||
| 937 : | ${pg}{modules} = [ | ||
| 938 : | [qw(DynaLoader)], | ||
| 939 : | [qw(Exporter)], | ||
| 940 : | [qw(GD)], | ||
| 941 : | |||
| 942 : | gage | 3211 | [qw(AlgParser AlgParserWithImplicitExpand Expr ExprWithImplicitExpand utf8)], |
| 943 : | sh002i | 2438 | [qw(AnswerHash AnswerEvaluator)], |
| 944 : | [qw(WWPlot)], # required by Circle (and others) | ||
| 945 : | [qw(Circle)], | ||
| 946 : | [qw(Complex)], | ||
| 947 : | [qw(Complex1)], | ||
| 948 : | [qw(Distributions)], | ||
| 949 : | [qw(Fraction)], | ||
| 950 : | [qw(Fun)], | ||
| 951 : | [qw(Hermite)], | ||
| 952 : | [qw(Label)], | ||
| 953 : | gage | 6349 | [qw(ChoiceList)], |
| 954 : | sh002i | 2438 | [qw(Match)], |
| 955 : | [qw(MatrixReal1)], # required by Matrix | ||
| 956 : | [qw(Matrix)], | ||
| 957 : | [qw(Multiple)], | ||
| 958 : | [qw(PGrandom)], | ||
| 959 : | [qw(Regression)], | ||
| 960 : | [qw(Select)], | ||
| 961 : | [qw(Units)], | ||
| 962 : | [qw(VectorField)], | ||
| 963 : | dpvc | 5397 | [qw(Parser Value)], |
| 964 : | jj | 3571 | [qw(Parser::Legacy)], |
| 965 : | gage | 5572 | # [qw(SaveFile)], |
| 966 : | gage | 5932 | # [qw(Chromatic)], # for Northern Arizona graph problems |
| 967 : | # # -- follow instructions at libraries/nau_problib/lib/README to install | ||
| 968 : | gage | 6349 | [qw(Applet FlashApplet JavaApplet CanvasApplet)], |
| 969 : | gage | 6235 | [qw(PGcore PGalias PGresource PGloadfiles PGanswergroup PGresponsegroup Tie::IxHash)], |
| 970 : | sh002i | 2438 | ]; |
| 971 : | |||
| 972 : | apizer | 6096 | ##### Problem creation defaults |
| 973 : | |||
| 974 : | # The default weight (also called value) of a problem to use when using the | ||
| 975 : | # Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set | ||
| 976 : | # or when this value is left blank in an imported set definition file. | ||
| 977 : | $problemDefaults{value} = 1; | ||
| 978 : | |||
| 979 : | # The default max_attempts for a problem to use when using the | ||
| 980 : | # Library Browser, Problem Editor or Hmwk Sets Editor to add problems to a set | ||
| 981 : | # or when this value is left blank in an imported set definition file. Note that | ||
| 982 : | # setting this to -1 gives students unlimited attempts. | ||
| 983 : | $problemDefaults{max_attempts} = -1; | ||
| 984 : | |||
| 985 : | sh002i | 2438 | ##### Answer evaluatior defaults |
| 986 : | |||
| 987 : | $pg{ansEvalDefaults} = { | ||
| 988 : | functAbsTolDefault => .001, | ||
| 989 : | functLLimitDefault => .0000001, | ||
| 990 : | functMaxConstantOfIntegration => 1E8, | ||
| 991 : | functNumOfPoints => 3, | ||
| 992 : | functRelPercentTolDefault => .1, | ||
| 993 : | functULimitDefault => .9999999, | ||
| 994 : | functVarDefault => "x", | ||
| 995 : | functZeroLevelDefault => 1E-14, | ||
| 996 : | functZeroLevelTolDefault => 1E-12, | ||
| 997 : | numAbsTolDefault => .001, | ||
| 998 : | numFormatDefault => "", | ||
| 999 : | numRelPercentTolDefault => .1, | ||
| 1000 : | numZeroLevelDefault => 1E-14, | ||
| 1001 : | numZeroLevelTolDefault => 1E-12, | ||
| 1002 : | useBaseTenLog => 0, | ||
| 1003 : | defaultDisplayMatrixStyle => "[s]", | ||
| 1004 : | apizer | 6196 | reducedScoringPeriod => 0, # Length of Reduced Credit Period (formally Reduced Scoring Period) in minutes |
| 1005 : | gage | 6165 | reducedScoringValue => 1, # A number in [0,1]. Students will be informed of the value as a percentage |
| 1006 : | sh002i | 2438 | }; |
| 1007 : | sh002i | 2491 | |
| 1008 : | ################################################################################ | ||
| 1009 : | # Compatibility | ||
| 1010 : | ################################################################################ | ||
| 1011 : | |||
| 1012 : | # Define the old names for the various "root" variables. | ||
| 1013 : | $webworkRoot = $webworkDirs{root}; | ||
| 1014 : | $webworkURLRoot = $webworkURLs{root}; | ||
| 1015 : | $pgRoot = $pg{directories}{root}; | ||
| 1016 : | sh002i | 5213 |
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |