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