Parent Directory
|
Revision Log
reverting to 1.40 -- accidental commit
1 ################################################################################ 2 # WeBWorK Online Homework Delivery System 3 # Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 4 # $CVSHeader: webwork2/lib/WeBWorK/Constants.pm,v 1.40 2006/01/29 20:50:37 jj Exp $ 5 # 6 # This program is free software; you can redistribute it and/or modify it under 7 # the terms of either: (a) the GNU General Public License as published by the 8 # Free Software Foundation; either version 2, or (at your option) any later 9 # version, or (b) the "Artistic License" which comes with this package. 10 # 11 # This program is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the 14 # Artistic License for more details. 15 ################################################################################ 16 17 package WeBWorK::Constants; 18 19 =head1 NAME 20 21 WeBWorK::Constants - provide constant values for other WeBWorK modules. 22 23 =cut 24 25 use strict; 26 use warnings; 27 28 ################################################################################ 29 # WeBWorK::Debug 30 ################################################################################ 31 32 # If true, WeBWorK::Debug will print debugging output. 33 # 34 $WeBWorK::Debug::Enabled = 0; 35 36 # If non-empty, debugging output will be sent to the file named rather than STDERR. 37 # 38 $WeBWorK::Debug::Logfile = ""; 39 40 # If defined, prevent subroutines matching the following regular expression from 41 # logging. 42 # 43 # For example, this pattern prevents the dispatch() function from logging: 44 # $WeBWorK::Debug::DenySubroutineOutput = qr/^WeBWorK::dispatch$/; 45 # 46 $WeBWorK::Debug::DenySubroutineOutput = undef; 47 48 # If defined, allow only subroutines matching the following regular expression 49 # to log. 50 # 51 # For example, this pattern allow only some function being worked on to log: 52 # $WeBWorK::Debug::AllowSubroutineOutput = qr/^WeBWorK::SomePkg::myFunc$/; 53 # 54 $WeBWorK::Debug::AllowSubroutineOutput = undef; 55 56 ################################################################################ 57 # WeBWorK::ContentGenerator::Hardcopy 58 ################################################################################ 59 60 # If true, don't delete temporary files 61 # 62 $WeBWorK::ContentGenerator::Hardcopy::PreserveTempFiles = 0; 63 64 ################################################################################ 65 # WeBWorK::PG::Local 66 ################################################################################ 67 # The maximum amount of time (in seconds) to work on a single problem. 68 # At the end of this time a timeout message is sent to the browser. 69 70 $WeBWorK::PG::Local::TIMEOUT = 60; 71 72 ################################################################################ 73 # WeBWorK::PG::ImageGenerator 74 ################################################################################ 75 76 # Arguments to pass to dvipng. This is dependant on the version of dvipng. 77 # 78 # For dvipng versions 0.x 79 # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-x4000.5 -bgTransparent -Q6 -mode toshiba -D180"; 80 # For dvipng versions 1.0 to 1.5 81 # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgTransparent -D120 -q -depth"; 82 # 83 # For dvipng versions 1.6 (and probably above) 84 # $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgtransparent -D120 -q -depth"; 85 # Note: In 1.6 and later, bgTransparent gives alpha-channel transparency while 86 # bgtransparent gives single-bit transparency. If you use alpha-channel transparency, 87 # the images will not be viewable with MSIE. bgtransparent works for version 1.5, 88 # but does not give transparent backgrounds. It does not work for version 1.2. It has not 89 # been tested with other versions. 90 # 91 $WeBWorK::PG::ImageGenerator::DvipngArgs = "-bgTransparent -D120 -q -depth"; 92 93 # If true, don't delete temporary files 94 # 95 $WeBWorK::PG::ImageGenerator::PreserveTempFiles = 0; 96 97 # TeX to prepend to equations to be processed. 98 # 99 $WeBWorK::PG::ImageGenerator::TexPreamble = <<'EOF'; 100 \documentclass[12pt]{article} 101 \nonstopmode 102 \usepackage{amsmath,amsfonts,amssymb} 103 \def\gt{>} 104 \def\lt{<} 105 \usepackage[active,textmath,displaymath]{preview} 106 \begin{document} 107 EOF 108 109 # TeX to append to equations to be processed. 110 # 111 $WeBWorK::PG::ImageGenerator::TexPostamble = <<'EOF'; 112 \end{document} 113 EOF 114 115 ################################################################################ 116 # WeBWorK::ContentGenerator::Instructor::Config 117 ################################################################################ 118 119 # Configuation data 120 # It is organized by section. The allowable types are 121 # 'text' for a text string (no quote marks allowed), 122 # 'number' for a number, 123 # 'list' for a list of text strings, 124 # 'permission' for a permission value, 125 # 'boolean' for variables which really hold 0/1 values as flags. 126 # 'checkboxlist' for variables which really hold a list of values which 127 # can be independently picked yes/no as checkboxes 128 129 $WeBWorK::ContentGenerator::Instructor::Config::ConfigValues = [ 130 ['General', 131 { var => 'courseFiles{course_info}', 132 doc => 'Name of course information file', 133 doc2 => 'The name of course information file (located in the templates directory). Its contents are displayed in the right panel next to the list of homework sets.', 134 type => 'text'}, 135 { var => 'defaultTheme', 136 doc => 'Theme (refresh page after saving changes to reveal new theme)', 137 doc2 => 'There are currently two themes (or skins) to choose from: ur and math. The theme specifies a unified look and feel for the WeBWorK course web pages.', 138 values => [qw(math ur)], 139 type => 'popuplist'}, 140 { var => 'sessionKeyTimeout', 141 doc => 'Inactivity time before a user is required to login again', 142 doc2 => 'Length of time, in seconds, a user has to be inactive before he is required to login again.<p> This value should be entered as a number, so as 3600 instead of 60*60 for one hour', 143 type => 'number'}], 144 ['Permissions', 145 { var => 'permissionLevels{login}', 146 doc => 'Allowed to login to the course', 147 type => 'permission'}, 148 { var => 'permissionLevels{change_password}', 149 doc => 'Allowed to change their password', 150 doc2 => 'Users at this level and higher are allowed to change their password. Normally guest users are not allowed to change their password.', 151 type => 'permission'}, 152 { var => 'permissionLevels{become_student}', 153 doc => 'Allowed to <em>act as</em> another user', 154 type => 'permission'}, 155 { var => 'permissionLevels{submit_feedback}', 156 doc => 'Can e-mail instructor', 157 doc2 => 'Only this permission level and higher get buttons for sending e-mail to the instructor.', 158 type => 'permission'}, 159 { var => 'permissionLevels{record_answers_when_acting_as_student}', 160 doc => 'Can submit answers for a student', 161 doc2 => 'When acting as a student, this permission level and higher can submit answers for that student.', 162 type => 'permission'}, 163 { var => 'permissionLevels{report_bugs}', 164 doc => 'Can report bugs', 165 doc2 => 'Users with at least this permission level get a link in the left panel for reporting bugs to the bug tracking system in Rochester', 166 type => 'permission'}, 167 { var => 'permissionLevels{change_email_address}', 168 doc => 'Allowed to change their e-mail address', 169 doc2 => 'Users at this level and higher are allowed to change their e-mail address. Normally guest users are not allowed to change the e-mail address since it does not make sense to send e-mail to anonymous accounts.', 170 type => 'permission'}, 171 { var => 'permissionLevels{view_answers}', 172 doc => 'Allowed to view past answers', 173 doc2 => 'These users and higher get the "Show Past Answers" button on the problem page.', 174 type => 'permission'}, 175 { var => 'permissionLevels{view_unopened_sets}', 176 doc => 'Allowed to view problems in sets which are not open yet', 177 type => 'permission'}, 178 { var => 'permissionLevels{show_correct_answers_before_answer_date}', 179 doc => 'Allowed to see the correct answers before the answer date', 180 type => 'permission'}, 181 { var => 'permissionLevels{show_solutions_before_answer_date}', 182 doc => 'Allowed to see solutions before the answer date', 183 type => 'permission'}, 184 { var => 'permissionLevels{can_show_old_answers_by_default}', 185 doc => 'Can show old answers by default', 186 doc2 => 'When viewing a problem, WeBWorK usually puts the previously submitted answer in the answer blank if it is before the due date. Below this level, old answers are never initially shown. Typically, that is the desired behaviour for guest accounts.', 187 type => 'permission'}, 188 { var => 'permissionLevels{can_always_use_show_old_answers_default}', 189 doc => 'Can always show old answers by default', 190 doc2 => 'When viewing a problem, WeBWorK usually puts the previously submitted answer in the answer blank if it is before the due date. At this level and higher, old answers are always shown (independent of the answer date).', 191 type => 'permission'}, 192 ], 193 ['PG - Problem Display/Answer Checking', 194 { var => 'pg{displayModes}', 195 doc => 'List of display modes made available to students', 196 doc2 => 'When viewing a problem, users may choose different methods of rendering 197 formulas via an options box in the left panel. Here, you can adjust what display modes are 198 listed.<p> 199 Some display modes require other software to be installed on the server. Be sure to check 200 that all display modes selected here work from your server.<p> 201 The display modes are <ul> 202 <li> plainText: shows the raw LaTeX strings for formulas. 203 <li> formattedText: formulas are passed through the external program <code>tth</code>, 204 which produces an HTML version of them. Some browsers do not display all of the fonts 205 properly. 206 <li> images: produces images using the external programs LaTeX and dvipng. 207 <li> jsMath: uses javascript to place symbols, which may come from fonts or images 208 (the choice is configurable by the end user). 209 <li> asciimath: renders formulas client side using ASCIIMathML 210 </ul> 211 <p> 212 You must use at least one display mode. If you select only one, then the options box will 213 not give a choice of modes (since there will only be one active).', 214 min => 1, 215 values => ["plainText", "formattedText", "images", "jsMath", "asciimath"], 216 type => 'checkboxlist'}, 217 218 { var => 'pg{options}{displayMode} ', 219 doc => 'The default display mode', 220 doc2 => 'Enter one of the allowed display mode types above. See \'display modes entry\' for descriptions.', 221 min => 1, 222 type => 'text'}, 223 224 { var => 'pg{ansEvalDefaults}{useBaseTenLog}', 225 doc => 'Use log base 10 instead of base <i>e</i>', 226 doc2 => 'Set to true for log to mean base 10 log and false for log to mean natural logarithm', 227 type => 'boolean'}, 228 229 { var => 'pg{ansEvalDefaults}{useOldAnswerMacros}', 230 doc => 'Use older answer checkers', 231 doc2 => 'During summer 2005, a newer version of the answer checkers was implemented for answers which are functions and numbers. The newer checkers allow more functions in student answers, and behave better in certain cases. Some problems are specifically coded to use new (or old) answer checkers. However, for the bulk of the problems, you can choose what the default will be here. <p>Choosing <i>false</i> here means that the newer answer checkers will be used by default, and choosing <i>true</i> means that the old answer checkers will be used by default.', 232 type => 'boolean'}, 233 234 { var => 'pg{ansEvalDefaults}{defaultDisplayMatrixStyle}', 235 doc => 'Control string for displaying matricies', 236 doc2 => 'String of three characters for defining the defaults for displaying matricies. The first and last characters give the left and right delimiters of the matrix, so usually one of ([| for a left delimiter, and one of )]| for the right delimiter. It is also legal to specify "." for no delimiter. <p> The middle character indicates how to display vertical lines in a matrix (e.g., for an augmented matrix). This can be s for solid lines and d for dashed lines. While you can specify the defaults, individual problems may override these values.', 237 type => 'text'}, 238 239 { var => 'pg{ansEvalDefaults}{numRelPercentTolDefault}', 240 doc => 'Allowed error, as a percentage, for numerical comparisons', 241 doc2 => "When numerical answers are checked, most test if the student's answer 242 is close enough to the programmed answer be computing the error as a percentage of 243 the correct answer. This value controls the default for how close the student answer 244 has to be in order to be marked correct. 245 <p> 246 A value such as 0.1 means 0.1 percent error is allowed.", 247 type => 'number'}, 248 ], 249 ['E-Mail', 250 { var => 'mail{feedbackSubjectFormat}', 251 doc => 'Format for the subject line in feedback e-mails', 252 doc2 => 'When students click the <em>Email Instructor</em> button 253 to send feedback, WeBWorK fills in the subject line. Here you can set the 254 subject line. In it, you can have various bits of information filled in 255 with the following escape sequences. 256 <p> 257 <ul> 258 <li> %c = course ID 259 <li> %u = user ID 260 <li> %s = set ID 261 <li> %p = problem ID 262 <li> %x = section 263 <li> %r = recitation 264 <li> %% = literal percent sign 265 </ul>', 266 width => 45, 267 type => 'text'}, 268 { var => 'mail{feedbackVerbosity}', 269 doc => 'E-mail verbosity level', 270 doc2 => 'The e-mail verbosity level controls how much information is 271 automatically added to feedback e-mails. Levels are 272 <ol> 273 <li value="0"> send only the feedback comment and context link 274 <li value="1"> as in 0, plus user, set, problem, and PG data 275 <li value="2"> as in 1, plus the problem environment (debugging data) 276 </ol>', 277 type => 'number' 278 }, 279 { var => 'mail{allowedRecipients}', 280 doc => 'E-mail addresses which can recieve e-mail from a pg problem', 281 doc2 => 'List of e-mail addresses to which e-mail can be sent by a problem. Professors need to be added to this list if questionaires are used, or other WeBWorK problems which send e-mail as part of their answer mechanism.', 282 type => 'list'}, 283 { var => 'permissionLevels{receive_feedback}', 284 doc => 'E-mail feedback from students automatically sent to this permission level and higher:', 285 doc2 => 'Users with this permssion level or greater will automatically be sent feedback from students (generated when they use the "Contact instructor" button on any problem page). In addition the feedback message will be sent to addresses listed below. To send ONLY to addresses listed below set permission level to "nobody".', 286 type => 'permission'}, 287 288 { var => 'mail{feedbackRecipients}', 289 doc => 'Additional addresses for receiving feedback e-mail.', 290 doc2 => 'By default, feeback is sent to all users above who have permission to receive feedback. Feedback is also sent to any addresses specified in this blank. Separate email address entries by commas.', 291 type => 'list'}, 292 ] 293 ]; 294 295 1;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |