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