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